RAG or Long Context for Contract Review?
The interviewer asksA legal team wants to ask questions about one 80-page contract at a time. Would you use RAG or put the whole contract in the context?
Applied AI PMForward Deployed EngineerAI Product Engineer (secondary)CoreTechnical roundRepresentative5 min
On this page
The 30-second version
- One 80-page contract is roughly 40,000–60,000 tokens: it fits most context windows.
- Questions often need several clauses together (definitions plus obligations), which favours the whole document.
- Long context costs more per question and can miss details buried in the middle.
- Prompt caching can cut the cost of asking many questions about the same contract.
- Test both on real questions with known answers before deciding.
What it's really testing
- Choosing between RAG and long context
- Estimating size
- Deciding by evidence
How to structure your answer
- Estimate size.
- Think about how questions use the document.
- Weigh cost, latency and accuracy.
- Test.
The interview, played out
- InterviewerA legal team wants to ask questions about one 80-page contract at a time. RAGRetrieval-augmented generation. Fetching relevant documents and putting them in the model's context before it answers. Read the full explanation or the whole contract in the context?
- Candidate80 pages is roughly 40,000 to 60,000 tokens, which fits in most modern context windows. And contract questions often need several parts at once: the definitions section changes what a clause means. That favours giving the model the whole contract.
- Strong moveReasons from how the questions use the document.
- InterviewerAny downsides?
- CandidateCost and speed per question: every question re-sends the whole contract. And models can miss details buried in the middle of long inputs. Prompt caching helps with cost when they ask many questions about one contract.
- InterviewerSo which?
- CandidateLong context, with answers that quote the clauses they rely on, so lawyers can check. But I'd test it: 50 real questions with known answers, long context vs RAG, measuring accuracy and missed clauses.
- Missed signalCould note the answer changes if they want to search across hundreds of contracts: then RAG.
The strong answer, distilled
- Size: ~40–60k tokens; fits.
- Usage: questions span definitions and clauses, so the whole document helps.
- Costs: per-question cost and latency; mitigated by prompt caching.
- Risk: missed details mid-document; require quoted clauses.
- Decide by test: 50 real questions, long context vs RAG.
- Changes at scale: across hundreds of contracts, RAG.
This is one strong answer, not the only one.
How it's scored
| Dimension | Weak (2) | Passable (3) | Strong (5) |
|---|---|---|---|
| Sizing | None | Rough | Tokens estimated |
| Reasoning | Preference | Fits or not | How questions use the document |
| Decision | Opinion | Choice | Choice tested, with the scale caveat |
Round scorecard: Applied AI PM: technical round, filled in for the mock candidate
| Dimension | Weak | Passable | Strong | The mock candidate |
|---|---|---|---|---|
| Accuracy | Explains the mechanism wrongly. | Correct in outline. | Correct, and precise about what the model does and doesn't do. | Strong. Correct: one contract fits and is used as a whole. |
| Clarity | Jargon, or no structure. | Clear to a technical listener. | Clear to anyone, with a concrete example. | Strong. Clear comparison. |
| Depth | Surface only. | Answers follow-ups. | Goes a level deeper unprompted where it matters. | Strong. Raised missed details deep in long contexts and the need to test. |
| Product judgment | Stops at the explanation. | Mentions fixes. | Turns the explanation into product and engineering choices. | Strong. Cost per question weighed against review accuracy. |
How the answer changes by role
| Role | What to emphasise |
|---|---|
| Applied AI PMProduct Manager. Decides what a product should do, for whom, and why. Read the full explanation | Accuracy, cost and the lawyer's workflow |
| Forward Deployed EngineerForward Deployed Engineer. An engineer embedded with customers who scopes, builds and ships AI solutions into production. Read the full explanation | Testing on the customer's real contracts |
| AI Product Engineer | Caching and quoting implementation |
Common mistakes
- Defaulting to RAG for everything
- Ignoring cross-references in contracts
- No test
More follow-ups to practise
- "They want to compare clauses across 500 contracts." Hint: RAG plus structured extraction.
- "A wrong answer could cost millions." Hint: quotes, confidence, and human review.
Go deeper
- Module: RAG and retrieval
- Framework: Explain a Concept Framework
- Framework: Opening Any Interview Answer
- Lesson: RAG vs long context vs fine-tuning
- Also tests: AI numbers: serving, cost and latency
Sources
Representative question: written to match technical rounds for AI product roles, not a specific reported interview.