-
Notifications
You must be signed in to change notification settings - Fork 16
Lunch
Updating Stevenson.Space lunch has been quite the battle for many years. Prior to LLMs, we would manually OCR the lunch menu PDF, and stick a CSV file into a custom parser that would spit out a fancy JSON file for the site to read. Now, with ChatGPT and Claude, this has become a lot easier.
So you don't have to set up an API account (and pay), it is best to use an online interface for menu parsing, such as chatgpt.com or claude.ai. Upload the latest lunch menu as a PDF attachment to your message, and use the following prompt:
Please parse the attached PDF file in accordance with the specified JSON structure for the entire month of a school lunch menu. Please take into account the International Station, which rotates weekly between: "Pasta Bowl", "Burrito Bowl", "Asian Bowl", and "Mac & Cheese Bowl". Also, take into account gaps for weekends.
The output structure must be a valid JSON object with a structure like:
{
"5": {
"Comfort Food": ["Adobo Roasted Turkey Breast"],
"Mindful": ["Creamy Vegetable Casserole"],
"Sides": ["Corn", "Egg Noodles"],
"Soup": ["Minestrone", "Chicken Gumbo"],
"International Station": ["Mac and Cheese Bowl"]
},
"6": {
"Comfort Food": ["Baked Battered Cod"],
"Mindful": ["Chicken Vesuvio"],
"Sides": ["Roasted Vegetables", "Roasted Wedge Potatoes"],
"Soup": ["Minestrone", "Chicken Gumbo"],
"International Station": ["Mac and Cheese Bowl"]
},
"9": {
"Comfort Food": ["Cheese Tortellini"],
"Mindful": ["Lemon Garlic Baked Chicken"],
"Sides": ["Roasted Carrots", "Roasted Red Potatoes"],
"Soup": ["Smokey Poblano", "Chicken Noodle"],
"International Station": ["Asian Bowl"]
}
}
JSON output with no extraneous text or wrappers:
You MUST check the LLM's output for mistakes. There may be some manual editing to be done. If you have a better prompt, feel free to share it with us!
From there, you can copy and paste the edited output into /data/lunch.json
. Run npm run dev
and check that everything looks good!
We wish there was an easier way to do this. School bureaucracy has denied us this opportunity many times, so we have to resort to this :(