Lost in the Middle
An effect where the model better utilizes the beginning and end of context, but poorly — the middle. This is a noticeable problem for long documents.
Why It Matters in RAG
If the context includes many found fragments, the most important ones may end up in the middle — and the model will miss them. Therefore, found fragments are re-ranked rather than dumped into the context consecutively.
How to Reduce the Effect
- Place key information at the beginning or end;
- Reduce the number of fragments through re-ranking;
- Break long documents into parts.