Articles on: AI & contract analysis

How to write a prompt in ContractHero

ContractHero's AI reads your contracts and fills data fields automatically — terms, notice periods, your own custom fields. How well that works comes down to one thing: how you word the prompt. This article is the complete guide — the rule, the templates and the troubleshooting in one place.


The screenshots in this article show the German interface. The English label is given first, with the German label in square brackets.


What's in it for you


A prompt that lands saves you rework: the AI finds the right value in the contract, fills the field without manual correction, and the special-case rules catch the exceptions cleanly. Once you understand the rule, you can build fields in minutes that work reliably for the whole organisation.


The one rule: a prompt is a question


Write the prompt as a real question — not an instruction, not a description.


  • ✅ "When does the contract start?"
  • ❌ "Extract the start date."
  • ❌ "Look for clauses that state the start date."


The reason sits in the mechanics: the AI searches your contract for passages that match your question. For that it needs a short, clear signal. A question gives it one. An instruction, or a long pile of synonyms and examples, dilutes it — and can actually lower the hit rate.


Three rules of thumb follow from that:


  • One question per field. One field, one piece of information. If you need two values, create two fields.
  • Precision beats enumeration. A term that genuinely appears in your contracts works better than three general synonyms.
  • Borrow the document's wording. If your contracts say "effective date", ask for exactly that.


Prompt and instruction — the two levers


Every field has two controls:


  • The prompt (required) says what you want to know. That's your question.
  • The instruction (optional) handles special cases only — exceptions, filters, exclusions.


The format (date, number, text) comes from the field type and belongs in neither.


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


What ContractHero already provides


You do not need to include any of this in your prompt — it is passed to the AI automatically:


  • Task guidance. Which contract category it is working with, so extraction is tailored to the document type.
  • Field formatting. Extracted data is formatted according to the field type (date formats, numerical values).
  • Organizational context. The AI knows your organization's name, which helps it identify the relevant clauses.
  • Bilingual support. Contracts in both English and German can be analysed.
  • List options. The AI already knows the options stored on a list field and matches by meaning.


Where to enter the prompt


  1. Go to Settings [Einstellungen].




  1. Open Field builder → Contract field builder [Feldbaukasten → Vertragsfeldbaukasten] — or Contact field builder [Kontaktfeldbaukasten] for contact fields.




  1. Fields with an AI prompt carry a purple star icon; fields without one only have a gear icon.



  1. Write your question in the "Tell the AI what to extract" [„Sagen Sie der KI, was sie extrahieren soll"] box.
  2. If you need a special rule, expand "Optional: filters and special instructions" [„Optional: Filter und Sonderanweisungen"] below it.
  3. Check the result with "Test on a contract" [„Im Vertrag testen"] before saving.


What you do NOT need to write in the prompt


  • List options: the AI knows the stored options and matches by meaning. Don't enumerate them.
  • Date format: the format follows your account settings. No "return the date as DD.MM.YYYY" needed.
  • Field type: the AI already knows whether it is a text, date or list field.
  • Special rules: those belong in the instruction, not the prompt.


One thing that is worth keeping aligned: the field name and the prompt. If the field is called "Payment", the prompt should ask about payment — not salary.


Prompt templates to copy


Ready-made questions for the most common fields. Where a special case makes sense, the matching instruction is given with it.


Contract basics


Contract start date

When does the contract start?


Instruction, if needed: If several dates are mentioned, return the earliest.


Contract end date

When does the contract end?


Contract term

How long is the contract term?


Instruction, if needed: Always return the value in months, even if the contract states years.


Counterparty

Who is the counterparty?


Instruction, if needed: Return the full legal name including the legal form. If several parties are named, return the first.


Contract value

What is the contract value?


Instruction, if needed: Return the value in euros. If another currency is stated, keep that currency.


Term and termination


Notice period

What notice period applies?


Instruction, if needed: Always return the value in months, even if the contract states weeks or days.


Automatic renewal

By what period does the contract renew automatically?


Extraordinary termination

Under what conditions is extraordinary termination possible?


Payment and finance


Payment terms

What payment term applies?


Recurring amounts

What is the recurring amount and how often is it due?


Net rent

What is the monthly net rent?


Instruction, if needed: If a gross figure is mentioned, ignore it. Return the net amount only.


Contractual penalty

How high is the contractual penalty?


Data protection and compliance


DPA / data processing agreement

Is a data processing agreement part of, or annexed to, the contract?


Confidentiality / NDA

How long does the confidentiality obligation last?


Governing law and jurisdiction

Which law applies and where is the place of jurisdiction?


Short terms as a prompt


If a term appears in the contract almost word for word, it works as a prompt on its own — "File number", for example. A question is never wrong either.


Instructions to copy


These belong in "Optional: filters and special instructions", not in the prompt:


Handle an empty case

Leave the field empty if the date is before 2017.


Normalise to the start of the month

If the contract does not start on the first, still return the 1st of the month.


Exclude a particular counterparty

Excluded: "XY AG". Leave the field empty for this counterparty.


Extract only a particular case

If a gross figure is mentioned, ignore it. Return the net amount only.


Resolve several matches

If several parties are named, return the first — not the renewal clause.


Standardise to one unit

Always return months, even if the contract states weeks or days.


Apply only to certain categories

Only extract if the contract category is "Lease agreement". Otherwise leave the field empty.


Three helpers when a prompt doesn't land


"Test on a contract"


The most important step. Pick an existing contract and see immediately what the prompt returns — including a reference to where it was found. Check every prompt against 5–10 existing contracts before it applies to everyone.


"Improve prompt"


The button next to the prompt box sharpens wording you have already written — usually by translating it into English and shortening it to a clearer search signal.


Careful: it replaces your text directly in the box. Copy your original wording first if you want to keep it. The result is an untested suggestion — check it with "Test on a contract" before saving.


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


Ask the contract assistant


If you have no usable prompt at all: open the contract where extraction is failing, switch to the "Assistant" tab and ask for wording — for example "What prompt do I need so the AI pulls the notice period out of 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 just rewriting your phrasing.


No "Assistant" tab? The contract assistant is not enabled on every account. Talk to your Customer Success Manager or write to support@contracthero.com.


What happens behind the scenes


Worth knowing, because it explains why the question form matters. On the first upload all steps run; on every further analysis of the same document, only 4–6:


  1. OCR (first time only) — the text is recognised, including from scans and images.
  2. Layout recognition (first time only) — paragraphs, tables, headings, order.
  3. Chunking — the text is split into small, searchable sections.
  4. Finding (prompt) — your question searches for the sections that match.
  5. Answering (instruction) — the AI answers the question; special rules refine it.
  6. Field filled — the value appears in the field, with a reference to the source.


So the AI never sees "the whole PDF", only the sections that match your question. That is why a question that lands matters more than a detailed one.


Common questions


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


Usually the prompt doesn't match the wording in the document. Borrow the contract's own wording for your question. The second cause: the contract is a pure scan and OCR didn't pick the passage up cleanly. If you're stuck, ask the contract assistant on that specific contract for wording.


Do my existing prompts still work?


Yes. Older prompts in instruction form still work — they just land less often. If a field fills unreliably, rewording it as a question is the first thing to try.


Is German or English the better prompt language?


Because the training data is predominantly English, English prompts often give the most reliable results. If your German prompts stop landing, try the English wording.


Does the AI work with English contracts?


Yes. Ask the question in the language the term appears in.


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


Re-analysis overwrites nothing. Existing values are left alone; only empty fields are filled. If you want a value re-fetched, delete the existing entry before the retrigger.


What if the AI returns several matches?


Write into the instruction which match is the right one — e.g. "If several dates are mentioned, return the earliest". The prompt stays your question.


What about complex fields such as "delivery dates"?


For multiple values, create a multi-line text or list field. The prompt stays a question: "Which delivery dates have been agreed?" — and the instruction says "Return all dates as a list, each with date and description."


Do I need different prompts for different contract categories?


Not necessarily. If a prompt doesn't land well on a particular contract type, it's worth using an adapted question in that category, with the terms common there.


Do these rules apply to contact fields too?


Yes. The prompt rules are the same in the contact field builder. The only difference: there is no instruction field for special rules there, because the contact field builder has fewer field types.


How do I check a value really came from the contract?


Every AI value carries a reference to where it was found in the original document. Clicking it jumps to the PDF passage the answer came from.


Good to know


  • Quotation marks stay put. Terms in "…" are not translated by "Improve prompt" — so they match the exact wording in the document.
  • Nothing is overwritten. A re-analysis adds to empty fields but never replaces existing values. To re-fetch a value, delete it first.
  • Changes take effect on the next analysis. An adjusted prompt only applies when the document is analysed again — for existing contracts, after a retrigger.
  • An empty field is not automatically an error. Often the information simply isn't in the document.
  • Data protection: your contract documents are not used to train the AI. The data is only ever analysed within your ContractHero account.
  • Onboarding support. For a complex setup we build the prompts together with you — 30 minutes in the right order saves hours of rework later.



Updated on: 10/28/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!