Kadharmoideen Fadurudeen

Lead Engineer & Architect with 19+ years of experience building scalable applications and leading high-performing teams.

Quick Links

HomeExperienceBlogGames

Connect

© 2026 Kadharmoideen Fadurudeen. All rights reserved.

K
KadharLead Engineer & Architect
AboutExperienceProjectsBlogResources
Tools
Back to Blog
AI Agents
September 28, 2026
9 min read

Combo Maker: Building a Budget-Aware Meal Recommender

Give it a budget and a diet preference, and Combo Maker assembles the best meal combo it can afford from a sample menu — a live demo, how the allocator works, and an honest look at what a real AI-backed version would need.

Tell it your budget — say, "$18, and I only eat vegetarian" — and Combo Maker puts together the best meal it can from a restaurant menu without going over. Try it below, then read how it actually works and whether it should be running on a real language model instead.

Where This Fits

This is a companion to Building Agentic Workflows for Restaurant Discovery. That post finds you a restaurant. This one solves a narrower, very concrete problem once you're already looking at a menu: given a fixed amount of money, what's the best combination of items you can order?

Try It

Move the budget slider, toggle vegetarian on or off, and hit "Build my combo." Hit it again — the picks reshuffle a bit each time among similarly-priced options, so you're not stuck with the exact same combo every run.

Combo Maker — try it

$20

Main

from $9

Drink

from $2

Side

from $3

Appetizer

from $4

Dessert

from $3

This picks the best combo it can afford using a simple greedy budget allocator — not a language model. See the note below on what a real AI-backed version would need.

How It Actually Decides

The allocator is a simple greedy algorithm, not a model making judgment calls. It walks categories in a fixed priority order — main course first (required), then drink, side, dessert, appetizer — and for each one, picks the cheapest item that still fits the remaining budget, with a little randomness among near-ties so it doesn't feel robotic:

for category in [main, drink, side, dessert, appetizer]:
  candidates = category.items
    .filter(item => !vegOnly || item.veg)
    .filter(item => item.price <= remainingBudget)
    .sortByPriceAscending()

  if candidates.isEmpty():
    if category.required: fail("not enough budget for a main")
    else: skip category

  pick = randomAmong(candidates within $1 of the cheapest)
  remainingBudget -= pick.price

That's the whole "brain." It's a knapsack-style budget allocator, the same family of algorithm behind things like flight seat upgrades or gift-basket builders — reliable, instant, and free to run, because there's nothing to call over the network.

Could This Be Genuinely AI-Powered?

Yes — and it would actually get better at the things this version can't do at all: understanding "I'm not that hungry," reasoning about flavor pairing instead of just price, or taking a free-text menu photo instead of a hand-typed list. A real version would send the budget, preferences, and a described menu to an LLM and let it reason about the combo and explain why, in plain language.

I didn't wire that up here, on purpose. It's a different kind of decision than the algorithm above:

It needs real infrastructure

A browser can't call an LLM API directly without exposing the key, so it needs a backend route, a configured API key, and someone's account paying for every generation — not free like the version above.

Public traffic means real risk

This demo sits on a public blog post. Without rate limiting and abuse protection, a shared link or a bot could run up a real bill on someone else's dime for a "click a button" demo.

None of that is a reason to never do it — it's a reason to decide it on purpose rather than by default. The rule-based version above is the honest baseline: it demonstrates the actual concept (budget-aware recommendation) without quietly costing anyone money every time a visitor clicks a button. If that trade-off is worth it, this is exactly the kind of thing worth wiring up as a proper follow-on, with rate limiting and a real budget for it from the start.

Conclusion

Not every "smart" feature needs a model behind it. A well-scoped rule-based allocator solved the actual problem here — fit the best possible meal into a budget — instantly, for free, with nothing that can go down or run up a bill. Save the LLM for the part a simple algorithm genuinely can't do: understanding a menu described in a photo, or reasoning about taste instead of just price.

PreviousTop 10 Platforms to Create AI-Powered Courses and Get Certified

Continue Reading

Explore more articles on software engineering and technology

AI Agents

Building a Multi-Agent System from Scratch: Architecture Patterns

Orchestrator-worker, blackboard, and pipeline patterns for coordinating multiple AI agents — with the failure modes that only show up once you go past a single-agent demo.

11 min read
Read
AI Agents

Building Agentic Workflows for Restaurant Discovery

Learn how to create intelligent AI agents that help users discover nearby restaurants based on specific queries like lunch buffets, continental breakfast, and more using modern AI frameworks.

14 min read
Read
AI Tools

Top 10 Platforms to Create AI-Powered Courses and Get Certified

From Coursera and DeepLearning.AI to newer entrants like Nokku.ai — a practical rundown of where to take AI-generated courses, actually finish them, and walk away with a certificate that means something.

10 min read
Read