Prompt Engineering Fundamentals
Last reviewed
Correct answer: D. At the end, after the documents, because queries placed last measurably improve quality
Explanation
The principle — With long inputs, position is a lever. The model reads the prompt as a sequence, and what comes last is closest to the answer it is about to produce.
Why the key is correct — Anthropic's long-context guidance is to put longform data at the top, placing long documents and inputs near the top of the prompt above your query, instructions and examples, and states that this improves performance across all models. It attaches a number to the effect: queries at the end can improve response quality by up to 30 percent in tests, especially with complex, multidocument inputs — which is precisely the situation here. The same guidance adds two companions worth applying: wrap each document so its boundaries are explicit, and for long-document work ask the model to quote the relevant passages before carrying out the task.
Why the others are wrong — Leading with the question inverts the recommended order. Position is not neutral, which is why Google lists reordering as an iteration strategy. And repeating the question at both ends adds redundancy while giving up the benefit of asking last.
Remember this — Documents first, question last.
Sources — Anthropic, Prompting best practices.
Sources
“Queries at the end can improve response quality by up to 30 percent in tests, especially with complex, multidocument inputs.”
Practise 10 questions on this topic
Take Prompt Engineering Fundamentals — Timed Test 1 (10 questions) — scored instantly, explanation for every question, no login.