Availability: Enterprise plan
An extraction prompt tells PandaDoc AI what to find in a document and how to return it. A clear prompt gives you accurate, consistent values you can trust in search, filters, and reports. A vague prompt can return the wrong value, or nothing at all.
This article explains how to write prompts for custom fields and how to adjust prompts for PandaDoc's system fields. To learn how to create a field and add a prompt, see Create custom AI extraction prompts for data fields.
Start with the right field type
Before you write a prompt, make sure the field type matches the value you want:
Date: a single date, such as an effective date or renewal date.
Number or Currency: an amount, such as a contract value or notice period in days.
Short text: a short value, such as a name, ID, or reference number.
Long text: a summary or a longer passage, such as termination conditions.
Dropdown: one of a small, fixed set of options, such as Yes / No / Partial.
If the answer is always one of a few known values, use a Dropdown field.
What to include in a prompt
Write your prompt as if you're giving instructions to a colleague who is reading the document for the first time. A strong prompt covers these five things:
What the value is. Define the field in plain language, especially if your organization uses its own terminology.
Where it usually appears. Name the section, heading, clause, or part of the form, for example "in the Payment Terms section" or "in the signature block."
How it differs from similar values. If a document contains several dates, names, or amounts, say which one you want, for example "the start date of services, not the signature date."
What to do if it's missing. Say whether PandaDoc AI should use a fallback or leave the field empty.
The format you expect. For text fields, say whether you want only the value ("return only the company name") or a short summary.
You don't need to cover all five every time. Simple fields often need only one or two.
Examples
Date field: Effective date
The date on which the agreement becomes legally effective. If an "Effective Date" is not explicitly defined, extract the date of the last signature or the document completion date.
Short text field: Customer success manager
The name of the customer success manager assigned to the account. This usually appears in the "Account Contacts" section or the signature block. Return only the person's full name. If no CSM is named, leave the field empty.
Number field: Renewal notice period (days)
The number of days' notice either party must give to prevent automatic renewal. This usually appears in the Term and Renewal clause. If the notice period is given in months, convert it to days (1 month = 30 days). If there is no auto-renewal clause, leave the field empty.
Dropdown field: Contains non-standard terms
Options: Yes, No
Select "Yes" if the agreement includes any terms that modify, override, or add to the standard Terms of Service, such as custom liability caps, special payment terms, or additional termination rights. Otherwise, select "No".
Long text field: Force majeure trigger events
List the specific events defined as force majeure in the Force Majeure clause, such as natural disasters, pandemics, or government action. Return a comma-separated list using the document's own wording. If the agreement has no force majeure clause, leave the field empty.
Before and after
Instead of… | Try… |
The date | The date services start, as stated in the Term section. Not the signature date. |
Customer | The legal name of the customer company (the party receiving services), as written in the opening paragraph. Return only the company name. |
Payment info | Two fields: Payment terms (days), a Number field, and Payment method, a Dropdown field. |
Find anything about renewal | Select "Yes" if the agreement renews automatically at the end of its term. Otherwise, select "No". |
Tips
One field, one fact. If you need two pieces of information, create two fields.
Use the document's wording. If your contracts always say "Commencement Date", refer to it by that name.
Keep it focused. Prompts can be up to 1,000 characters, but specific and concise prompts work best.
Don't duplicate system fields. If a system field already covers what you need, such as Agreement date, edit its prompt instead of creating a new field with the same name.
Test on more than one document. Open a few different completed documents, select Review data, open the field, and select Test prompt on each. Include at least one document where the value is missing, so you can check that the field stays empty.
Troubleshooting
The test returns "No matches found", but the value is in the document.
Add where the value usually appears and the wording the document uses to describe it.
The test returns the wrong value.
There are usually several similar values in the document. Add a sentence saying which one you want and which ones to ignore.
Results come back in different formats.
State the format you want, for example "return only the number of days." If the answer is always from a fixed set of values, switch to a Dropdown field.
A field is filled in when it should be empty.
Add an explicit instruction, such as "If the document doesn't mention X, leave the field empty."
