Articles on: AI & contract analysis

How our AI reads contracts: prompt, instruction and the path to a field value

Every field you create in the contract field builder consists of a question (the prompt) and optional special rules (the instruction). Ask the question properly and you reliably get the right value — the rest is fine-tuning. This guide shows what matters.


Your benefit


A well-written prompt saves you rework: the AI lands on the right value in the contract, fills the field without a detour through manual corrections, and can be fine-tuned via the special rules so that even exceptions are handled cleanly. Once you understand the mechanics behind the analysis, you can build fields in minutes that work reliably for your whole organisation.


What happens after upload


The analysis runs as a short chain of steps. On the first upload of a document, the AI reads out the text (OCR) and captures the layout. On every further analysis of the same document those two steps are skipped — only the analysis part runs (steps 4–6).


1. OCR (first time only)


The text is recognised in the document — including from scans and images.


2. Layout recognition (first time only)


The structure is captured: paragraphs, tables, headings, order.


3. Chunking (preparation)


The recognised text is split into small, searchable sections.


4. Finding (prompt)


Your question looks for the sections that match the answer.


5. Answering (instruction)


The AI answers the question; special rules refine it.


6. Field filled (result)


The value appears in the field — with a reference to its source passage.


The two levers on every field


A field has two controls: the prompt (required) and the instruction (optional). The prompt says what you want to know; the instruction only governs special cases.


Prompt — what you want to know


In the contract field builder you'll find the prompt as the text box under "Optional: Tell AI to extract the key details by giving a specific description related to this field". Write it as a real question — not an instruction, not a description. The question tells the AI what to return and at the same time finds the matching passages in the contract.


  • ✅ "When does the contract start?"
  • ❌ "Extract when the contract starts."


Without a well-aimed question the AI is blind: what you don't ask for here, it cannot answer.


Instruction — special cases (optional)


You'll find the instruction under Optional: Filters and special instructions. You only need it when the simple answer isn't enough. This is where you define conditions and exceptions for this one field.


The format usually follows from the field type (date, number, text) — it rarely belongs in the instruction.


Examples:


  • "If the contract does not start on the first, still return the 1st of the month."
  • "Leave the field empty if the date is before 2017."
  • "Excluded: 'XY AG'."


No special case? Leave the instruction empty — the AI then answers your question directly.


Prompts that land


The finding step is a similarity search — it needs a short, clear signal. Too many broad terms, synonyms or examples dilute that signal and can even worsen the hit rate. When in doubt: keep it short and take the wording from the document.



  • Write the prompt as a clear question: "When does the contract start?"
  • Ask for exactly one piece of information per field.
  • Choose the format via the field type (date, number, text) — not via the instruction.
  • Handle the empty case via the instruction: "Leave the field empty if …"
  • On weak hits, take the wording from the document.


Better avoided


  • Instructions or descriptions as a prompt: "Extract the start date."
  • Packing several questions into one prompt.
  • Writing special rules into the prompt — those belong in the instruction.
  • Treating an empty field as an error too quickly — often the information simply isn't in the document.
  • Piling up broad terms or examples — that dilutes the search signal.


The three buttons under the prompt field


Test in a contract


Before you put a field live, click Test in a contract. You pick an existing contract from your portfolio and immediately see what the prompt returns — including the reference to its source passage. That way you catch wrong hits before they land in 500 contracts.


Improve prompt — with care


Improve prompt (the wand icon) has the AI rewrite your prompt into a clearer question. Two things to know:


  1. It replaces your prompt in place. Your wording is overwritten in the input field, not offered alongside it. To get the original back, close the dialog with Cancel — or keep a copy before you run it.
  2. It may also write into the instruction. If the AI decides a special rule is needed, it fills Optional: Filters and special instructions, even when that box was empty. Expand the section and check what landed there.


The result is an untested suggestion and not always the better solution. Check it with Test in a contract before saving with Update.


Re-analyse field


Runs the analysis for this one field again, without touching the rest of the contract.


Asking the contract assistant for a suggestion


If you have no usable prompt at all, there is a second route: open the contract where the extraction is failing, switch to the Assistant tab, and ask there for a wording — for example "What prompt do I need so the AI picks up the notice period from this contract?"


The difference from Improve prompt: the assistant has the contract text in front of it and can work from the actual wording of that document, rather than only rewriting your existing phrasing. It also leaves your field untouched — the suggestion stays in the chat until you copy it over.


The same caveat applies: the suggestion is a starting point, not a verified result. Enter it in the field builder and check it with Test in a contract on several contracts before it applies to all of them.


No Assistant tab on your contracts? The contract assistant is not enabled on every account. Talk to your Customer Success Manager or email support@contracthero.com — we'll look at what is possible for your account.


Use cases


  • Start date field for rental and leasing contracts. Prompt: "When does the contract start?" — field type: date. Instruction only if there are exceptions (e.g. ignore a pre-contract date).
  • Net rent field. Prompt: "What is the monthly net rent?" — field type: money. Instruction: "If gross is stated, ignore it."
  • Counterparty field. Prompt: "Who is the counterparty (contractor/supplier)?" — field type: text. Instruction: "If several parties, return the first."
  • Notice period field. Prompt: "What notice period applies?" — field type: interval. Instruction: "Always output in months, even if the contract states weeks."
  • Reference / file number field. Prompt: "File number" — field type: text. A short prompt is enough, because the term usually appears verbatim in the document.


Common questions


Why does a field stay empty even though the information is in the contract?


Usually the prompt doesn't match the language used in the document. Take the wording from the contract into your prompt — that lifts the hit rate noticeably. Second cause: the contract is a pure scan and the OCR (step 1) did not recognise that passage cleanly.


If you're not getting anywhere, ask the contract assistant on that very contract for a wording (see "Asking the contract assistant for a suggestion"). Because it knows the contract text, it proposes a prompt that fits the wording of that document. If the assistant isn't available to you, your Customer Success Manager or support@contracthero.com will gladly help you phrase it.


Why doesn't re-running the analysis change a value that is already filled?


Re-analysis overwrites nothing. Existing values stay untouched — they are only added to where fields are still empty. If you want to fetch a value again, delete the existing entry before the retrigger.


Can the AI read the whole contract?


Not all at once. The AI works on chunks (small, searchable sections). So it doesn't "see" the whole PDF, but the sections that match your question. That's why a well-aimed question counts for more than a lengthy one.


Is German or English the better prompt?


Because the training data is predominantly English, English prompts often deliver the most reliable results. If your German prompts stop landing, try the English phrasing — or use Improve prompt for a suggestion.


What happens to terms in quotation marks?


Terms in "quotation marks" are not translated by Improve prompt. That way they match the exact wording in the document — handy for technical, legal or proper names.


Can I improve a prompt afterwards?


Yes. Changes to the prompt take effect at the next analysis. Values already filled stay — delete them if you want a recalculation (see also: AI Retrigger).


How do I check that a value really comes from the contract?


Every AI value carries a reference to its source passage in the original document. Clicking it jumps to the PDF section the answer came from (see also: Jump to Source).


Good to know


  • Quotation marks stay put. Terms in "…" are not translated by Improve prompt — so they match the exact wording in the document. Useful for technical, legal or company names.
  • Two routes to a better prompt. Improve prompt sharpens an existing wording and overwrites it; the contract assistant proposes a new one in the chat and knows the contract text while doing so. Both give suggestions you should test.
  • Check the instruction box after Improve prompt. It can add a special rule there without being asked.
  • Overwrites nothing. Existing values stay untouched. A re-analysis adds, but does not replace, your entries. If you want a value fetched again, delete it first.
  • Works on chunks. The AI doesn't see "the whole PDF", but searchable sections. That's why a well-aimed question counts for more than a long one.
  • English works best. Because the training data is predominantly English, English prompts deliver the most reliable results. On weak German hits: try the English phrasing.
  • Changes take effect at the next analysis. Adjusted prompts or instructions only apply once the document is analysed again — so on already-filled contracts, after a retrigger.


Want to take your fields to the next level?


Your Customer Success Manager and support are happy to help you optimise your most important fields step by step — from the prompt wording through the special rules to the live test. Thirty minutes in the right order saves hours of rework in daily use. Get in touch via the web chat or by email at support@contracthero.com.



Updated on: 10/22/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!