Contract Review With AI: Issue Spotting That Leads to a Better Conversation With Your Lawyer
Back to Blog
Business· 10 min read

Contract Review With AI: Issue Spotting That Leads to a Better Conversation With Your Lawyer

A careful way to use AI as a first reading of a contract: split it into numbered sections, ask for issues with exact quotes, verify every quote in code, and send a short question list to a lawyer. Includes a tested Python sketch on an invented NDA. It spots issues and gives no legal conclusions.

ML
By Mneme Labs
NEPA AI · Building autonomous systems for creators and businesses
#contracts#issue spotting#document review#legal workflow#ai-agents

A contract is a document you are about to be bound by, and most of the cost of reading it is attention. Models can help with attention. They can point to the places in a long agreement that deserve a slower read, and they can turn a dense clause into plain words. They cannot tell you what a clause means in law, whether it is enforceable where you live, or whether you should sign. That is a lawyer's job, and the point of this guide is to make that conversation shorter and better informed, not to replace it.

The workflow below produces an issue sheet: a short list of places in the contract with exact quotes, a plain-language note on why each might matter, and a question to ask. It uses an invented mutual NDA and synthetic findings. Nothing here is legal advice, and no speed or savings figure is claimed, since contracts and lawyers differ widely.

Decide what you are asking for

"Review this contract" is too vague to check. Narrow it to questions that have a locatable answer in the text. For a simple agreement such as an NDA or a service agreement, a short checklist covers most of what a non-lawyer wants flagged:

  • Who are the parties, and what exactly does the agreement cover?
  • How long does it last, and does it renew by itself?
  • How can each side end it, and with how much notice?
  • What does each side pay, and when?
  • Who is responsible if something goes wrong, and is there a cap?
  • Who owns the work or the information?
  • Can either side hand the agreement to someone else?
  • Which law and which courts apply?

Add the things your business cares about. A freelancer may care about payment terms. A company sharing a product plan may care about how long confidentiality lasts. Writing your own list first makes the output yours and not a generic summary.

Handle confidentiality before you paste anything

A contract often contains information that you or the other side have agreed to keep private. Before sending one to any model, check three things. Does the contract itself restrict sharing it? Does your agreement with the other party allow disclosure to service providers? And what does your AI provider do with the text?

Provider terms differ and change, so read yours. As one example, Anthropic's page on API and data retention says retained data is never used for model training without express permission, that conversation content is not retained by default except for certain models that require 30-day retention, and that zero data retention is available for eligible features under a specific arrangement. Other providers and consumer chat products work differently. The UK judiciary's AI guidance for judicial office holders, updated in October 2025, reminds judges not to enter private information into public AI tools. A business does not follow that guidance, but the caution transfers. Redaction can reduce what you share, but it does not by itself give you permission to disclose a contract. The remaining terms can still be confidential, and removed details are sometimes easy to infer. If you cannot establish that you may share the text, or cannot establish how your provider retains it, do not upload the contract. Use a qualified reviewer, such as a lawyer, instead.

Split the contract, then ask for quotes

Models handle long documents better when you give them structure and ask for evidence. Split the text into numbered sections first, so every finding can point to a location. Then ask for issues in a fixed form: the section number, an exact quote from that section, and a short plain-language note. Tell the model to say "not found" when a topic is absent from the text instead of describing what contracts usually say.

Some model APIs can return the exact passages that support each part of an answer. Anthropic's citations feature is described as returning the passages behind each claim so that you can track and verify sources. That helps, and you should still verify. Whether you use such a feature or a plain prompt, run your own check that each quote really appears in the section it names. An empty quote is rejected outright, because an empty string sits inside every section and would otherwise pass.

The splitter supports one layout: plain text where each section starts a line with a number and a period, such as 3. Term. or 4.2. Fees.. Lines that continue a clause are joined to the section above. If the same number starts two sections, it raises a ValueError and does not silently keep one copy. A line inside a paragraph that happens to begin with a number and a period can be mistaken for a heading, and the duplicate check often exposes that. Scanned pages, tables, two column layouts and exhibits need a different parser and a person comparing the split with the original.

The Python sketch below does three small jobs on an invented NDA. It splits numbered sections, runs an independent pattern scan for words that often mark clauses worth a read, and checks each model-proposed quote against the section cited.

import re

SECTION_START = re.compile(r"^(\d+(?:\.\d+)*)\.\s+\S")

FLAG_PATTERNS = {
    "auto_renewal": r"automatically\s+renew",
    "unlimited_liability": r"unlimited\s+liability|without\s+(?:any\s+)?limit",
    "indemnity": r"indemnif",
    "assignment": r"\bassign",
    "governing_law": r"governed\s+by",
}


def split_sections(text: str) -> dict:
    """Supports plain text where each section starts a line with a number and a period.

    Raises ValueError if a section number repeats, because keeping only one copy
    would let a quote check pass against the wrong clause.
    """
    sections, current = {}, None
    for line in text.splitlines():
        line = line.strip()
        m = SECTION_START.match(line)
        if m:
            current = m.group(1)
            if current in sections:
                raise ValueError(
                    f"Duplicate section number {current!r}. This splitter reads plain "
                    "numbered lines such as '3. Term.' with each number used once. "
                    "Scanned or complex layouts need a different parser and a human check.")
            sections[current] = line
        elif current and line:
            sections[current] += " " + line
    return sections


def norm(s: str) -> str:
    return re.sub(r"\s+", " ", s).strip().lower()


def scan_flags(sections: dict) -> list:
    return [(name, num) for num, body in sections.items()
            for name, pat in FLAG_PATTERNS.items() if re.search(pat, body, re.I)]


def check_findings(findings: list, sections: dict) -> list:
    results = []
    for f in findings:
        raw = f.get("quote")
        if not isinstance(raw, str):
            status = "quote_missing"
        elif not norm(raw):
            # An empty string is contained in every text, so reject it first.
            status = "quote_empty"
        else:
            q = norm(raw)
            if q in norm(sections.get(f["section"], "")):
                status = "quote_verified_in_section"
            elif any(q in norm(b) for b in sections.values()):
                status = "quote_in_other_section"
            else:
                status = "quote_not_found"
        results.append({**f, "status": status})
    return results

On the invented six-section NDA, the splitter found sections 1 to 6, and the pattern scan flagged automatic renewal in section 3, indemnity and an unlimited-liability phrase in section 4, assignment in section 5 and governing law in section 6. Three sample model findings were then checked. The renewal quote was verified in section 3. An indemnity quote cited to section 3 was actually in section 4, so the check marked it as found in another section. A "mutual non-compete" quote was not in the text at all and was marked not found. Further test cases covered an empty quote, a whitespace-only quote, a finding with no quote, and two sections sharing a number. Each produced the intended status or error.

Table of three synthetic findings with cited section, quote check result and next step: keep, fix the citation, or discard
The quote check keeps, corrects or discards each finding. Synthetic results. Original Mneme Labs diagram.

Two limits matter here. The quote check proves only that the words are in the contract. It does not prove the model understood them, and a correct quote can sit beside a wrong explanation. And the pattern scan only finds words you thought to list, so it supports reading and never replaces it. A contract can create the same risk in words that match none of your patterns.

Turn the findings into an issue sheet

Keep the sheet short and honest. For each kept finding, record the section, the exact quote, a plain-language note, and a question. Write questions, not conclusions. "Is a 30 day notice window workable for us?" is a business question you can answer. "This clause is unenforceable" is a legal claim that a model has no standing to make. Avoid labels such as "high risk", which sound precise and are not. If you want to rank issues, rank by how much each one would hurt your business if it went wrong, and say that is your own judgment.

Also record what could not be assessed. If the contract refers to an attached schedule or another document that was not included, list that. If scanned pages came through as garbled text, list those pages. Missing context is a finding too.

Two row flow: permission and redaction check by a person, split into sections, model proposes issues, check quotes with a pattern scan, build the issue sheet, and a person decides
A person stands at both ends of the path. Original Mneme Labs diagram.

What a lawyer does with the sheet

A good use of the sheet is to hand it over with the contract. The lawyer still reads the whole agreement, since a model can overlook a clause and a lawyer is accountable for the advice. The sheet shows where you were worried and what you want to change, which may reduce the time they need to spend finding out. Whether it lowers your bill depends on the lawyer and the matter, so ask them. Some matters, such as a large deal, a lease, an employment dispute or anything involving regulated activity, warrant a lawyer reading from the start.

Failure cases to plan for

Invented clauses. The model describes a clause that is not in the contract. The quote check catches most of these. Human review is still needed and can also miss errors.

Quotes that are real but misread. The words are there, and the explanation is wrong. This is why the sheet asks questions and a person reads the clause.

Missed clauses. Nothing in the output says what the model did not flag. Read the contract's headings yourself so that you know what exists.

Cross-references. A clause that says "subject to section 12" may change meaning because of section 12. Ask for linked clauses together and read them as a set.

Defined terms. A word like "Affiliate" or "Confidential Information" can be defined pages earlier in a way that changes everything. Include definitions with each clause.

Bad scans. Optical character recognition errors can turn "not" into "now", and the splitter above does not read scanned layouts. Check the original for anything that matters.

Comparing to "market standard". A model cannot reliably say what is normal for your industry and place. If someone claims otherwise, ask for a source you can read.

Limits

This workflow does not review a contract for legality, tell you whether to sign, or predict how a court would read it. It does not replace a lawyer where the stakes, the money or the law call for one. Rules about who may give legal advice vary, and a business is responsible for its own decisions. The sources below describe AI risks in general and one provider's data practices. They do not make the workflow safe by themselves.

Next step

Take an old, signed NDA that you understand well. Split it, run the pattern scan, and ask a model for issues with quotes. Compare the issue sheet with what you know about that contract. Where it missed or invented things, add a note to your checklist, and only then try it on an unsigned agreement, alongside a lawyer. For a related workflow that produces contracts and proposals, see document generation with AI.

Sources