2026-06-22 · Architecture

We deleted a magic number

Our hallucination guardrail stopped reading a fixed 150 tokens before generating. It now starts at 40, checks for grounding, and reads more only when it's unsure — confident hits settle in 40, hard cases read further, nothing is set in advance.

That's portioned output: emit one portion, check if it's enough, take more only if it isn't, stop the moment it is. The total isn't a setting — it's whatever the task turned out to need.

The same shape fits anything that ships a fixed amount. Read the first 150 tokens. Return 20 rows per page. Buffer 4 KB. Summarize to 500 words. Each is a guess frozen into code — too big for the small case, too small for the big one. Replace the constant with the loop and the number disappears.

ADR-157, public like everything we build.

Learn more →