Seven Billion AnalyticsContact Us

How Custom Legal AI Works for Law Firms

How Custom Legal AI Works for Law Firms

How Custom Legal AI Works for Law Firms

Ready to move from pilot to production?

Let's talk about where you are today — and how we can help you scale AI that actually delivers.

Book a Discovery Call

Custom legal AI is a system that answers and drafts from a firm’s own precedents, matter files and playbooks, and shows the source behind every statement. This article walks through how one actually works, step by step, from the moment a document goes in to the moment an attorney signs off. If you’re evaluating a build, our page on custom legal AI for law firms covers scope, security and how an engagement runs.

We build these systems, so this is the practitioner’s version: what happens at each step, where errors come from, and what the results looked like at the firms where we’ve measured them.

The short version

A general chatbot answers from whatever it absorbed in training. A custom legal system answers from your documents. When an associate asks a question, it first retrieves the relevant passages from the firm’s corpus, then writes an answer built only from those passages, with a numbered citation on each claim. If the corpus doesn’t support an answer, it says so. An attorney reviews the output before it goes anywhere. The technical name for the core pattern is retrieval-augmented generation, or RAG. We cover the background in what AI agents are.

Step 1: Your documents go in

The system ingests what the firm already has: briefs, memos, case law the firm has licensed or collected, contracts, matter files and playbooks, usually from SharePoint, iManage or a document store. Which repositories and matters go in is agreed with the firm during scoping.

Each matter becomes a workspace: its documents, its chats and its reviews in one place. Corpus condition matters more than size. Clean case law ingests quickly; twenty years of scanned matter files need cleanup first, and that work shows up in cost.

Step 2: The question is matched by meaning, not keywords

Associates type the question the way a partner would ask it. The system matches by meaning, so “who carries the risk if the platform leaks customer data” finds the indemnity and confidentiality clauses even when neither uses the word “leak”. This is also where the time savings come from. Westlaw and Boolean strings still work; they just aren’t the only route.

On an SEC EDGAR project, analysts had been writing 256-character Boolean strings that cost about three staff-hours a day. With plain-English search, queries ran 3.4x faster against a 3x target, and the interface scored 91 on the System Usability Scale.

Step 3: The answer quotes the source and numbers every citation

The system writes its answer only from the passages it retrieved. Each claim quotes or points to the source language with a numbered citation, and each number opens the clause or paragraph it came from.

AI assistant answering a plain-English question about indemnity exposure, quoting contract language with numbered citations that link back to the source clauses.

In the screenshot, the question is about indemnity exposure under an MSA. The answer works through each party’s indemnity, quotes the operative language, and marks each quote with a citation. A reviewer checks a claim against the original in one click instead of re-reading the contract.

The thing is, citations alone don’t make an answer right. They make it checkable, which is the property that matters in legal work.

Step 4: Drafts and redlines arrive as tracked changes

Drafting follows the same rule. Ask for a clause revision and the system proposes it as tracked changes: deleted text struck through, new text marked, a one-line reason for each change, and Accept or Reject on every one. A citations panel lists what each change relies on, and the revised file saves as a new version.

Contract open with tracked changes: an indemnity clause redrafted to a fault-based third-party claim, with deleted text struck in red, new text in green, and Accept/Reject controls beside each change.

Here the system narrows a broad indemnity to third-party claims arising from breach and removes a carve-out that left one party’s liability uncapped. The attorney decides on each change separately. Nothing is applied in bulk.

Step 5: Nothing leaves without an attorney

The last step is a hard gate. No draft, memo or redline is filed, sent or exported until an attorney signs it off, and the sign-off is logged. That log matters for supervision duties and for the firm’s own audit trail.

Diagram of the legal AI workflow: attorney request, retrieval from the firm's own documents, a draft with a source for every statement, a source check, and attorney approval of every change.

Where errors come from, and how each one is caught

Mata v. Avianca made the failure mode famous: a brief cited cases that didn’t exist. Language models produce wrong answers, so a well-built system is designed around catching them.

  • Invented authority. Answers come only from retrieved passages, and each claim carries a citation. A claim without a source is a defect the reviewer sees immediately.

  • No answer in the corpus. The system says the sources don’t support an answer and stops. Filling the gap with something plausible is exactly the behaviour you’re designing out.

  • Stale law. A quoted case can be accurate and still be bad law. Attorneys confirm cited authorities are still good law before filing. On a securities litigation build, we added an automated citation-risk check for that step.

  • Drift over time. During the pilot, precision and recall are checked against research the team has already done by hand, plus missed-case audits on live briefs. Those numbers decide whether the system goes to production. More on why pilots stall in why your AI pilot did not scale.

No system is error-free. The design goal is fewer errors, and every remaining one visible before it reaches a court or a client.

What the results look like in practice

Three results from Seven Billion legal AI projects: 55% less precedent research time, zero missed controlling cases in reviewed briefs since rollout, and 3.4 times faster SEC filing search.

Precedent research at a US securities litigation firm (2025). Associates spent two days scouring Westlaw for each opposition brief against a motion to dismiss, under tight filing deadlines, with the constant risk of a missed or overturned controlling case. The firm set a target of halving research time. Precedent research time fell 55%, the team has missed no controlling cases in the briefs reviewed since rollout, and the brief was accepted unchallenged. That build covered 12 GB of securities case law, flagged citation risks on precedents and exported Bluebook-ready memos into the firm’s drafting environment.

Bar chart: precedent research time per brief at a US securities litigation firm fell 55%, from an index of 100 to 45, beating a target of 50.

SEC filing search (2025). Covered in step 2: 3.4x faster queries, every query logged for the compliance team’s audit trail.

Client calls at a law firm (2025). Not every lost hour is a research hour. FAQs, bookings and document requests made up 57% of calls, and callers waited nine minutes on average. A conversational assistant now handles 44% of routine calls, and first response dropped to four minutes. The result nobody had set a target for: cost per contact fell 25%.

Two charts: SEC filing searches ran 3.4 times faster against a 3 times target, and a law firm's response time on client calls fell from nine minutes to four.

How confidentiality works

A custom system changes the confidentiality question from “what does the vendor’s contract allow” to “how did we design it”.

In the US, ABA Formal Opinion 512 (July 2024) requires lawyers using generative AI to understand how a tool retains data and whether it trains on it, protect client confidentiality and supervise the output. It also says boilerplate engagement-letter consent may not be enough for self-learning tools that use client information. For each of our builds, hosting, data retention and model-training terms are agreed with the firm during scoping, before any build starts, so the firm can answer those questions about its own tool.

In India, Bar Council of India confidentiality duties and privilege under the Bharatiya Sakshya Adhiniyam, 2023 apply as they always have. Under the Digital Personal Data Protection Act, 2023, the firm is the data fiduciary and the vendor acts as its processor, so training terms, access controls and data residency belong in the contract. On our projects, hosting location and data residency are agreed per engagement during scoping.

This is not legal advice; firms should confirm obligations with their ethics counsel.

When a firm should build, and when it should buy

Platforms such as Harvey or CoCounsel give broad research coverage from day one with no build time. If that’s the need, or nobody at the firm can own an internal system, buying is the better call. Custom makes sense when the value sits in the firm’s own precedents, playbooks and matter history, when the firm needs control over where data lives, or when per-seat costs grow faster than usage. Plenty of firms run both. We’ve written about the usual missteps in what legal firms get wrong about AI.

How firms usually start

Most of our legal projects follow five phases, each ending in a decision the firm makes:

  1. Scoping (2 weeks, fixed fee or complimentary): the 3 to 5 use cases with the most measurable value, and a fixed scope and estimate.

  2. Concept demo (2 to 3 weeks): the use case working on simulated or anonymised data.

  3. Prototype (4 to 6 weeks): the system on the firm’s real documents, with benchmarks.

  4. Pilot (4 to 8 weeks): live use by a small group of attorneys, measured against the firm’s own baseline.

  5. Full deployment: integration, training, go-live and monitoring.

Timeline of five project phases from a 2-week scoping phase to full deployment, with a go or no-go decision after each phase.

Cost is set by the number of workflows, corpus size and condition, integrations, hosting and any security review. That’s why we don’t publish ranges and why scoping comes first.

FAQ

What is custom legal AI?

Custom legal AI is a system built on a firm’s own precedents, matter files and playbooks instead of a generic model. It retrieves the relevant firm documents first, then answers or drafts only from them, a pattern called retrieval-augmented generation (RAG). Every answer carries numbered citations back to the source, so an attorney can check each claim.

Is custom legal AI better than Harvey or CoCounsel?

Not always. Platforms give broad research coverage from day one with no build time. Custom wins when the valuable workflows are specific to your firm, when you need control over where data lives and how it’s used, or when per-seat costs grow faster than value. Many firms run both: a platform for general research and a custom system for firm-specific work.

How do you stop legal AI from inventing cases?

By answering only from retrieved sources and requiring a citation for each claim. Every citation opens the passage it quotes, the system refuses when no source supports an answer, and attorneys confirm cited cases are still good law. Attorney review is mandatory before anything is filed or sent. No system is error-free; these controls cut errors and expose the rest.

Is it ethical for US lawyers to use AI with client data?

Yes. ABA Formal Opinion 512 (July 2024) allows it, provided lawyers meet their existing duties: understand how the tool retains and trains on data, protect confidentiality, get informed client consent where needed (boilerplate may not be enough) and supervise the output. State bars may add their own guidance. This is not legal advice; confirm with your ethics counsel.

Can Indian law firms use AI under the DPDP Act and Bar Council rules?

Yes, with safeguards. Bar Council of India confidentiality duties and privilege under the Bharatiya Sakshya Adhiniyam, 2023 still apply. Under the DPDP Act, 2023 the firm is the data fiduciary and its vendor is a processor, so the contract has to set training terms, access controls and data residency. This is not legal advice; confirm with your counsel.

Where does our data live?

Where the firm and we agree it should, per engagement. Hosting location, data residency, retention and model-training terms are settled during the 2-week scoping phase and agreed before any build starts. Firms with Indian matters cover DPDP data residency in the same conversation. Every attorney sign-off is logged.

How long does it take to build?

A pilot with real attorneys starts 6 to 9 weeks after a 2-week scoping phase: 2 to 3 weeks for a concept demo, then 4 to 6 weeks for a prototype on the firm’s documents. The pilot runs 4 to 8 weeks, and full deployment follows on a timeline agreed at its end.

What does custom legal AI cost?

Cost is set by the number of workflows, the size and condition of the document corpus, integrations, hosting and any security review. We don’t publish ranges because they mislead more than they help. A 2-week scoping phase, fixed fee or complimentary, produces a fixed scope and estimate before any build commitment.

Does it connect to Word, iManage or SharePoint?

Yes. Our accelerator includes connectors for Microsoft Word and Office 365, SharePoint, iManage, DocuSign CLM, Ironclad, Salesforce and LEDES e-billing. Westlaw and Lexis content comes in where the firm’s licence and API access allow. Redlines appear as tracked changes that attorneys accept or reject one at a time.

Does the AI give legal advice?

No. It researches and drafts for attorneys. A licensed lawyer reviews, edits and owns every output before it reaches a client or a court, and the sign-off is logged.

Where to go from here

If your firm is weighing a build, the custom legal AI for law firms page sets out what we build, how we handle confidentiality and how a project is scoped. Or book a scoping call and we’ll map your highest-value use cases in two weeks.

The lowest-risk way to find out if AI is right for your business.

Phase 0 is a two-week discovery that tells you exactly which problems AI can solve, what it will take to build, and what it will cost. No obligation beyond it.

ABOUT Seven Billion

Seven Billion is an Applied AI company — a team of data scientists and AI engineers who build and deploy AI systems that run in production. Founded in 2020. Offices in Boston, USA and Bengaluru, India.

OFFICE

Boston, USA
Bengaluru, India

The lowest-risk way to find out if AI is right for your business.

Whether you are mapping your first AI use case or scaling AI across the enterprise, we will help you cut through the noise and build something that actually ships.

ABOUT Seven Billion

Seven Billion is an Applied AI company — a team of data scientists and AI engineers who build and deploy AI systems that run in production. Founded in 2020. Offices in Boston, USA and Bengaluru, India.

OFFICE

Boston, USA
Bengaluru, India

Intelligence that delivers starts here.

Whether you are mapping your first AI use case or scaling AI across the enterprise, we will help you cut through the noise and build something that actually ships.

ABOUT Seven Billion

Seven Billion is an Applied AI company — a team of data scientists and AI engineers who build and deploy AI systems that run in production. Founded in 2020. Offices in Boston, USA and Bengaluru, India.

OFFICE

Boston, USA
Bengaluru, India