Set Up and Define Key Terms and Prompts

You must perform the following steps to set up key terms and the corresponding prompts. Prompts are the questions that are sent to Generative AI to extract the key terms. Prompts can be different for each contract type. You can test the prompt against different contract documents before making it active. Only key terms and prompts with a status of Active can be used in the contracts.

Define Key Terms

You can define key terms and categorize them based on user-defined groups. A key term can have one or more prompts associated with it. For example, you can have one prompt for Item and Services contract type and a different prompt for Sales Agreement contract type. Whether you can use the same prompt for all contract types depends on whether the prompt works for all types of contract documents.

You can access the Key Terms setup pages from the contracts landing page as follows: Navigator > Tasks > Setup > Manage Key Terms and Prompts. Here's an example of the Key Terms list page.

Sample screenshot showing the Key Terms list page highlighting the Create Key Term button

This page lists all the key terms that are created. By default, all the active key terms are displayed. Wait for a few seconds for the key terms to load. You can search for existing key terms, create new key terms, and edit existing ones from the Key Terms UI. Any search text you enter in the Add Filter area will be searched against the Name, Output Type, Group, and Status fields.

To create a key term, follow these steps:
  1. From the Key Terms UI, click Create Key Term to open the Create Key Term page as shown:

    Sample screenshot of the Create Key Term page

  2. Enter the following details:
    Field Description
    Name Unique name of the key term.
    Status Status of the key term. Default status is Active. If a key term is made inactive, it won’t be extracted from contract documents. An Inactive key term will be read-only and can’t be made active again. Set it to Inactive only if you don’t want to use this key term anymore.
    Output Type Output type is the data type of the key term returned by the GenAI Large Language Model (LLM). The values are:
    • Number – For example, renewal percentage, recovery point objective
    • Date – For example, start date, renewal date
    • Text – For example, currency, country of jurisdiction
    Group This is based on the lookup Key Term Groups (ORA_OKC_KEY_TERM_GROUP). Groups are used to categorize the key terms. You can set up your own groups.
  3. Click Create.

From the Key Terms list page, click the Name of the key term you want to edit. Or, from the Actions menu click Edit to display the Key term details page. From this UI, you can edit an existing key term and create prompts for the key term.

Sample screenshot of key term details with the highlighted Add Prompt button

You can edit the Output Type, Status, and Group fields of the key term. If a key term is made inactive, you can’t make it active again and the key term won’t be extracted from the contract documents.

All the prompts for the key term are listed in the Prompts section. You can click Add Prompt to create a prompt or go to the Actions menu to edit an existing prompt.

Define Prompts

A prompt is the question that you ask the LLM to get a specific response. For example, you want to set up prompts to extract the key terms from contract documents. You can create a prompt, test it against various contract documents, and fine tune the prompt to fetch the correct response. You can also add additional instructions to specify the format of your answer.

To define a prompt, follow these steps:
  1. From the Prompts section of the Key term details UI, click Add Prompt to open the Create Prompt panel.
  2. Enter the Name, Description, Prompt and Additional Instructions and click Create to open the Edit Prompt panel as shown.

    Sample screenshot of the Edit Prompt panel

  3. Enter the following details:
    Field Description
    Name Unique name of the prompt.
    Status Prompt statuses are Draft, Active, and Inactive. Only Active prompts will be used for extracting key words from contract documents.
    Description Describes the prompt.
    Prompt The question that’s used for extracting the key term.
    Additional Instruction Default additional instruction is If there is no value found in the context, return NONE. This text increases the possibility of the LLM providing response based on the details from the document. You can also expect the answer in a specific formation by appending other instructions such as:
    • Respond only Yes or No
    • Provide the response only in number
    • Answer in one phrase only
    • Answer in the format X hours
    • Answer in the format {X %} only
    Upload Document Upload a contract document and test if the prompt extracts the appropriate response. Only text-based PDF files (PDF files in which you can search for text using Ctrl - F) is supported. Other formats aren't currently supported.
    Refresh Click Refresh to complete the document upload
    Run Test Once the document is uploaded successfully, the Run Test button will be enabled. Click Run Test to call the LLM which return the response for the prompt based on the information in the uploaded document.
    Prompt test results
    • Document Name - The document that's used for test. Click to download the document.
    • Prompt - The prompt that's used for testing.
    • Response - The response provided by the LLM. Click to find the text snippet in the document from where the response is retrieved.
    • Date - The testing date.
    • Actions:
      • Copy - Copies this prompt to the Prompt field. You can use this to try out one of the previous tested prompts.
      • Delete - Deletes the test result. You can choose to delete old test results that aren’t needed anymore.
  4. Click Save.