← All questions
RAGMedium· Prompt Engineering· Context Window· Evaluation

How should the retrieved chunks be formatted in the con...

A strong approach rejects the idea of a single optimal format. Instead, you must identify the specific slots that constitute the formatting decision—such as delimiters, chunk numbering, the placement of the question relative to the evidence, and the output schema. The correct procedure is to sweep approximately 20 variants against the model and task, select the winner, pin it to the specific model version, and track valid-response rates alongside accuracy to ensure robustness.

Code playground (Python)