Back

Introducing Chef Gaston, my Picnic AI meal planner

Open water
The source code for this project is available on the repository.

Introduction

After months of procrastinating, I finally built an actually useful tool for me and my wife. For a while, we've been struggling to choose recipes and meal plan every week. Very surprisingly, this got worse when we got our adorable chaotic little puppy.

So what were we to do? To solve this annoying issue and finally have decent meals, I decided to build my own small app which would pull recipes from the web, handle my family's impossible preferences, make weekly meal-planning suggestions with shared ingredients,1 and eventually send all that to my cart in the Picnic app. And so I built Chef Gaston.

Hades destroyer of blankies

This is the adorable face of my exhaustion.

This turned out to be surprisingly easy! It helps that it was vibecoded with ❤️. If you don't know what it is, vibecoding is a term, originally positive, now I'd say rather negative, which refers to letting an LLM build something autonomously. Unlike AI-assisted coding, you don't look at the code, you don't run your tests, you just trust your LLM and like, vibes. I don't like vibecoding. Sorry to all the POs and various engineering managers out there who are making a living out of half-assed POCs.2 I have seen too many security issues, ethics issues (no, the chatbot is not supposed to accept ranking employees by ethnicity...), or just really sloppy code. Vibecoding with ❤️ (read, care), on the other hand, is my way to taking this back.

When I created Chef Gaston, I first let DeepSeek run a bit with my prompt, create something basic that would work. That was great for motivation, and great for inspiration. Then I put my engineering hat on, and I harassed the hell out of my LLM until the quality of the product reflected what I wanted. So unlike those examples that I so dramatically complained about, I stand by the result here. The code produced does not belong to a museum, but it works, it is safe (no automatic checkout thnak you), and I can maintain it myself. That's vibecoding with ❤️.

If you're working for Picnic, don't worry! Yes, Chef Gaston may take some of my traffic away from the app, and that's not good for you. No no you don't have to deny it, I also work for a retailer. But it's also a great motivator to actually do my groceries. And since I have zero trust in my LLM when it comes to payment, all my service does is add items to cart which can then checkout in the app. So you know, it's a win-win, I get groceries, you get a sale, please don't sue me. I'm always open to job offers though wink wink.

Chef Gaston: how does it work?

Chef Gaston is built around a simple idea: centralize your personal taste profile and match it to recipes. The recipes can be scraped off the web, be a Picnic recipe, just a handwritten one, whatever you want. Then Chef Gaston creates a specific weekly meal plan for you (the portions and number of meals are configurable), one that:

  1. costs as little as possible,
  2. matches your taste profile as much as possible,
  3. introduces variety (new recipes, varied cuisines, etc.)

If you would rather click than read, I set up a demo for you at demo.nchagnet.eu/chef-gaston (empty user, password: demo). It has no LLM key and no Picnic connection: the catalog is fake and the database is a temporary file that is deleted when the process stops. It is read-only as well (every POST returns 403), so you cannot break anything, and you cannot spend anything. If you really want the real thing, the code is here.

Chef Gaston's weekly plan: seven dinners with their prices, the incremental basket total against a budget (soft cap), and the new recipes for the week

Seven dinners, priced against a soft budget.

To decide what to cook, Chef Gaston scores every recipe for every person, then searches for the cheapest combination that keeps everyone happy enough.

The scoring is pure arithmetic. Each component of a dish gets a score between 0 and 1, built from your past ratings of that component (70%) and of its main ingredient (30%). A person's score for a dish is the weighted average of its components, with the main dish weighted above sides, then nudged up or down by their recipe, cuisine and tag ratings. The household score combines those with 0.6 × mean + 0.4 × minimum, so one unhappy person cannot be averaged away (I refuse to have guacamole in my dish, sorry). A recipe only becomes a candidate if every person scores it above their taste floor (0.40 by default, 0.37 if nobody has cooked it yet) and the household score is above 0.55. This is all very ad-hoc for now, this kind of threshold will need to be tuned over time.

Selection is implemented as a beam search over the week with hard quotas: each person's meat and fish percentages must be respected via a cap on shared meat/fish dishes, no recipe should appear twice in a week, no repeat of anything cooked in the past two weeks, and at least one or two new recipes. A final local search swaps meals around to lower the costs on Picnic (which already subtracts your pantry and your current cart), and it reports the estimated cost of perishable leftovers. If the constraints are too tight, it retries with lower taste floors instead of failing.

Do I really need an LLM for this? Yes, to parse scraped pages, translates recipes to English, and generates new dishes when the stored ones aren't enough. The plan itself comes out of the calculation above to keep some control over what's going on.

Feedback on recipes helps evolve your taste profile3 so the model learns your preferences week by wekk and they are reflected in subsequent meal plans.

If you care about the tech stack, I picked the most boring one I could find. Chef Gaston is a simple Python app: FastAPI for the backend, Pydantic to validate what the scrapers and the LLM return, the openai package for any OpenAI-compatible endpoint (it is basic BYOK here) and, crucially, the picnic-api Python package to talk to your Picnic account. Below is how all of this fits together.

HouseholdCLIWeb UIFastAPI + templatesApplication servicesplanning · discovery · cart · importsDomain brainplanner · preferences · variants · basketLocal storageSQLite · household YAMLIntegrationsPicnic · LLM · recipe sites HTTPScommandsrequestsscore / planread / writefetch / add

Again, it's still a work-in-progress, but what I like about it is that unlike every. single. meal-planning app I've tried, this one actually fits my needs.

Should I also try Chef Gaston?

Of course, Chef Gaston is open-source: be my guest! But honestly, I built this as a form of personal software first, and it's unlikely Chef Gaston will meet your family's needs (but who knows, we're never as unique as we think we are). What I do advise is to fork it and make it your own.

Conclusion

It's actually a bit early to conclude on this project: I plan on using it weekly and improving it as I go. But it has been quite fun to get something useful done in a couple of afternoons that actually improves my everyday.


  1. Every household in the world wants to spend less on groceries. Tip #1 here is avoid buying an ingredient just for one recipe. ↩︎

  2. The irony that Chef Gaston (v0.1.0) is not that different from one of these POCs is not lost on me. But this is a hobby, I don't hold myself to the standards of corporate engineering when I have fun, thank God for that. ↩︎

  3. This works from feedback you give explicitly. Inferring preferences from recipe edits and cooking history is WIP. ↩︎