How do you order retrieved chunks in a RAG prompt?
Prompt Engineering Patterns: Generated Knowledge, RAG Prompts, Citation and Grounding Techniques
Audio flashcard · 0:18Nortren·
How do you order retrieved chunks in a RAG prompt?
0:18
Order retrieved chunks by relevance, with the most relevant either at the start or end of the context window, where the model attends most. Some systems duplicate the top result at both ends. Avoid placing critical information in the middle. For complex queries, consider reranking before placement or showing only the top three chunks instead of ten.
arxiv.org