'The order is the control': anchoring-proof agent pipeline puts hard rules before the model

Neither_Opinion69 · reddit · 2026-11-03

A Reddit engineer building an agent that proposes green/amber/red monitoring thresholds shares a hard-won lesson: when a pipeline mixes hard rules and an LLM, call order matters more than the prompt.

The trap: asking the model first let it write "the 1.0% red line looks loose, consider tightening to 0.7%" on a contractually mandated limit — text that hit the reviewer's screen before the rule overruled it. Reviewers can't unread it: classic anchoring, now labeled "AI suggests."

The redesign: mandated bands are adopted verbatim without consulting the model; zero-tolerance indicators get green-0/red-1 with no amber; the model is only called for statistical indicators, and only to pick a METHOD from a closed list (mean+SD, percentiles…), with no value field in the response schema; bands are computed deterministically with a trace; validation failures are logged as "blocked," never "proposed." Two extra guards: a regex visibly masks any digits the model volunteers anyway, and the validator independently rejects averaging on zero-tolerance indicators even though ordering makes it unreachable — "a guard that only holds because of if-branch order is one refactor away from failing."

Reproducing both designs with a fake number-volunteering model shows identical bands either way — so unit tests can't tell the designs apart; counting model calls on a fixture set can.

Original post →

More from coding & agent

coding & agent channel →