ai contract drafting

How to Ground AI Contract Drafting in Your Own Templates

Adira EditorialLegal AI desk13 min read

Ask a general AI tool to draft a limitation of liability clause and it gives you something generic: "market" language borrowed from whatever the model saw most often in training, not the number your legal team actually negotiates. Ground the same tool in your own templates, past contracts, and playbook, and it drafts from your approved wording instead. That difference, retrieval from your own material rather than a statistical average of the internet, is what "grounding" means, and it is the practical how-to version of the idea we cover conceptually in What Is a Company Legal Persona? (Adira, which publishes this guide, builds corpus-grounded drafting tools of exactly this kind, so we have a commercial stake here; this guide is written to be useful whether or not you use ours.)

This piece is the how-to: which documents belong in your corpus, how to structure them so retrieval actually works, how to add playbook rules on top so the AI does not just average your history, and what to check by hand before anything gets signed.

What grounding actually means, in one sentence

Grounding means a system searches your own documents for the closest match to what you are drafting, right now, and hands that match to the AI as reference alongside your instruction. It is not the AI being retrained on your contracts, and it is not you pasting your whole contract history into one giant prompt every time. It is a search step that runs automatically, every time, before the AI writes anything. We cover the retrieval-versus-training distinction in full, including what Indian AI vendors are and are not allowed to do with your data, in what a company legal persona is.

Step 1: Assemble a clean corpus, and check you actually own it

Three kinds of document go into a corpus: your best executed contracts (the ones legal actually stands behind, not every signed document), your playbook (ideal, fallback, and walk-away positions per clause, in full in what a contract playbook is), and your clause library (approved, reusable wording, in clause library versus template library). "Best" matters: a contract you signed because you had no leverage is not your standard position, and including it teaches the AI the wrong lesson just as confidently as a correct one.

Before any of that goes into a corpus, check who actually owns the copyright in the wording. Section 17 of the Copyright Act, 1957 states the default rule plainly:

"the author of a work shall be the first owner of the copyright therein"

An employer only displaces that default automatically for "a work made in the course of the author's employment under a contract of service," under the proviso to Section 17(c). Read Section 17 on Indian Kanoon. A template your in-house counsel drafted as an employee is covered by that proviso; your company owns it by default. A template an external law firm drafted for you is not: outside counsel works under a contract for service, not a contract of service, so the firm remains first owner of the copyright unless your engagement letter explicitly assigns it. Most retainers say nothing about it. So before you feed externally drafted templates into an AI corpus, check the engagement letter for an assignment clause. If there is none, ask the firm for one, or keep that material to internal reference only.

This is not a theoretical formality. A corpus is also more defensible when it reflects real editorial judgment rather than raw copying. In Eastern Book Company v. D.B. Modak, (2008) 1 SCC 1, the Supreme Court held that copyright protects material showing genuine "skill and judgment," not mechanical effort: routine corrections were held not to attract copyright, while reorganising text with real analytical input did. Read the judgment on Indian Kanoon. A clause library you have genuinely organised and annotated is a real asset worth guarding if someone leaves. A folder of contracts dumped in unedited is closer to raw material, and also produces weaker retrieval, since nothing in it is marked as better than anything else.

Step 2: Structure the corpus so retrieval can actually find the right match

A pile of PDFs is not a corpus a retrieval system can use well. Two things matter before you plug it into any tool.

Tag it by what a lawyer would search for, not by counterparty name. At minimum: clause type (indemnity, limitation of liability, termination), contract type (MSA, NDA, employment offer), your role (vendor or client side), and whether the wording is your ideal position, an accepted fallback, or simply a past example with no particular status. Retrieval works by matching what you are asking for now against these tags plus the surrounding text; a corpus with no clause-level tagging forces the system to match on the whole document, which is far noisier.

Audit for consistent defined terms before ingestion, not after. If half your contracts say "Confidential Information" and the other half say "Proprietary Information" for the same concept, retrieval will surface both as equally valid matches, and the AI keeps drafting inconsistently because your source material is inconsistent. A test you can run in an afternoon: pick your five most-used contract types, search each for every capitalised defined term, and list which ones describe the same concept under different names. Fix the terminology in your source documents, or at minimum your clause library, before building retrieval on top of it.

Step 3: Set up retrieval, and understand what it does not do

At draft time, the system converts your request (say, "draft a limitation of liability clause for a new vendor MSA") into a search against the corpus, using clause type, contract type, and text similarity, and hands the closest matches to the AI as reference. Two things follow. Updates are close to instant: change your standard cap in the playbook today, and tomorrow's drafts reflect it, with no retraining cycle. And the model itself is not being permanently altered by your confidential contracts the way it would be if you were fine-tuning it, worth confirming with any vendor in writing, since "grounding" can mean retrieval (your data used per request) or fine-tuning (your data baked into model weights), and a marketing page rarely distinguishes the two.

Retrieval alone has a failure mode worth knowing: if your corpus has three examples of a clause and two lean aggressive while one is conservative, a system doing pure similarity matching has no way to know which reflects your current position. It surfaces whichever is textually closest, not whichever is correct. That is the gap the next step closes.

Step 4: Constrain it with explicit playbook rules, not just retrieved examples

Retrieval alone gives you a system that mimics your corpus. A playbook on top gives you a system that enforces your positions. The difference matters because a corpus is a record of what you have accepted before, including compromises, while a playbook states what you actually want, your fallback, and the line you will not cross, covered in full in what a contract playbook is. A well-built setup does both: it retrieves your closest past wording for style, and checks the draft against explicit rules (a stated cap, a required notice period, a walk-away threshold) so the output does not just average toward whatever appeared most often. Practically, this means writing your playbook's positions as structured rules a system can check a draft against, not only as prose a lawyer reads once.

Step 5: Human review, every time, no exceptions

Grounding narrows the gap between an AI draft and your actual standard; it does not close it. A model can still fill a gap your corpus has no close match for with a confident, plausible, wrong answer, the same hallucination risk covered in can AI draft a contract, just wearing your house style. Review means three checks on every draft: does each number (cap, notice period, cure period) match a position you actually hold, are defined terms consistent throughout, and can you trace any cited clause back to a real source rather than a plausible-sounding invention. Run this check for free, clause by clause, in Weave, before anything goes to a counterparty.

How this differs from a raw prompt: the same clause, three ways

Say your company's actual negotiated position on limitation of liability is a cap equal to 12 months' fees, with an uncapped carve-out for IP infringement and confidentiality breach only.

Raw prompt, no grounding at all. Ask a general AI tool to "draft a limitation of liability clause for a services agreement" and it typically returns something like: "In no event shall either party's liability under this Agreement exceed the fees paid in the preceding twelve (12) months." This looks close, and that is the trap: the right shape, a fees-based cap, but no carve-outs, no notice mechanics, and no confirmation it reflects your position rather than a common default the model happened to reproduce.

Manual grounding, a raw prompt with your material pasted in. You copy your playbook's liability entry and a past clause into the prompt each time and ask the AI to draft from them. This works and costs nothing beyond your time, but it is slow, depends on whoever is drafting remembering to do it, and varies with whichever excerpt they pasted that day.

Corpus-grounded, retrieval plus playbook rules. The system retrieves your actual approved clause automatically, checks it against your stated cap and carve-outs, and drafts: "Except for claims arising from (a) infringement of the other party's intellectual property rights, or (b) breach of confidentiality obligations under Clause 9, each party's aggregate liability under this Agreement shall not exceed the total fees paid or payable in the twelve (12) months preceding the claim." Same position as the manual version, reached automatically and consistently, without anyone needing to remember which document to paste.

The value is not that the third version is smarter. It reaches your actual position without depending on one person's memory, every time.

Signs your corpus is set up well, and signs it is not

NormalRed flagWhy it matters
Only final, legal-approved, executed wording goes into the corpusDraft, redline, or counterparty-authored wording is mixed in, untaggedThe system treats an abandoned negotiating position or the other side's paper as if it were your standard
Every clause is tagged by clause type, contract type, and position status (ideal, fallback, example)Whole contracts sit in the corpus with no clause-level taggingRetrieval matches loosely on the whole document instead of precisely on the clause you need
Defined terms were audited and made consistent before ingestionTerminology drift (two names for one concept) was never cleaned upThe AI keeps reproducing the inconsistency, and it compounds across every future draft
Ownership of every source document is confirmed, in-house drafted or assigned by an outside firmOutside-counsel templates are used with no IP assignment in the engagement letterYou may not have the right to reproduce that wording at scale, whatever a vendor's terms say about your own uploads
A playbook rule enforces the walk-away line on top of retrievalRetrieval is the only mechanism; the AI just mimics whatever appears most often in the corpusA corpus with a mix of aggressive and conservative examples has no way to know which one is currently correct
A playbook update shows up in the very next draft generatedSuperseded language keeps reappearing weeks after the playbook changedThe corpus was not re-indexed; drafting is happening from a stale copy
A human checks every number and citation against a real source before sendingDrafts are sent out on the assumption that grounding already made them correctGrounding reduces genericness; it does not verify legal soundness or catch every hallucination

How this connects to the rest of your setup

Grounding is not a single feature you switch on. It is what happens when a clean, tagged corpus (this page), a written playbook with real walk-away lines (what a contract playbook is), and an organised clause library (clause library versus template library) work together, which is the fuller picture covered in what a company legal persona is. If none of these exist yet, start with the playbook. Grounding a system in a messy, unstated set of positions just automates the mess faster, and produces confidently wrong output rather than obviously generic output, which is a harder problem to notice.

US and global contrast

The retrieval mechanics are identical everywhere; matching a request against tagged clauses does not change by jurisdiction. Ownership of the source templates follows a broadly similar default on both sides, worth knowing because it is easy to assume the US default is looser. Under US copyright law, a "work made for hire" vests automatically in the hiring party only for work created by an employee within the scope of employment, or for a narrow, enumerated list of commissioned works accompanied by a signed written agreement (17 U.S.C. § 101). Contract drafting by an outside law firm generally falls into neither category. So in both India and the US, templates an external firm drafted for you typically remain that firm's property unless your engagement letter says otherwise, the same check this page recommends either way.

FAQ

Do we need special software to ground an AI in our templates, or can we do this manually? You can do a manual version: keep a playbook and clause library as documents, and paste the relevant excerpts into a general AI prompt yourself for every draft. It works and costs nothing but time. Dedicated software mainly adds automatic retrieval at draft time and consistent results across everyone who drafts.

How many contracts do we need before grounding is worth setting up? A few dozen genuinely representative, currently-correct examples per major contract type is usually enough to beat a raw prompt noticeably. Fewer than that, and the system falls back on generic patterns for anything unusual.

Does grounding fix jurisdiction-specific problems, like a US-style clause showing up in an Indian contract? Only if your source corpus was already India-correct. Grounding reproduces whatever is in your corpus faithfully, including a mistake, so a template originally copied from a US precedent bank gets reproduced confidently in your house style.

Who owns the copyright in the templates we put into our corpus? It depends on who drafted them. Under Section 17 of the Copyright Act, 1957, an employer owns work an employee drafted in the course of employment by default. Work an external law firm drafted for you does not transfer automatically; check your engagement letter for an assignment clause before feeding that wording into an AI corpus at scale.

Does grounding mean our contracts are used to train the AI model permanently? Not if the system uses retrieval, which is what most tools, including Adira, mean by "grounding." Your corpus is searched at the moment you draft, and the underlying model is not permanently retrained on it. Get this confirmed in writing.

What is the first thing we should ground the AI on if we are starting from nothing? Your single highest-volume contract type, tagged with your ten to twelve most-negotiated clauses and their playbook positions. A narrow, well-tagged corpus on one contract type outperforms a large, untagged dump covering everything.

This guide explains how corpus-grounded AI drafting generally works and how to set one up. It does not tell you whether your specific corpus is complete, whether your engagement letters actually assign the IP you are assuming they do, or whether a specific AI-drafted clause is enforceable for your situation. For that, especially before sending any grounded draft to a counterparty, have a lawyer review both your source templates and the output.

Frequently asked questions

Do we need special software to ground an AI in our templates, or can we do this manually?
You can do a manual version: keep a playbook and clause library as documents, and paste the relevant excerpts into a general AI prompt yourself for every draft. It works and costs nothing but time. Dedicated software mainly adds automatic retrieval at draft time and consistent results across everyone who drafts.
How many contracts do we need before grounding is worth setting up?
A few dozen genuinely representative, currently correct examples per major contract type is usually enough to beat a raw prompt noticeably. Fewer than that, and the system falls back on generic patterns for anything unusual.
Does grounding fix jurisdiction-specific problems, like a US-style clause showing up in an Indian contract?
Only if your source corpus was already India-correct. Grounding reproduces whatever is in your corpus faithfully, including a mistake, so a template originally copied from a US precedent bank gets reproduced confidently in your house style.
Who owns the copyright in the templates we put into our corpus?
It depends on who drafted them. Under Section 17 of the Copyright Act, 1957, an employer owns work an employee drafted in the course of employment by default. Work an external law firm drafted for you does not transfer automatically; check your engagement letter for an assignment clause before feeding that wording into an AI corpus at scale.
Does grounding mean our contracts are used to train the AI model permanently?
Not if the system uses retrieval, which is what most tools, including Adira, mean by 'grounding.' Your corpus is searched at the moment you draft, and the underlying model is not permanently retrained on it. Get this confirmed in writing.
What is the first thing we should ground the AI on if we are starting from nothing?
Your single highest-volume contract type, tagged with your ten to twelve most-negotiated clauses and their playbook positions. A narrow, well-tagged corpus on one contract type outperforms a large, untagged dump covering everything.
Was this useful?

See how Adira drafts in your voice and reads contracts from your side.

Explore the showroom

Working through a contract like this? Weave is Adira’s free tool to read, mark up, and connect any contract in your browser — no account needed.

Try Weave — free