Tip2025-08-12#prompting
Mind the middle of long contexts
Retrieval accuracy as a function of position tends to be U-shaped: strong at the start, strong at the end, sagging in the middle. A fact you need can be technically present and still effectively invisible.
Design around it. Lead with the instruction, restate the critical constraint at the very end, and keep the soft middle for material you can afford to lose.
Sometimes called 'lost in the middle'.
Aha moment
A fact can be present and still practically invisible if it sits in the soft middle of a long prompt.
Try this
Move critical constraints to the opening contract and repeat the single highest-risk fact at the end.
Watch for
- Middle facts ignored while opening and closing instructions are followed
- Retrieved context pasted without ranking
- Important constraints surrounded by low-value filler