Skip to main content

[New] Tips for Using Prompts for Contract Custom Fields

Updated over 3 weeks ago

This article explains the features of the new LegalOn. For information on the current version’s product features, please refer to this page.

In the AI extraction of contract custom fields, information is obtained from the contract text based on extraction rules (prompts). This guide provides tips for creating prompts to enhance accuracy.

Getting started

An extraction rule (hereinafter, "prompt") is an instruction that tells the AI what information to extract from a contract. While humans can understand ambiguous expressions, the AI may extract incorrect information if lacking specific instructions.

For example, simply writing "Please extract the contract start date" might cause the AI to extract different dates depending on the contract, such as the signature date or the effective date.

However, if you specify "Please extract the effective date of the contract in MM/DD/YYYY format. If not explicitly stated in the text, leave it blank," the extraction target and format become clear, leading to more consistent results.

In other words, a prompt is like an "instruction manual for the AI." The clearer the instructions, the higher the accuracy.

Tips for creating prompts

1. Clearly specify the content to extract

Clearly define the target information. Avoid ambiguous expressions and, for best results, specify how to handle cases where the information is not present.

Example:

Please extract the head office address of the business partner. Output in the following format: postal code + state + city/ward/town/village + street number. If there is no address mentioned in the text, leave it blank.

✕:Please extract the business partner's address.

*Note: This leads to incorrect extractions and inconsistent data, as it becomes impossible to distinguish between the head office and branch offices, and the format is not standardized.

2. Provide context for contract-specific terms

The same terms can have different meanings in different contracts. Typical examples include signature date and effective date, or contract termination date and renewal deadline.

Specifying which one you are referring to can prevent incorrect extraction.

Example:

◯:Please extract the start date of the effective period of this agreement (the effective date, not the signature date).

✕:Please extract the contract start date.

*Note: If the signature date cannot be distinguished from the effective date, this will result in incorrect extractions.

3. Specify the output format

Specifying the format makes the extracted data easier to manage and use.

  • Date: MM/DD/YYYY

  • Amount: Half-width numbers only (no commas or units)

  • Options: Choose from "Party A," "Party B," or "Both Parties"

If you do not specify a format, variations may occur, such as "September 16, 2025."

Example:

◯:Please output the address in the following format: postal code + state + city/ward/town/village + street number.

✕:Please output the address.

*Note: Since the format is not specified, the notation will be inconsistent, such as "Chiyoda-ku, Tokyo 1-1," or "100-0001 Chiyoda-ku, Tokyo…”

4. Limit instructions to information stated in the contract

Instructions based on information not present in the contract or assumptions about the business transaction can lead to incorrect extraction.

Prompts should only request information that can be determined from what is explicitly stated in the contract.

Example

◯:Please extract the address of the business partner mentioned in the contract.

✕:Please assess the business scale of the counterparty.

*The contract does not typically state the scale of a business, so the AI might make assumptions and provide incorrect results.

5. Focus on one element at a time

Include only one element in each prompt. Combining multiple conditions may lead to unstable results.

Create multiple fields as needed and assign a separate prompt to each one.

Example:

◯:Please extract the liability cap.

✕:Please extract the liability cap and the payment deadline.

*The results may be unstable because the prompt includes multiple elements.

6. Outline the extraction procedure

Instead of just writing "Please extract...," providing step-by-step instructions on how the AI should search the text will yield more consistent results.

Example:

◯:Please review the text and search for clauses that include terms such as "anti-social forces," "organized crime groups," or "socially condemnable forces." If found, return "Found"; if not found, return "Not Found." In ambiguous cases, return "Not Found."

✕:Please extract the clauses that address anti-social forces exclusion.

*Note: This prompt lacks a search procedure and judgment criteria, which can easily lead to inconsistent interpretations.

7. Always verify in Preview

After setting up a prompt, please click [Preview Extraction Results] to test it.

*For detailed instructions, refer to "AI extraction of contract custom fields - 3. [RECOMMENDED] Test the extraction."

Since wording varies between contracts, verifying the results with multiple contracts, not just one sample provides the best results. If you get unexpected results, try the following and rerun the preview:

  • Make the extraction target more specific

  • Modify the output format

  • Clarify the extraction procedure

Examples of actual prompts

Below are examples you can copy and use immediately.

Heading/Category

Payment terms

Please extract payment terms from the contract. Include the following:

  • Payment deadline (e.g., "monthly closing with payment due at the end of the following month")

  • Payment method (e.g., "bank transfer")

  • Payment amount or unit price

Presence or absence of an anti-social forces exclusion clause

Please review the text and search for clauses that include terms such as "anti-social forces," "organized crime groups," or "socially condemnable forces." If found, return "Found"; if not found, return "Not Found." In ambiguous cases, return "Not Found."

Counterparty address

Please extract the address of the counterparty as stated in the contract.

Include the complete address with postal code, state, city/ward/town/village, and street number.

If multiple addresses are listed, please prioritize the head office address.


Related articles

Did this answer your question?