Models often pay less attention to information in the middle of a long prompt, the lost-in-the-middle effect, so a fact buried in the centre can be ignored even though it was sent. The check is simple: put a key fact in the middle, ask a question that needs it, and see whether the answer uses it. If it does not, the fix is to move the fact or shorten the prompt, not to repeat the question louder.
What you need
- A long prompt with a key fact in the middle
- A question whose answer depends on that fact
- A shorter version of the same prompt for comparison
Step 1: Place the key fact in the middle
Build a long prompt with the fact that matters buried in the middle, surrounded by other material. Note the fact and where it sits.
Step 2: Ask the question that needs it
Ask a question that can only be answered from that fact, and check whether the answer uses it. A vague answer or a guess means the fact was lost.
Step 3: Move the fact and re-test
Move the key fact to the start or the end of the prompt, or shorten the prompt so the fact is no longer buried, and ask again. If the answer now uses the fact, the position was the problem.
Worked example: synthetic lost-in-the-middle test
The table below is a synthetic example. It shows the expected result of the position test; no prompt was sent.
| Fact position | Answer uses the fact? | Result |
|---|---|---|
| Start of prompt | Yes | Pass |
| Middle of a long prompt | No | Lost |
| End of prompt | Yes | Pass |
| Shortened prompt, fact in middle | Yes | Pass |
Expected result (UNTESTED). the fact is used at the start and end of the prompt but lost in the middle of a long one, and shortening the prompt restores it. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- The effect varies by model and by length; a shorter prompt avoids it more reliably than any placement trick.
- Retrieval that returns fewer, better chunks helps more than a bigger window.
- A fact the model ignores is not the same as a fact the model does not know; check the position before blaming the model.
- Long prompts cost more per call as well as risking lost facts, so shortening pays twice.
