Automatic reordering places retrieved context where the model is most likely to attend, helping agents mitigate the “lost in the middle” problem. Its reliability depends on whether the agent’s ranking matches the developer’s judgment; when it does not, pin the important file manually. section 3.5.4
Use automatic reordering with explicit guardrails:
- Treat ranking as an aid, not an authority; manually pin context when relevance is misjudged. section 3.5.4
- Maintain the searched knowledge base because outdated, contradictory, or insecure material can poison retrieved context. section 3.5.4
