Order your agent-output checks right: deterministic code vetoes first, LLM judge last
NovaRail · reddit · 2026-12-04
A developer building a pipeline where agent output spends real money shares the check ordering he settled on, arguing the order matters more than any individual check:
- Split work into steps with contracts — each step declares format, required fields, time limits and self-declared invariants (totals match line items, dates ascending, no duplicate IDs). No contract means unverified.
- Run untrusted content in a sandbox, fail-closed — sandbox errors or timeouts fail the step; never let things through to keep the pipeline moving.
- Deterministic checks next, with veto power — parse, validate schema, recompute sums, check ordering and declared invariants. Cheap, boring, never hallucinate; any hard violation ends the step.
- LLM judge last, with a floor — only output that survived step 3 gets quality-graded against a rubric; hard violations cap the score below the floor so the judge can't talk its way past a broken total.
- Keep the failures — log input/output hashes and the deciding check for every step; pass rates are meaningless without failures sitting next to passes.
Main lesson: an LLM judge alone is easy to fool — confident, well-formatted output with one wrong number reads as high quality. Putting code in front of the model fixed most of that. Open question: what to do for subjective steps (summaries, copy) — pairwise comparison, multiple judges, human spot checks?
More from coding & agent
- Agent-native GTM teams need full-stack plus agent engineering, LangChain job post shows — BraceSproul · 2026-12-06
- Cohere Team to Host NeurIPS Panel on Shipping Frontier Research into Regulated Industries — Julianfmack · 2026-12-06
- Agentic commerce in action: snap a QR code and your agent pays for parking and donations — jeff_weinstein · 2026-12-06
- Voice agent dev: even fastest LLM API leaves laggy responses, users hang up — FalseSort5750 · 2026-12-06
- Liquid Glass UI: open-source WebGL2 React components that bend the page — GCWebDesigner · 2026-12-06
- OpenCode's Tinsel Alpha goes free: 1M-context multimodal coding model, rumored to be Muse Spark 1.4 underneath — talkaboutdesign · 2026-12-06