My LLM kept inventing numbers in slide decks — a 60-line validator fixed it
Finbro789 · reddit · 2026-12-02
A developer shares a docs → LLM → structured JSON outline → Gamma API slide-deck pipeline and the three failures that shaped it: (1) the model wrote prose instead of following the schema — fixed with strict JSON schema mode; (2) sections ran long — a maxwords field per section plus a validator that re-prompts once; (3) scariest, invented statistics — every number must carry a sourceid or the validator drops it. The validator is 60 lines and catches most problems before rendering. Lesson: don't trust the model to behave; build a cheap checkpoint that enforces it.
More from coding & agent
- Most AI engineering problems are old engineering problems in new clothes — arpit_bhayani · 2026-12-06
- Yacine: coding agent Neon nails hardest engine problems like 8M-particle Vulkan fluid sim — yacineMTB · 2026-12-06
- Tencent joins OpenClaw Foundation as donor, deepens open-source agent security work — vincent_koc · 2026-12-06
- OpenAI ships dots, an always-on agent powered by GPT-6 Astra, now expanding to GPT-6.1 Terra — blakesamic · 2026-12-06
- Running crons via Grok Bot with day-long notifications makes each job 100x more useful — gaganghotra_ · 2026-12-06
- JetBrains runs 500k context on a 16GB GPU with two-tier Q8 KV cache — yogthos · 2026-12-06