Articles on: AI & contract analysis

How to write a prompt in ContractHero

ContractHero's contract analysis uses AI to extract key data from your contracts automatically. Here's how it works, and how to write prompts that get good results.


Automated data extraction


The AI extracts critical contract information — dates, parties involved, financial terms — from uploaded documents. That saves time and removes manual data entry.


The contract analysis process


  1. Document upload. You upload the contract document into the system.
  2. OCR (optical character recognition). The system converts the text in the contract into a machine-readable format, so even scanned or image-based documents can be analysed.
  3. Custom field data extraction. The AI extracts information based on your predefined custom fields. These are tailored to the contract category, so only data relevant to that contract type is pulled.
  4. The AI request. For each field, the AI receives:
  • Contract document text — the raw text extracted from the contract
  • Field name — the label for the data being requested (e.g. "Start date")
  • Field type — the format of the expected data (date, number, text)
  • Field prompt — what the AI should look for in the contract
  1. The result. The AI scans the document and matches the information against your prompt and the field type.


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.


Writing effective prompts


1. Be specific


  • ❌ "What date is written in the contract?"
  • ✅ "What start date is written in the contract?"


Clear, specific questions help the AI focus on the right information.


2. Describe the value you want


  • ❌ "When does the contract start?"
  • ✅ "What is the start date of the contract? Often found under 'contract term' or 'contract duration'."


Pointing at where the information usually sits helps the AI locate it.


3. Do not list the options of a list field


  • ❌ "Select Car or Coffee machine"
  • ✅ "Which item is being leased?"


The AI already knows the options stored on the field and matches by meaning — the wording does not have to be identical. What matters is that the options themselves are unambiguous: if "ContractHero" and "ContractHero GmbH" sit side by side, the AI has to guess which one you mean.


4. Keep the field name and the prompt aligned


  • ❌ The field is called "Payment" but the prompt asks about "salary".
  • ✅ If the field is "Payment", the prompt refers to payment.


Consistent terminology between field name and prompt gives more accurate extraction.


5. Point at where it usually appears


  • ✅ "What is the termination date of the contract? This is often listed at the end of the agreement or in a section titled 'Termination'."


Where to enter the prompt


Go to Settings → Field builder → Contract field builder, open a field via its gear icon, and write your prompt in the box under "Optional: Tell AI to extract the key details by giving a specific description related to this field". Below it you'll find Test in a contract, Improve prompt and Re-analyse field. Save with Update.



Updated on: 10/22/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!