Part 11 of 16 · 1 min read
How to build it so it holds up
- Name the pinned items (rules, safety instructions, the task), because an unpinned rule competes with everything else for space and will lose on a bad day.
- Write the budget as a number below the window limit, counting the wrapper and the question, because a budget that ignores either is exceeded every time.
- Decide what supersedes what, giving corrected facts a key, because a model shown an old value beside a corrected one has no way to pick the right one.
- Rank by something you can inspect, and look at what it picks for ten real questions, because a signal you cannot audit is a signal you cannot fix.
- Trim inside long items, and find where trimming starts to lose answers, because a fixed trim size that works for one log can silently fail on another.
- Fence all outside text, including the user's, and test it with forged headers, because untrusted text that can write a header can impersonate a rule.
- Order deliberately: rules first, question last, the rest stable, because both ends of the window are read most reliably and a changing order defeats caching.
- Measure presence and use separately, because presence is a fact you can check today and use is a model property you can only measure with a real model.
- Log the assembled context for failures, because without it "the model got it wrong" cannot be told apart from "the model was never shown it".
- Plant defects in the assembler and see whether your tests notice, because a passing suite proves little until you have broken the code on purpose.