Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
LLMs show a U-shape position bias on long prompts, attending most at the head and tail; put critical context in both regions and avoid the middle.
Imagine giving a friend a giant list of instructions before they help you. They will probably remember the first few things you said and the last few things you said, and forget the stuff in the middle. Long prompts work the same way. The model pays more attention to the start of the context and the end, right before the actual question, than to anything sandwiched between them. So you put the things that really matter at both ends, and you treat the middle as the part the model is most likely to overlook.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: the U-shape empirical finding + RAG chunk reordering + long-context models do not flatten it + how to measure on your own prompts.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Defaulting to 'put it at the top' or 'put it at the bottom', and ignoring that the middle of a long prompt is where models are measurably worst at retrieving information.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.