Legal and professional services · Playbook 35

Contract review and clause extraction

Every contract in the data room read, its key clauses pulled out and compared with your playbook, and a draft review note ready for a solicitor. The solicitor checks, decides and owns the advice.

  • Document AI
  • Retrieval (RAG)
  • Human in the loop
  • SRA Standards and Regulations
  • Legal professional privilege
  • UK GDPR

At a glance

The problem
Associates read thousands of contracts line by line to find a few dozen clauses that matter
Typical volume
Data rooms of 2,000–10,000 documents, plus around 600 incoming commercial contracts a month
Who's involved
Corporate and commercial partners, associates, knowledge lawyers, risk and compliance (COLP), IT, data protection
Pilot
8–10 weeks on two or three closed matters, after a 3–4 week discovery
Platforms
AWS, Azure, or a sovereign or on-prem stack

An illustrative scenario. The numbers are typical examples, not a client case study. The cloud services and UK rules were checked on 9 November 2026.

The business problem

On a typical acquisition, the buyer's lawyers get access to a virtual data room holding thousands of documents: customer and supplier contracts, leases, employment contracts, licences and side letters, many of them scanned. Junior lawyers read each one, looking for the clauses that matter to the deal: change of control, assignment, exclusivity, termination rights, liability caps, governing law. They copy what they find into a spreadsheet, and a senior lawyer turns the spreadsheet into a due diligence report.

The same work happens every day outside deals. An in-house team, or a firm acting for a large client, reviews incoming supplier and customer contracts against an agreed negotiation playbook: which positions are acceptable, which need escalating, and which are never accepted. Most of the time goes on finding the clause, not on judging it.

It is slow and it is hard to do consistently at 2am before a signing. Clients increasingly expect fixed fees for due diligence, so the hours spent finding clauses come straight out of the margin. And the risks are real: a missed change-of-control clause can cost the client a key customer, and a careless choice of tool can breach client confidentiality or put privilege at risk.

What AI changes

  • Every document in the data room is read, classified and checked for missing pages or unreadable scans within hours of access being granted.
  • The clauses on your checklist are extracted into a structured table, each one linked to the page and paragraph it came from.
  • Each clause is compared with the firm's or client's playbook, and deviations are flagged with the playbook position they depart from.
  • A draft review note and a draft report section are prepared for the associate to check, edit and finish.
  • The AI only ever sees the documents of the matter it is working on. Ethical walls and matter access are enforced by the platform, not by the prompt.
  • A solicitor reviews every flag and every draft, decides what it means for the client, and owns the advice. Nothing goes to the client without them.

How success is measured

Agree these, and measure the baseline, before anything is built. Example targets are typical, not promises.

Time to first-pass review

How long from data room access to a complete clause table the team can work from.

ExampleFrom two weeks to three days

Missed clause rate

Clauses the AI failed to find, measured against a lawyer-marked sample from each matter. The measure that matters most.

ExampleAgreed per clause type, checked every matter

Every flag cited

Share of extracted clauses that link to the exact page and paragraph in the source document.

ExampleEvery one

Override rate

How often lawyers change the AI's extraction or its deviation flag. Very high means it isn't helping; near zero can mean nobody is checking.

ExampleStable, and reviewed per matter

Fixed-fee margin

Recovery on fixed-fee due diligence and contract review work.

ExampleMeasured against last year

Access outside the matter

Any retrieval of a document by a user or agent not on that matter's team.

ExampleZero, tested before every release

UK regulation and controls

Cross-sector rules are on the UK regulation map.

  • SRACode of Conduct for Solicitors 3.2 and 3.5; Code of Conduct for Firms 2.1, 4.3 and 4.4

    The service must be competent, and supervisors remain accountable for work done through others, including work done with AI. Every extraction and every draft note is reviewed by a lawyer, and the supervising solicitor signs off the report. The firm's governance, systems and controls cover the AI like any other risk, with the COLP involved from discovery.

  • SRAConfidentiality (paragraph 6.3) and the warning notice on misuse of AI (17 August 2026)

    Client information only goes into an AI system with contractual, technical and organisational safeguards: data processed in the UK, never used to train a model, never kept longer than the matter needs, and never reachable by anyone outside the matter. Public chatbots are blocked for client work. The SRA's notice restates existing duties; it doesn't create new ones.

  • SRAConflicts and ethical walls (paragraph 6.5)

    Where the firm holds confidential information for another client, it may only act if effective measures leave no real risk of disclosure. A shared search index across matters would break that. Each matter has its own index and encryption key, and the platform checks the firm's matter-security records on every retrieval.

  • CourtsLegal professional privilege

    Privilege depends on confidentiality. Data room documents and the firm's review notes stay in an environment the firm controls, open only to the matter team, with a log of who and what saw each document. Putting client documents into a public AI tool risks losing both confidentiality and privilege.

  • Law Society and the courtsGenerative AI guidance for solicitors, and the courts' warnings on unchecked AI output

    The Law Society's guidance and the judiciary's AI guidance both say the lawyer stays responsible for anything produced in their name. In 2025 the High Court warned that putting fictitious AI-generated material before a court can lead to referral to the regulator or contempt proceedings, and that firm leaders are expected to have controls in place. Every clause in a report is checked against the source page.

  • ICOUK GDPR and the Data Protection Act 2018

    Data rooms hold personal data, often employment contracts with salaries and sometimes health or disciplinary records. That means a DPIA before the pilot, clear controller and processor roles, processing in the UK, retention tied to the matter file, and checking the data room terms and NDA for any limits on how documents may be processed.

The solution

Showing AWSAzuresovereign / on-prem services. Switch with the toggle; every diagram and table on this page follows it.

Contract review and clause extraction: reference architecture
  1. 01Channels

    • Virtual data room export
    • Client contract uploads
    • Counterparty drafts by email
  2. 02Intake

    • API GatewayAPI ManagementKong, or your existing API gatewayMatter-scoped API
    • Amazon S3 with a KMS key per matterBlob Storage with a key per matterCeph, or IONOS S3 Object StoragePer-matter document store
    • Amazon Verified PermissionsEntra ID groupsKeycloak, or your existing Active DirectoryMatter access check
  3. 03Intelligence

    • Amazon TextractContent Understanding (Document Intelligence)Docling plus an open-weight vision modelRead contracts
    • Bedrock Knowledge BasesFoundry IQ (Azure AI Search)OpenSearch, or PostgreSQL with pgvectorPlaybook and precedents
    • Agent
      Bedrock AgentCoreFoundry Agent ServiceLangGraph on KubernetesData room triage agent
    • Agent
      Bedrock AgentCoreFoundry Agent ServiceLangGraph on Kubernetes, with open-weight models via vLLMClause review agent
  4. 04Orchestration

    • Step FunctionsLogic Apps / Durable FunctionsTemporalReview workflow
    • EventBridge + SQSEvent Grid + Service BusApache Kafka or RabbitMQEvents and queues
  5. 05Systems of record

    • Document management system
    • Practice and matter management
    • Ethical walls and matter security
  6. 06People

    • Person
      Associate: checks every flag
    • Person
      Supervising solicitor: signs off
    • Person
      Knowledge lawyer: owns the playbook
  • Cloud or platform service (AWSAzuresovereign / on-prem)
  • AI agent
  • A person decides
  • Your existing systems
  • Outside your organisation

Components, side by side

Contract review and clause extraction: components on AWS, Azure and a sovereign or on-prem stack
LayerAWSAzureSovereign / on-prem
Intake: data room exports and uploadsOne store and one encryption key per matter. Closing a matter destroys the key, not just the files.API Gateway, S3API Management, Blob StorageKong or your existing API gateway; Ceph or IONOS S3 Object Storage
Reading documentsTest on the worst of the data room: faxed amendments, handwritten side letters, tables of rates.Amazon TextractAzure Content Understanding (includes Document Intelligence)Open-source parsing (e.g. Docling) plus an open-weight vision model
Extraction and draftingBoth clouds offer a choice of models, including Claude. Extraction is checked against a lawyer-marked sample for each clause type.Amazon BedrockMicrosoft FoundryOpen-weight models served with vLLM on your own GPUs, or IONOS AI Model Hub
Playbook and precedents (retrieval)The negotiation playbook and approved precedents in one index; each matter's documents in their own. Never one index across matters.Bedrock Knowledge BasesFoundry IQ, built on Azure AI SearchOpenSearch, or PostgreSQL with pgvector
Agent runtimeThe original Bedrock Agents closed to new customers on 30 July 2026; new builds use AgentCore.Amazon Bedrock AgentCoreFoundry Agent ServiceAn open-source agent framework (e.g. LangGraph) on Kubernetes
Matter access and ethical wallsYour existing wall system stays the source of truth. The platform checks it on every retrieval, for people and agents alike.Amazon Verified Permissions, fed from your matter-security systemEntra ID groups and search security filters, fed from your matter-security systemKeycloak or Active Directory groups, fed from your matter-security system
WorkflowAWS Step FunctionsLogic Apps or Durable FunctionsTemporal, or n8n
Middleware and eventsAmazon EventBridge, SQSEvent Grid, Service BusApache Kafka or RabbitMQ
Link to the document management systemDrafts are filed to the matter workspace as drafts, with the matter's existing security.API Gateway, plus your existing integration platform if you have oneAPI Management, plus your existing integration platform if you have oneKong or your existing API gateway, plus your existing integration platform if you have one
Human reviewLawyers check flags side by side with the source page, where they already work.In the lawyers' existing document and review toolsIn the lawyers' existing document and review toolsIn the lawyers' existing document and review tools
GuardrailsEvery extracted clause must quote its source text. A flag without a citation is rejected.Bedrock GuardrailsFoundry guardrails (Azure AI Content Safety)Open-source guardrails (e.g. NeMo Guardrails, Llama Guard)
Identity, keys, data protectionIAM Identity Center, KMS, MacieEntra ID, Key Vault, PurviewKeycloak or your existing Active Directory; OpenBao or HashiCorp Vault; an HSM
Monitoring and auditLog every document read, every retrieval, every flag and every lawyer's decision, by matter.CloudWatch, CloudTrailAzure Monitor, Log AnalyticsPrometheus, Grafana, OpenTelemetry
UK data residencyIONOS AI Model Hub runs in German data centres: EU, not UK, residency. Some clients' terms require UK-only processing.eu-west-2 (London)UK South / UK WestYour own UK data centre, or a UK or EU provider

On a phone, the table shows the platform you pick. Sovereign / on-prem means open, portable components you can run in your own data centre or with a UK or European provider; IONOS is shown as one example, and others exist. What sovereign cloud means →

Hybrid and on-prem

Many organisations keep core systems and sensitive data on their own servers. This is how the same design works across both.

Stays on-prem

The document management system, the matter management system and the ethical wall records stay where they are. Many firms run these on their own servers, and the most sensitive matters can stay entirely on the firm's own GPUs.

Uses cloud AI

Document reading, extraction and drafting can run in a UK cloud region for most matters, under a contract that rules out training and limits retention. A matter can be marked on-prem only, and its documents never leave the firm's estate.

How they connect

A private link (AWS Direct Connect or Azure ExpressRoute) and the API layer. Each request carries the matter number, and the platform checks matter access before anything is read or returned.

If the link drops

The lawyers carry on reviewing in the document management system, exactly as before. Queued documents are processed when the link returns, and the review deadline is watched by a person, not the pipeline.

The agents

What each agent may do through its tools, what it may not, and where a person signs off. The limits are enforced by the platform, not the prompt.

Data room triage agent

May do

  • Read every document in the matter's data room export
  • Classify each document by type and counterparty
  • Flag duplicates, missing pages, unsigned copies and unreadable scans
  • Build the index the review team works from

May not do

  • Read documents from any other matter
  • Request documents from the seller or raise a data room question
  • Decide that a document is out of scope
  • Send anything outside the matter workspace

Where a person signs offAn associate confirms the index and the list of gaps before the review starts. Questions to the other side are raised by the lawyers.

Clause review agent

May do

  • Extract the clauses on the matter's checklist, quoting the source text and page
  • Compare each clause with the playbook and flag deviations
  • Look up the firm's approved precedents and playbook notes
  • Draft a review note and a report section, marked as a draft

May not do

  • Read documents outside its matter, or anything behind an ethical wall
  • Mark a document as reviewed or clear a red flag
  • Give advice, or send anything to the client or the counterparty
  • Change the playbook or the precedents

Where a person signs offThe associate checks every flag against the source page, and the supervising solicitor signs off the report and owns the advice. The agent's permissions are enforced by the platform's identity and policy controls, not by instructions in a prompt.

Middleware and integration

The document management system stays the record. The AI reads from a matter-scoped export and files drafts back into the matter workspace, through the API layer and with the matter's existing security. It never becomes a second, less protected copy of the client's documents.

Matter access is checked on every call. The ethical wall system publishes changes as events, so when someone is walled off a matter, the AI stops returning that matter's documents to them within minutes, not at the next nightly sync.

Events keep the AI decoupled. Each document becomes a message on a queue with an ID, so a retry never creates a duplicate entry in the clause table. If the AI is paused, the review carries on by hand, exactly as it did before.

Process and people

  • A supervising solicitor named on every matter that uses the AI, who signs off the report.
  • A knowledge lawyer who owns the playbook and checklist, with change control and a re-test when either changes.
  • A lawyer-marked sample on every matter, to measure missed clauses before anyone relies on the table.
  • Matter intake checks: the engagement letter, the client's AI terms and the data room NDA allow this kind of processing.
  • A clear rule that public AI tools are never used for client documents, backed by technical blocks, not just policy.
  • Lawyers trained before go-live, including what the AI misses: context outside the document, and clauses phrased in unusual ways.

Delivery plan

  1. 3–4 weeks

    Discovery

    Map today's review process, measure the baseline on recent matters, agree the clause checklist, check client terms and the wall system, and involve the COLP and DPO.

  2. Gate · must be true to passBaseline agreed, wall integration confirmed, DPIA started, client-terms position agreed.

  3. 8–10 weeks

    Pilot

    Two or three closed matters, in shadow mode: the AI reviews documents the team has already reviewed, and the two are compared clause by clause.

  4. Gate · must be true to passMissed clause rate within agreed limits, zero access outside the matter in testing, COLP and partner sign-off.

  5. 4–6 weeks

    Production

    Live matters in one practice group, with a lawyer-marked sample on each, monitoring and a rollback plan.

  6. Gate · must be true to passMonitoring, support, rollback plan and lawyer training in place.

  7. Ongoing

    Scale

    Add clause types and practice groups one at a time: real estate, finance, then in-house contract intake.

  8. Gate · must be true to passEach new clause type passes the same sample test.

Roles and RACI

Who is responsible, accountable, consulted and informed, by activity
ActivityPractice group partnerKnowledge lawyerSolutions architectI can fill thisTechnical PMI can fill thisEngineersI can fill thisCOLP & DPOSecurityI can fill this
Business case and pricing impactAccountableConsultedConsultedConsultedInformedConsultedInformed
Clause checklist and playbookAccountableResponsibleConsultedInformedConsultedConsultedInformed
Target architecture and wall integrationInformedConsultedAccountable and ResponsibleConsultedConsultedConsultedConsulted
DPIA, client terms and SRA complianceConsultedConsultedConsultedInformedInformedAccountable and ResponsibleConsulted
Build and integrationInformedConsultedAccountableResponsibleResponsibleInformedConsulted
Accuracy testing on closed mattersAccountableResponsibleConsultedResponsibleResponsibleConsultedInformed
Go-live decisionAccountableConsultedConsultedResponsibleInformedConsultedConsulted
Run, monitor and improveConsultedAccountableConsultedConsultedResponsibleConsultedConsulted

Business case and pricing impact

Practice group partner
A · Accountable
Knowledge lawyer
C · Consulted
Solutions architect
C · Consulted
Technical PM
C · Consulted
Engineers
I · Informed
COLP & DPO
C · Consulted
Security
I · Informed

Clause checklist and playbook

Practice group partner
A · Accountable
Knowledge lawyer
R · Responsible
Solutions architect
C · Consulted
Technical PM
I · Informed
Engineers
C · Consulted
COLP & DPO
C · Consulted
Security
I · Informed

Target architecture and wall integration

Practice group partner
I · Informed
Knowledge lawyer
C · Consulted
Solutions architect
A/R · Accountable and Responsible
Technical PM
C · Consulted
Engineers
C · Consulted
COLP & DPO
C · Consulted
Security
C · Consulted

DPIA, client terms and SRA compliance

Practice group partner
C · Consulted
Knowledge lawyer
C · Consulted
Solutions architect
C · Consulted
Technical PM
I · Informed
Engineers
I · Informed
COLP & DPO
A/R · Accountable and Responsible
Security
C · Consulted

Build and integration

Practice group partner
I · Informed
Knowledge lawyer
C · Consulted
Solutions architect
A · Accountable
Technical PM
R · Responsible
Engineers
R · Responsible
COLP & DPO
I · Informed
Security
C · Consulted

Accuracy testing on closed matters

Practice group partner
A · Accountable
Knowledge lawyer
R · Responsible
Solutions architect
C · Consulted
Technical PM
R · Responsible
Engineers
R · Responsible
COLP & DPO
C · Consulted
Security
I · Informed

Go-live decision

Practice group partner
A · Accountable
Knowledge lawyer
C · Consulted
Solutions architect
C · Consulted
Technical PM
R · Responsible
Engineers
I · Informed
COLP & DPO
C · Consulted
Security
C · Consulted

Run, monitor and improve

Practice group partner
C · Consulted
Knowledge lawyer
A · Accountable
Solutions architect
C · Consulted
Technical PM
C · Consulted
Engineers
R · Responsible
COLP & DPO
C · Consulted
Security
C · Consulted

R ResponsibleA AccountableC ConsultedI Informed· not involved

Where I'd fit

Option A

Lead the architecture

If there's no architect on the programme, I'd own the design end to end: matter-scoped storage and retrieval, the link to your document management and wall systems, the extraction pipeline and the gates. I'd work closely with your COLP and knowledge lawyers, and report to your programme board.

Option B

Support your architect

If your partner or your own team already has an architect, I'd take on the document pipeline, the matter access controls and the integration under their lead, and give them a second senior opinion on confidentiality and security.

Where this goes wrong

  1. Goes wrong

    One search index for the whole firm, so a lawyer behind an ethical wall can retrieve the other side's documents.

    How the design avoids it

    An index and a key per matter, and the wall system checked by the platform on every retrieval.

  2. Goes wrong

    The clause table is trusted before anyone has measured what it misses.

    How the design avoids it

    A lawyer-marked sample on every matter, and the missed clause rate reported to the supervising solicitor.

  3. Goes wrong

    A flag without a source, so lawyers can't check it quickly and stop checking at all.

    How the design avoids it

    Every extraction quotes the source text and links to the page. No citation, no flag.

  4. Goes wrong

    The data room NDA or the client's terms didn't allow this processing, and nobody checked.

    How the design avoids it

    Client terms and data room terms checked at matter intake, with an on-prem-only option for matters that need it.

  5. Goes wrong

    Associates paste documents into public AI tools because the approved route is slower.

    How the design avoids it

    Make the approved route the quickest one, and block public tools for client work.

On the horizon

Changes already announced or under way that affect this design. More in the UK horizon scan.

  1. April–September 2027
    The SRA's revised Statement of Solicitor Competence (consultation closes 3 December 2026) is expected to add technology and AI to the existing competences, including checking AI output and supervising others' use of it.

    Keep training records and supervision logs that show lawyers can check and challenge the AI's output, not just use it.

  2. 2026–2027
    The ICO's statutory code of practice on AI and automated decision-making, required since May 2026.

    Keep the DPIA, the processing records and the retention rules for data room personal data in a form you could show the ICO.

  3. 2026–2027
    The Legal Services Board's AI plan for 2026/27: coordination across the legal regulators, and sandbox testing of legal AI through the government's AI Growth Lab.

    Keep the accuracy testing evidence from the pilot. Regulators and clients will increasingly ask how you know the tool works.

  4. 2028
    The NCSC's post-quantum cryptography milestone: a full migration plan by 2028.

    Privileged documents stay sensitive for decades. Record which encryption protects each matter store and keep it easy to change.

Questions to ask your partner or vendor

Good answers are specific. Vague answers to any of these are worth following up.

Copy them into your next supplier meeting

  1. How is an ethical wall enforced inside the search index, and how quickly does a wall change take effect?
  2. How will we measure what the AI misses on our own matters, not on a supplier's benchmark?
  3. Where are client documents processed and stored, for how long, and is any of it used to train a model?
  4. What happens to a matter's documents and index when the matter closes?
  5. Who owns the playbook, the checklist and the test sets after you leave?
  6. What does it cost to run per thousand documents, at our volume?

Planning something like this?

Whether you need someone to lead the design or to support the architect you already have, let's talk it through.

Sam Naseem
Sam NaseemBirmingham, UK · UK & Europe
Available now