Work with long input

Intermediate · 7 min · Process a long document with a chunked extraction process instead of one giant paste.

  • prompting
  • long input

Long documents do not fail loudly. The model does not say “I could not read past page 40” — it skims, drops the middle and answers from the edges. Three forces are at work: attention dilutes across a huge window, the oldest text gets truncated first, and vague instructions drown in sheer volume. The fix is not a better sentence — it is a process.

The process

  1. State the task and the exact output format before pasting anything. The spec stays near the top where it is read first.
  2. Split the document into logical chunks — sections, chapters, pages. Logical beats equal: a chunk that ends mid-decision produces mid-decision extractions.
  3. Process one chunk per pass, extracting into the same fixed format every time. Identical shape means identical quality across chunks.
  4. Collect extractions in notes you control — a file, not the chat. You are building the durable memory the model does not have.
  5. Write the final answer from your notes, then spot-check it against the source. The synthesis never depends on the model remembering a document.

A bad example

Ask: [paste 200 pages] “Summarize this.”

You get a confident shallow summary that follows the document’s opening and ending and skips everything between. Nothing is visibly wrong — which is the danger.

A better example

Ask: “Here is section 3 of 9 of the project manual. Extract every decision, date and owner as a bullet list: Decision — Owner — Deadline. Use no knowledge outside this section. If something is missing, write unstated.”

Nine small passes, one format, notes you keep. The final report is assembled from extractions you can verify one by one.

Why it works

Every pass stays inside the sweet spot where attention is high and instructions survive. The notes file becomes the single source of truth — the context window can overflow without taking your work with it. And chunked extraction fits the model’s strength exactly: transforming text that is fully in front of it.

One habit that makes chunking feel light: finish the first chunk completely — extract, save, verify — before pasting the second. If the format is wrong, you learn it after one chunk instead of after twelve. And the notes file you build along the way becomes the deliverable: the final answer assembles from verified pieces instead of resting on one giant pass you cannot inspect.

Practice

Order the long-document process

You must extract every deadline and owner from a 120-page project manual — without losing the middle of the document.

Put the five steps in a workable order using the up/down controls.

  1. Process one chunk per pass, extracting into the same fixed format every time.
  2. Collect the extractions in notes you control (a file), not in the chat.
  3. Write the final answer from your notes, then spot-check it against the source.
  4. State the task and the exact output format before pasting anything.
  5. Split the document into logical chunks — sections, chapters, pages.
Hint

Where should the output format live — before or after the input?

Which artifact survives when the chat is gone?

Transfer

Next

Next: Ground responses in your sources — the strongest anti-hallucination move in the prompting toolkit. The context window glossary entry explains the limit this process works around.