PRODUCTION SCENARIO
A legal assistant sends three 30,000-token contracts and a question in one prompt. The engineer currently writes the question first and appends the contracts after it.
How should the prompt be reordered?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: Put the contracts near the top and the question and instructions after them
Longform data belongs near the top of the prompt, above the query, instructions and examples, and putting the query at the end improves response quality by up to 30 percent on complex multi-document inputs. Keeping the question first is the intuitive order and measures worse. Interleaving a question after each contract stops Claude comparing across the three. And moving the contracts into the system prompt relocates them without putting the query after them, which is the ordering that carries the effect.