Skip to content

Prompting With Long Documents

How to get accurate answers from long contracts, reports and transcripts: document placement, quoting and section-by-section work.

Editorial team 1 min read

Large context windows let you paste in long documents, but quality depends on how you do it.

Put Documents First

Place long material near the top of the prompt, with your question and instructions after it. Many models answer more accurately when the question comes after the document.

Label Everything

Wrap each document in tags with a title, date and ID so the model — and you — can refer to them precisely.

Ask for Quotes First

For accuracy, ask the model to extract the relevant quotes before answering: "First list the passages relevant to the question in <quotes> tags, then answer using only those passages." This focuses attention and makes answers checkable.

Work Section by Section

For very long documents or detailed analysis, process one section at a time and combine the results.

Beware the Middle

Details buried deep in a long context are more likely to be overlooked. If something matters, point the model to where it is.

Verify Specifics

Numbers, dates, clause references and names should be checked against the original.

Consider Retrieval

When documents are extremely long or you ask many questions about them, retrieving relevant sections may be faster, cheaper and more accurate than sending everything each time.

More in Prompting

All Prompting guides →
Prompting Guide · 1 min

Anatomy of an Effective Prompt

The parts of a prompt that reliably produce good results, with a template you can adapt for almost any task.

Prompting 1 min read 1 Nov 2025

Prompting Guide · 2 min

Giving Models Context

Why most weak outputs come from missing context, and what background information to include in a prompt.

Prompting 2 min read 31 Oct 2025

Prompting Guide · 1 min

Role Prompting: When It Helps and When It Doesn't

Telling a model to act as an expert or a persona can shape tone and focus — but it isn't a substitute for clear instructions.

Prompting 1 min read 30 Oct 2025