Lost in the middle
Lost in the middle is the observed effect that models recall information placed at the start or end of a long context more reliably than information in the middle.
It has a direct practical consequence: when supplying several documents, the most important one should not be placed in the middle of the stack. Where possible, filter the material before sending it rather than relying on the model to find the relevant part.
Related terms
- Context window
- A context window is the maximum amount of text, measured in tokens, that a model can consider at once — including the prompt, any supplied documents, and the reply it generates.
- Context stuffing
- Context stuffing is pasting large amounts of material into a prompt in the hope that the model will find the relevant part itself.
- Recency bias
- Recency bias is a model’s tendency to give more weight to instructions near the end of a prompt than to those buried earlier.
More on prompt structure
See the full glossary, read the guides, or put it into practice in the prompt builder.