Case study · MTM Planner · LLM pipeline · Hackathon
Messy messages in, a plan that always adds up.
Built at MTM Version 2.0 (GDGoC CUI Wah). It reads emails, WhatsApp texts and notices in English or Roman Urdu and plans a whole 4-hour hackathon: venue, schedule, food, judging and budget.
- Event
- MTM Version 2.0, GDGoC CUI Wah
- Built with
- Node.js · Gemini Flash-Lite
- Model calls
- 1 per update, 5 max
- Status
- Live demo
01The job
Organisers don’t send specs. They send messages.
An event plan arrives as a pile of emails, WhatsApp texts and notices, some in Roman Urdu. The lunch price changes. A caterer tries to cut the meal count. Someone asks for a DJ nobody approved.
The planner has to turn that into a venue, a timed schedule, food, judging and a budget that are all valid at once, and keep them valid as new messages arrive.
02How it works
The model only reads. Code does the maths.
One model call turns all new messages into typed facts (budget.total, venue.option…) with the sender’s role and date. Everything after that is code: teams, judges needed, headcount, the cheapest venue that seats everyone, a schedule that fills the event exactly, and the budget.
- 01Reading1 model call: language → typed facts
- 02Fact storeCode: newest message wins; only the right sender can set a figure
- 03Area callsModel, only for constraints the facts can’t express; cached per area
- 04PlannerCode: all arithmetic, exact and free
- 05ValidatorCode: six checks, or the plan doesn’t ship
Only when a message adds a constraint the fact keys can’t express (“the venue needs a generator”) does the planner make one extra call, scoped to that area, which returns allowed operations rather than free text.
03Rejecting bad input
A plausible but wrong message gets rejected, with a reason.
Messages are applied one at a time. If a message makes a passing check fail, it’s rejected, the previous facts are restored and the reason goes in the trace. The plan on screen is always the last valid one.
An authority check stops the wrong sender changing a figure: a caterer can’t cut the number of meals, and only finance or the organiser can record spending.
Ambiguous numbers
“Printing is now 6” with no clear unit isn’t applied.
Increases
“Eight additional staff” adds to the current figure.
Conflicts
Two equal-authority messages that disagree are disclosed, not guessed.
Prompt injection
Instructions inside messages are treated as data.
04Cost & trace
Every model call is counted and shown.
A new message costs one reading call, plus one call per area only if it adds a new constraint. The limit is five. Every call uses a small Flash-Lite model, with a second key and an older Flash-Lite as fallbacks.
Each call is logged with its model, area, prompt, input, output, token counts and time, and the trace ends with a list of every model used, so a judge can verify the numbers rather than trust them.
05After the event
Redesigned so the decision comes first.
After judging I rebuilt the interface. It leads with the latest decision, worded from the actual outcome (“Plan updated” with the exact change, or “Message rejected” with the reason), and puts the figures side by side: attendance vs seats, meals vs people, spend vs budget.
An outbox drafts one reply per sender, on the channel they used, including the reason for every rejected message. Nothing is sent automatically. It works on phones and at 200% zoom.
Hiring a remote engineer? Let’s talk.
Available for remote full-stack and Python/AI roles, 30–40 hrs/week.