Module 4 · What the model can see

Where in a long prompt things get missed

In this lesson

  • 9 min read
  • 5 reading sections
  • Knowledge check
  • Lesson 3 of 9 in this chapter

This chapter’s goalBudget a context window across system prompt, history, retrieved material and output; predict where in a long prompt information is most likely to be missed; and explain why prompt injection is a structural property of the input format rather than a bug awaiting a patch.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available
Accuracy against where in the prompt the answer sits0501001090Depth of the answer in the prompt, % of the way throughAnswers correct, %—— Short prompt, about 4,000 tokens– – Long prompt, about 64,000 tokens– – No documents at all, answered from memoryThe U is the shape everybody reproduces: strongest at the start, strong again at the end, weakest inthe middle, and worse as the prompt grows. On the long prompt the correct document, placed in themiddle, scores below giving the model nothing at all. Measure your own curve; do not borrow this one.
The U is the shape everybody reproduces: strongest at the start, strong again at the end, weakest in the middle, and worse as the prompt grows. On the long prompt the correct document, placed in the middle, scores below giving the model nothing at all. Measure your own curve; do not borrow this one.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 6Free · no account needed
Lesson steps

The finding

In 2023 researchers gave models a question and a set of documents, exactly one of which contained the answer, and moved that document through every position. Accuracy was highest when the answer sat at the beginning, high again at the end, and lowest in the middle: a U-shaped curve.

The effect was substantial. On some configurations, performance with the answer in the middle of a long input fell below performance with no documents at all, which is a striking result: adding the correct information in the wrong place made things worse than omitting it.

The paper is titled “Lost in the Middle” and the name stuck. Later models have reduced the effect and none has eliminated it.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the AI, Actually Explained exam.

Stuck on something?Ask Anjali, your AI tutor

How to cite: Addaly (2026) ‘Where in a long prompt things get missed’, in How a Language Model Actually Works. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/how-llms-work/position-bias-and-effective-context (Accessed: 29 November 2026).