Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

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

Contract PDFvendor MSA01Parse & splitby clause02Company playbookretrieval03Clause reviewermodel04Risk flagred · amber · green05Suggestedredlines06Lawyer approves07LangSmith evalsvs. lawyer edits08clausesedits as data

How it works, step by step

  1. A vendor contract arrives as a PDF.
  2. It is parsed and split clause by clause: liability, termination, data protection, payment.
  3. For each clause the company's negotiation playbook is retrieved.
  4. A reviewer model compares the clause with the preferred and fallback positions.
  5. Each clause gets a red, amber or green flag with the reason.
  6. It proposes redlines in the playbook's own wording.
  7. A lawyer accepts or edits every change before it goes back to the vendor.
  8. 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
  1. AThe model is confident
  2. BThe counterparty signs
  3. CThe sales team agrees
  4. DA lawyer accepts themCorrect answer

Why: Legal judgement stays with lawyers.

2How are numeric terms like liability caps checked?Asked almost every time
  1. AStructured extraction validated in codeCorrect answer
  2. BBy the model's impression
  3. CNot at all
  4. DBy word count

Why: Numbers need exact checks.

3What catches missing clauses?Asked almost every time
  1. AHigher temperature
  2. BComparing against a required clause listCorrect answer
  3. CReading only the first page
  4. DAsking the counterparty

Why: Absences are easy to miss.

4What should each clause be compared with?Very often asked
  1. AThe longest clause
  2. BRandom internet contracts
  3. CThe company's playbook positionsCorrect answer
  4. DThe vendor's preferences

Why: The playbook defines what is acceptable for this company.

5What should be extracted before analysing clauses?Very often asked
  1. ANothing
  2. BThe definitions sectionCorrect answer
  3. CThe signature page only
  4. DThe footer

Why: Defined terms change meaning.

6Lawyers' accepted and rejected suggestions should…Very often asked
  1. ABe shared publicly
  2. BFeed playbook updates and evaluationsCorrect answer
  3. CBe deleted
  4. DBe ignored

Why: The system learns from experts.

7Which metric shows review quality?Very often asked
  1. AToken count
  2. BFont size
  3. CPrecision and recall of flagged issuesCorrect answer
  4. DNumber of pages

Why: Compared with lawyer reviews.

8Redlines are most useful as…Very often asked
  1. ATracked changes in WordCorrect answer
  2. BPlain text emails
  3. CScreenshots
  4. DSpreadsheets

Why: Word is the lawyers' usual tool.

9Playbook variants are chosen by…Very often asked
  1. AContract length
  2. BFont
  3. CDate only
  4. DGoverning law and contract typeCorrect answer

Why: Detect governing law first.

10A blocker risk level means…Very often asked
  1. AA typo
  2. BPreferred position met
  3. CA missing page number
  4. DA red-line position is violatedCorrect answer

Why: Must be fixed before signing.

11The review output should start with…Very often asked
  1. AFormatting issues
  2. BThe signature page
  3. CBlockers and high-risk deviationsCorrect answer
  4. DThe full contract text

Why: Lawyers need the biggest risks first.

12Clauses on the other side's paper are matched by…Very often asked
  1. AClause numbers
  2. BPage numbers
  3. CFont size
  4. DMeaning against the clause libraryCorrect answer

Why: Headings and numbering differ between drafts.

13Who approves suggested redlines?Often asked
  1. ANobody
  2. BThe vendor
  3. CA lawyerCorrect answer
  4. DThe model

Why: Legal responsibility stays with the lawyer.

14Which risk does a clause-by-clause review easily miss?Often asked
  1. ALong sentences
  2. BBold formatting
  3. CSpelling mistakes
  4. DA clause that is missing entirelyCorrect answer

Why: Missing clauses need an explicit checklist.

15Cross-references like 'subject to 9.2' require…Often asked
  1. AIncluding the referenced textCorrect answer
  2. BIgnoring them
  3. CDeleting the clause
  4. DGuessing

Why: Context changes meaning.

16Confidential contracts need…Often asked
  1. ASharing across clients
  2. BNo logs
  3. CNo-training data agreements and access controlsCorrect answer
  4. DPublic storage

Why: Client confidentiality.

17Scanned contracts with low OCR confidence should be…Often asked
  1. AFlagged for manual reviewCorrect answer
  2. BTrusted
  3. CDeleted
  4. DSummarised only

Why: Bad text means bad analysis.

18What should appear first in the output?Often asked
  1. AThe full contract text
  2. BModel settings
  3. CNothing
  4. DA summary of key risksCorrect answer

Why: Lawyers prioritise quickly.

19Negotiation history helps by showing…Often asked
  1. AToken usage
  2. BServer logs
  3. CWhat changed and what was concededCorrect answer
  4. DThe lawyer's salary

Why: Compare draft versions.

20After signing, obligations and dates go to…Often asked
  1. AThe model's memory
  2. BEmail drafts
  3. CA contract management system with remindersCorrect answer
  4. DThe trash

Why: Avoid missed renewals.

21How should playbook changes be tested?Often asked
  1. ASkip testing
  2. BAsk the model
  3. CDeploy directly
  4. DRerun the contract evaluation setCorrect answer

Why: Compare flags before and after.

22What does an indemnity clause do?Often asked
  1. AEnds the contract
  2. BSets the price
  3. CNames the parties
  4. DCovers the other party's specified lossesCorrect answer

Why: Scope and caps matter.

23An auto-renewal clause requires tracking…Often asked
  1. AThe signatory's email
  2. BThe document's file size
  3. CThe last date to give noticeCorrect answer
  4. DOnly the start date

Why: Missing the notice window renews the contract.

24Version comparison during negotiation should be…Often asked
  1. ABy page count
  2. BManual only
  3. CAt clause level as well as text levelCorrect answer
  4. DBy file size

Why: Moved clauses would otherwise look deleted.

25Governing law clauses are checked against…Often asked
  1. AThe contract's length
  2. BThe model's preference
  3. CThe playbook's acceptable optionsCorrect answer
  4. DThe counterparty's logo

Why: Jurisdiction affects cost and enforceability.

26Time savings should be measured alongside…Often asked
  1. AEmail volume
  2. BQuality from sampled second reviewsCorrect answer
  3. CNumber of pages printed
  4. DOffice hours

Why: Faster reviews must not miss risks.

27Where should a rollout start?Sometimes asked
  1. ALitigation
  2. BNowhere
  3. CHigh-volume standard contracts like NDAsCorrect answer
  4. DThe most complex deals

Why: Prove accuracy first.

28A clause library provides…Sometimes asked
  1. ABilling rates
  2. BCourt dates
  3. CApproved standard languageCorrect answer
  4. DModel weights

Why: Consistent replacements.

29Amendments should be…Sometimes asked
  1. AIgnored
  2. BTreated as new contracts only
  3. CDeleted
  4. DLinked to the clauses they modifyCorrect answer

Why: Keep a consolidated view.

30The assistant should be positioned as…Sometimes asked
  1. AA review aid for lawyersCorrect answer
  2. BA replacement for lawyers
  3. CA negotiator
  4. DA court

Why: Avoid unauthorised legal advice.

31Limitation of liability clauses usually…Sometimes asked
  1. ACap damages and exclude indirect lossesCorrect answer
  2. BRemove all liability
  3. CIncrease penalties
  4. DSet delivery dates

Why: A key negotiation point.

32For a contract in Spanish, flagged clauses should be…Sometimes asked
  1. AReviewed in the original with translations providedCorrect answer
  2. BTranslated and the original discarded
  3. CSkipped
  4. DReviewed only in English

Why: The original text usually governs.

Track your progress through every blueprint in your dashboard.

Start learning