Put the answer in the middle of a long prompt and many models are more likely to miss it than if it sits at the start or end.
How it works
Liu et al. (2023) tested models on two tasks. In multi-document question answering, the model got a question and several retrieved documents, only one of which held the answer. In key-value retrieval, it had to find one value in a long list of pairs. The researchers varied where the relevant item sat.
Their finding: performance “is often highest when relevant information occurs at the beginning or end of the input context, and significantly degrades when models must access relevant information in the middle of long contexts, even for explicitly long-context models.” Plotted by position, accuracy forms a U shape.
The practical reading is simple. A long context window tells you how much a model accepts, not how evenly it uses it.
Why it matters
- RAG ordering. In retrieval-augmented generation, the retriever ranks passages. If you place the best one in the middle of 20, you waste the ranking. Put it first, or first and last.
- Long documents. Asking about a clause on page 40 of 80 is harder than asking about page 1. Point the model to the section, or extract it first.
- Agents. In a long agent history, early instructions and the latest turn get attention; mid-run tool output is the part most likely to be underused.
Lost in the middle is one piece of a wider effect called context rot, where accuracy drops with length and distractors, not only position.
On BroadNet Inference
BroadNet’s DeepSeek V4.1 Flash and GLM 5.3 accept up to 1,048,576 tokens per request. That makes position more important, not less, because there is more middle. A layout that works with both position effects and cached input:
[stable system prompt and instructions] -> cached prefix
[documents, best-ranked first]
[the question, restated in full] -> end of prompt
The 1M-token context guide and prompt structure for caching go further.