LangChain blueprint · Legal & Corporate
Contract review assistant
Clause-by-clause review against the company playbook, with redlines a lawyer approves.
- Steps
- 8
- Subjective questions
- 32
- Objective questions
- 32
The problem and the outcome
Problem: Legal teams become a bottleneck when every vendor contract needs a full manual read.
Outcome: First-pass review in minutes, so lawyers spend time only on real risks.
Architecture
How it works, step by step
- A vendor contract arrives as a PDF.
- It is parsed and split clause by clause: liability, termination, data protection, payment.
- For each clause the company's negotiation playbook is retrieved.
- A reviewer model compares the clause with the preferred and fallback positions.
- Each clause gets a red, amber or green flag with the reason.
- It proposes redlines in the playbook's own wording.
- A lawyer accepts or edits every change before it goes back to the vendor.
- The lawyer's edits become LangSmith evaluation data, so accuracy is tracked over time.
Tech stack
- LangChain
- PDF parsing and clause segmentation
- Playbook retrieval (preferred and fallback positions)
- Word redline output
- LangSmith evals from lawyer edits
Key design decisions
- Review clause by clause against the company's own playbook, not the model's general idea of 'fair'.
- Each risk flag states the reason and the playbook rule it relies on.
- Lawyers approve every redline; their edits are saved as evaluation data.
Common mistakes
- Missing clauses that are absent (no liability cap) rather than badly worded.
- Splitting clauses wrongly because of numbering or tables in the PDF.
- Sending confidential contracts to services without proper data agreements.
What to measure
- Review time per contract
- Agreement with lawyer flags
- Share of redlines accepted unchanged
- Missed high-risk clauses
Most-asked interview questions
Subjective questions 32
1Design a contract review assistant with LangChain.Asked almost every time
Parse the contract into clauses with layout-aware extraction, classify each clause by type (liability, indemnity, termination, IP, confidentiality), compare each against the company's playbook positions retrieved by clause type, flag deviations with risk levels, check for missing required clauses, and draft redlines and explanations for a lawyer to accept, edit or reject.
2How do you compare a clause with the playbook reliably?Asked almost every time
Retrieve the playbook entry for that clause type (preferred position, acceptable fallbacks, red lines), ask the model for a structured comparison citing the contract text, and use code checks for numeric terms such as liability caps, notice periods and governing law.
3How do you make sure no clause is overlooked?Asked almost every time
Process the contract clause by clause with full coverage tracking, reconcile the list of extracted clauses with the document's headings and numbering, and run a separate missing-clause check against the required list.
4How do you catch clauses that are missing from a contract?Very often asked
Keep a checklist of required clause types from the playbook and check that each one is present. Report 'not found' explicitly. Absence (no limitation of liability, no data-protection terms) is often the biggest risk and will not appear in a clause-by-clause review.
5How do you extract numeric terms accurately?Very often asked
Use structured output for values (caps, durations, percentages, currencies), validate formats in code, cross-check against definitions sections, and highlight the source text for every extracted value.
6How do you handle definitions and cross-references?Very often asked
Extract the definitions section first, resolve defined terms when analysing clauses, follow cross-references (for example 'subject to Section 9.2'), and include the referenced text in the comparison context.
7How do you keep client contracts confidential?Very often asked
Use models and providers under data agreements with no training on inputs, encrypt documents, restrict access by matter, keep data in required regions, and log every access.
8How do you measure the assistant's quality?Very often asked
Compare flagged issues with lawyers' reviews on a labelled set (precision and recall of issues), track acceptance rates of suggested redlines, time saved per contract, and missed-issue reports.
9How are lawyers' edits used to improve the system?Very often asked
Store accepted, edited and rejected suggestions with reasons, turn recurring edits into playbook updates or prompt examples, and add disagreements to the evaluation set.
10How do you produce redlines in Word?Very often asked
Generate tracked changes and comments in the DOCX with a document library, anchored to the original paragraphs, so lawyers work in their usual tool.
11How do you handle very long contracts and amendments?Very often asked
Split by clauses and sections, process in parallel, link amendments to the clauses they modify, and maintain a consolidated view of the current terms.
12How do you structure the review output so lawyers can work through it quickly?Very often asked
Lead with a summary of blockers and high-risk deviations, then list each clause with its playbook position, the contract text, the deviation, risk level and a suggested redline. Link every item to its location in the document and let the lawyer accept, edit or dismiss it.
13How do you review a contract on the other side's paper?Very often asked
Map their clauses to your clause library by meaning rather than heading, since numbering and titles differ, flag clauses with no match as unusual, and apply your playbook positions to the mapped clauses.
14How do lawyers' edits improve the system?Often asked
Each accepted, changed or rejected redline is labelled data. Store them as LangSmith dataset examples, measure the agreement rate of new prompt or model versions against them, and add the hardest cases to regression tests.
15What is a negotiation playbook?Often asked
A company's agreed positions for each clause type: the preferred wording, acceptable fallbacks and walk-away points, with who can approve exceptions. It makes reviews consistent and gives the model a concrete standard to compare against.
16What is a risk scoring rubric for clauses?Often asked
A defined scale (for example low, medium, high, blocker) tied to playbook rules: within preferred position is low, acceptable fallback is medium, outside fallbacks is high, red-line violation is a blocker.
17How do you deal with jurisdiction differences?Often asked
Keep playbook variants by governing law and contract type, detect the governing law clause first, and retrieve the matching variant for comparisons.
18How do you avoid giving legal advice inappropriately?Often asked
Position the assistant as a review aid for qualified lawyers, include disclaimers, keep final judgments with lawyers and avoid sending outputs directly to counterparties.
19How do you support negotiation history?Often asked
Store each version of the contract and the positions taken, so the assistant can show what changed between drafts and what was already conceded.
20How do you handle scanned contracts?Often asked
OCR with layout detection, verify quality on key sections, flag low-confidence text for manual review, and keep page references for citations.
21How do you test playbook updates?Often asked
Rerun the evaluation set of contracts after each playbook change, compare flagged issues before and after, and have the legal owner approve changes.
22What output format helps lawyers most?Often asked
A summary of key risks first, then clause-by-clause findings with the contract text, playbook position, deviation, risk level and suggested redline, each linked to the document location.
23How do you handle obligations tracking after signing?Often asked
Extract obligations, dates and renewal terms into a contract management system, and set reminders for notice periods and renewals.
24How do you handle governing law and dispute resolution clauses?Often asked
Extract the chosen law, courts or arbitration seat and rules, compare with the playbook's acceptable options for the deal type and counterparty location, and flag combinations that make enforcement costly or uncertain.
25How do you detect auto-renewal and notice traps?Often asked
Extract renewal terms, notice periods and the method of notice, calculate the last date to give notice from the term dates, flag short or unusual notice windows, and push the deadline to the obligation tracker after signing.
26How do you compare two versions of a contract during negotiation?Often asked
Run a structural diff at clause level as well as a text diff, so moved or renumbered clauses are matched, then summarise which positions changed, which were accepted and which new risks the counterparty introduced.
27How do you measure time saved for the legal team?Often asked
Track review time per contract type before and after rollout, the share of contracts handled without escalation to senior lawyers, and turnaround time to first comments, while monitoring quality through sampled second reviews.
28What is an indemnity clause?Sometimes asked
A promise by one party to cover the other's losses from specified events, such as third-party IP claims; its scope and caps are key negotiation points.
29What is a limitation of liability clause?Sometimes asked
It caps the amount and types of damages a party can claim, often excluding indirect losses and setting a cap tied to contract value.
30How do you roll out the assistant in a legal team?Sometimes asked
Start with high-volume standard contracts like NDAs, compare with lawyer reviews, collect feedback, and expand to complex agreements once accuracy is proven.
31Why keep a clause library?Sometimes asked
Approved standard clauses let the assistant suggest consistent replacement language and speed up negotiations.
32How do you handle contracts in several languages?Sometimes asked
Detect the language, review in the original using a model strong in that language, provide translations of flagged clauses for the reviewing lawyer, and note that the original language version governs unless the contract says otherwise.
Objective questions 32
1Suggested redlines become final only when…Asked almost every time
Why: Legal judgement stays with lawyers.
2How are numeric terms like liability caps checked?Asked almost every time
Why: Numbers need exact checks.
3What catches missing clauses?Asked almost every time
Why: Absences are easy to miss.
4What should each clause be compared with?Very often asked
Why: The playbook defines what is acceptable for this company.
5What should be extracted before analysing clauses?Very often asked
Why: Defined terms change meaning.
6Lawyers' accepted and rejected suggestions should…Very often asked
Why: The system learns from experts.
7Which metric shows review quality?Very often asked
Why: Compared with lawyer reviews.
8Redlines are most useful as…Very often asked
Why: Word is the lawyers' usual tool.
9Playbook variants are chosen by…Very often asked
Why: Detect governing law first.
10A blocker risk level means…Very often asked
Why: Must be fixed before signing.
11The review output should start with…Very often asked
Why: Lawyers need the biggest risks first.
12Clauses on the other side's paper are matched by…Very often asked
Why: Headings and numbering differ between drafts.
13Who approves suggested redlines?Often asked
Why: Legal responsibility stays with the lawyer.
14Which risk does a clause-by-clause review easily miss?Often asked
Why: Missing clauses need an explicit checklist.
15Cross-references like 'subject to 9.2' require…Often asked
Why: Context changes meaning.
16Confidential contracts need…Often asked
Why: Client confidentiality.
17Scanned contracts with low OCR confidence should be…Often asked
Why: Bad text means bad analysis.
18What should appear first in the output?Often asked
Why: Lawyers prioritise quickly.
19Negotiation history helps by showing…Often asked
Why: Compare draft versions.
20After signing, obligations and dates go to…Often asked
Why: Avoid missed renewals.
21How should playbook changes be tested?Often asked
Why: Compare flags before and after.
22What does an indemnity clause do?Often asked
Why: Scope and caps matter.
23An auto-renewal clause requires tracking…Often asked
Why: Missing the notice window renews the contract.
24Version comparison during negotiation should be…Often asked
Why: Moved clauses would otherwise look deleted.
25Governing law clauses are checked against…Often asked
Why: Jurisdiction affects cost and enforceability.
26Time savings should be measured alongside…Often asked
Why: Faster reviews must not miss risks.
27Where should a rollout start?Sometimes asked
Why: Prove accuracy first.
28A clause library provides…Sometimes asked
Why: Consistent replacements.
29Amendments should be…Sometimes asked
Why: Keep a consolidated view.
30The assistant should be positioned as…Sometimes asked
Why: Avoid unauthorised legal advice.
31Limitation of liability clauses usually…Sometimes asked
Why: A key negotiation point.
32For a contract in Spanish, flagged clauses should be…Sometimes asked
Why: The original text usually governs.
Track your progress through every blueprint in your dashboard.
Start learning