How a Budget Meal Planner Became a Lesson in Safe AI Workflows

https://hackernoon.imgix.net/images/2jqChkrv03exBUgkLrDzIbfM99q2-9a0228c.jpeg

Last week, my constraint-optimization engine suggested I live on nothing but protein powder and frozen peas for 7 days to stay under my $27/week budget. It wasn't trying to be funny; it was a logical failure in my multi-step agentic workflow.

I’m a NestJS engineer. I thought I could solve "budget meal prep" with a clean schema and a prompt. I was wrong. Building this for the Google I/O 2026 challenge wasn't about building a demo; it was about fixing a system that kept breaking in the messiest ways possible.

1. The "Failure" Moment: The Gap Between Logic and Reality

My initial MVP was simple: feed the API a budget, get back a JSON list of meals.

The Failure: The model hallucinated prices based on global averages, not my local market. My engine accepted the hallucinated price as "ground truth," resulting in a plan that was technically within budget but ...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE