Generative AI
With Agiloft's generative AI capabilities, you can leverage large language models to streamline contract negotiation, review, and redlining.
Use Generative AI to improve clauses in a contract document, as well as redline changes to keep track of what the AI did to improve the clause. To access these features, open the Word app and use
the Align Clauses and Revise with AI buttons.
Align Clauses
Use Align Clauses to improve tagged clauses from a contract draft by bringing them in line with approved, vetted clauses from your Clause Library. For example, this can take a non-standard Force Majeure clause and adjust it to match the Force Majeure clause in your Clause Library.
- Open the contract in Microsoft Word.
- Open the Agiloft Contract Assistant and log in.
- Create the Contract record. For information on how to do so, visit the Getting Started section of Using the Word app.
- Click Generate Tags.
- Check your clauses and see if any need to be modified. When you find one, click it in the right pane of the Word app.
- Click Check playbook.
- Look through the Clause Library to find a clause that aligns with the clause you selected in step 5. You can see how the tagged clause compares with the Clause Library clause using the redlines toggle at the top of the pane. Options include differences, similarities, or merged inline.
- Click Align Clauses, and Generative AI drafts a new clause that aligns the contract clause with the Clause Library clause.
- If the drafts looks good, click Replace contract clause. Otherwise, click Regenerate to create a different draft of the new clause. You can also edit the draft directly.
- Once you click Replace contract clause, the contract clause text is replaced with the text that Generative AI suggested, and redlining appears in the document to show where the changes took place.
Revise with AI
Revise with AI is used to give AI direct suggestions about how to revise a clause. This is especially useful if you don't have a Clause Library, or if your library doesn't have a comparable clause.
- Open the contract in Microsoft Word.
- Open the Agiloft Contract Assistant and log in.
- Create the Contract record. For information on how to do so, visit the Getting Started section of Using the Word app.
- Click Generate Tags.
- Check your clauses and see if any need to be modified. When you find one, click it in the right pane of the Word app.
- Click Check playbook.
- On the top of the pane, click Revise with AI.
- Add instructions for AI regarding what to add to the clause. For example, if you wanted to change a Limited Liability clause into a Mutual Limited Liability clause, you could enter "Make Mutual" as a prompt.
- Click Generate.
- Generative AI drafts a suggested revision based on your request. If it looks good, click Replace. Otherwise, try rephrasing your instructions before reclicking Generate, or edit the clause manually and insert your modified version into the contract.
- Once you click Replace clause, the clause text is replaced with the text that Generative AI suggested, and redlining appears in the document to show where the changes took place.
Anonymize Clause
This feature makes it easy to anonymize extracted contract clauses so you can add them to your Clause Library and reuse them in other contracts. For example, if you have a contract clause that refers to a specific Company Name or Dollar Amount, you can use this new feature to replace the actual Company Name and Dollar Amount with placeholder values.
To use this feature:
- Edit a Contract Clause record and click the Save to Clause Library button.
- In the window that opens, review the anonymized version of the clause that appears, along with options for Boilerplate distinction and Clause Type, as well as the Guidance field.
- Click Save to Clause Library.
Now, an anonymized version of this clause is available in your Clause Library for use with the designated Clause Type. When you insert the clause from the Clause Library in the future, you can then modify these placeholder values manually to reflect the proper contract values.
Setting Up Anonymize Clause
If your Contract Clause table doesn't already have the Save to Clause Library button that anonymizes the clause, follow these steps to add this feature to your KB.
Anonymize Clause action
First, create an action that uses AI to anonymize the selected clause:
- In your KB, navigate to Setup [Contract Clause].
- On the Actions tab, click Generative AI Action.
- Name it Anonymize Clause and click Next.
- Select Pre-built by Agiloft and select Anonymize Clause.
- Click Copy and rename the prompt Anonymize Clause Custom. Click Next.
- Paste the following text into the Prompt Input field:
- In the Parameters field, add the following:
{ "max_new_tokens": 1000, "temperature": 0.2, "return_full_text": false }
- Click Finish.
Save to Clause Library Modal
Next, create the modal window that appears so you can review the generated text before saving it to your clause library.
- Navigate to Setup [Contract Clause].
- On the Fields tab, go to New > Text.
- Name the field Anonymized Clause Text.
- On the Options tab, set the maximum length to 10000000.
- On the Display tab, set the Height of the input field to Multi-line 3 rows high, and select the Field will auto-expand checkbox.
- Click Finish.
- Again on the Fields tab, go to New > Choice.
- Name the field: Boilerplate?
- In the Select choice list field, choose Yes/No.
- On the Options tab, select 'Choose one' as the default value to display.
- Go to the Display tab and click Finish.
- Again on the Fields tab, go to New > Text.
- Name the field Guidance.
- On the Options tab, set the maximum length to 10000000.
- On the Display tab, set the Height of the input field to Multi-line 3 rows high, and select the Field will auto-expand checkbox.
- Click Finish.
- On the Actions tab, click Modal Action.
- Name it Save to Clause Library Modal and click Next.
- In the Modal Header Text field, enter Edit Clause.
- In the Modal Instructional Text field, enter Edit your clause before saving to the clause library.
- Add the following fields you just created, along with Contract Clause Type:
- Anonymized Clause Text
- Boilerplate?
- Guidance
- Contract Clause Type
- In the Save Button Text field, enter Save to Clause Library.
- Click Finish.
Convert into Clause Record
Now you can automate the process to store the reviewed text as a new entry in the Clause Library.
- Navigate to Setup [Contract Clause].
- On the Actions tab, click Data Conversion Action.
- Name the action Convert into Clause Record and click Next.
- On the Conversion tab, click New.
- Name the conversion Convert into Clause Library (GenAI).
- Make sure Clause Library is selected in the Table Tree and click Next.
- On the Field Mapping tab:
- Map Anonymized Clause Text to Clause Text.
- Map Boilerplate? to Boilerplate?
- Map Contract Clause Type ID to Clause Type ID.
- Map Guidance to Guidance.
- Map ID to Contract Clause Source Clause ID.
- Click Next.
- On the Options tab, click Finish.
Save to Clause Library Action Button
Now, simply add the action button that begins the process.
- Navigate to Setup [Contract Clause].
- On the Fields tab, go to New > Action Button.
- Name the button Save to Clause Library.
- Display the field with the text Save to Clause Library, or whatever text you want to appear on the button in the record form.
- Add the following actions in order:
- ext: Anonymize Clause
- MA: Save to Clause Library Modal
- C: Convert into Clause Record
- Under After executing actions, choose Save and Open record for view.
- Go to the Display tab and click Finish.
- On the Layout tab, add the Save to Clause Library action button to the layout.
Now, you can follow the workflow described above to anonymize clauses.
Red Flag Assessment
This feature allows you to identify undesirable data in contract clauses, making contract review quicker, easier, and safer. When clauses are extracted from a contract, they are each compared to a prepared list of definitions for their Clause Type, with AI analysis assigning a risk level of Low, Medium, or High for each one and an explanation of that assessment.
You can use this information to create review workflows and add other safeguards to thoroughly vet higher risk contracts.
Setting Up Risk Analysis and Red Flag Detection
If you don't have AI risk analysis already set up in your Contract Clause table, you can add it manually.
- In your KB, navigate to Setup [Contract Clause].
- On the Fields tab, go to New > Text.
- Name the field AI Risk Analysis.
- On the Options tab, set the maximum length to 10000000.
- On the Display tab, set the Height of the input field to Multi-line 3 rows high, and select the Field will auto-expand checkbox.
- Click Finish.
- On the Layout tab, add the AI Risk Analysis field to the Latest Clause Text section of the Contract Clause tab and click Finish.
- Navigate to Setup [Clause Type].
- On the Fields tab, go to New > Text.
- Name the field Risk Definition.
- On the Options tab, set the maximum length to 10000000.
- On the Display tab, set the Height of the input field to Multi-line 3 rows high, and select the Field will auto-expand checkbox.
- Click Finish.
- On the Layout tab, add the Risk Definition field to the Clause Type tab next to the Description field, and click Finish.
- In the Clause Types table, for each Clause Type you want to include in risk analysis:
- Edit the Clause Type record.
- In the Risk Definition field, enter a thorough description of risks for that clause type, including details for low-risk, medium-risk, and high-risk clauses. This text is later passed to the generative AI model as part of the instructions. You can click the Clause Types below for some examples of proper risk definitions for a few different clause types.
- Click Save.
- Repeat for each Clause Type you want to analyze for risks.
- Navigate to Setup [Contract Clause] and go to the Fields tab.
- Edit the set of fields linked to the Clause Types table.
- On the Fields tab, add the Risk Definition field.
- Go to the Display tab and click Finish.
- Back in Contract Clause table setup, go to the Layout tab and add the Risk Definitions field to the Latest Clause Text section of the Contract Clause tab and click Finish.
Now that you have defined risks for each clause type and prepared a field to show the final risk level, it's time to add the automation that actually analyzes the clauses in a contract.
- Go to the Rules tab and click New.
- In the Description field, name the rule On Create: AI Risk Analysis and click Next.
- On the Rule Type tab, select When a Contract Clause is created/edited/deleted, and select the Run in background checkbox.
- Click Next.
- Under Apply Rule:
- For When a Contract Clause is, only select Created.
- For Only when the change occurs by means of, select all three options.
- For When saving a record, select both options.
- Under Search Condition, click Create New Search.
- Click Simple to add a Simple filter.
- Select the Source field in the second drop-down.
- Select the "equals, =" operator.
- Select Value and select Extracted/Tagged Clause.
- Go to the Options tab and name the search Clause is Type Extracted/Tagged.
- Click Finish.
- Go to the Action tab and click If-Then-Else action.
- Name the action AI Risk Analysis or similar, then click Next.
- Click Add If.
- Click Simple to add a Simple filter.
- Select the Risk Definition field in the second drop-down.
- Select the "does not equal, !=" operator.
- Select Variable and enter $NULL.
- Click Simple again to add a second Simple filter.
- In the leftmost drop-down, select AND.
- Select the Source field in the second drop-down.
- Select the "equals, =" operator.
- Select Value and select Extracted/Tagged Clause.
- Click Finish to apply the filters to the Add If statement.
- With the If condition defined, select the next line showing "...".
- Click Add Action and choose Generative AI Action.
- Give the action a name, such as Compare Clause Text Against Risk Definition, and click Next.
- On the Templates tab, choose Custom.
- Edit Assess Contract Against List of Red Flags.
- On the Prompt tab, enter the following in the Prompt Input field. You might have to change the field references to Clause Text and Risk Definition to reflect the fields' logical names in your system.
You are a legal expert. You will be provided the text of a clause in a legal contract, as well as the definition of risk for that type of clause. Assess the clause from the contract against the risk definition and provide the results of your assessment in the following format. Remove all brackets from your response.
Risk Level: [Low, Moderate, High]
Justification: [Description justifying the risk level]Clause Text: $accepted_clause_text
Risk Definition: $clause_type_risk_definition - In the Output Field, select the AI Risk Analysis field.
- Click Finish in the GenAI action wizard.
- Click Finish in the If-Then-Else action wizard.
- Click Finish in the Rules wizard.
With this configuration, when a Contract Clause record is created by any means, and the clause is extracted or tagged, this rule automatically runs your Generative AI action to review the clause text and the clause type risk definitions and flag any potential risks.
Data & Document Mismatch
This feature makes it easy to compare the data stored in your Agiloft fields against the data contained in a contract document. For example, this prompt can find out if the contract start data in the document is different than the contract start date stored in the Agiloft field.
To use this feature:
- Navigate to the Data & Document mismatch tab of your Contract record.
- Click the Run Data & Document Mismatch Check action button.
Now, you can see any mismatched data in your contract record.
Setting Up Data and Document Mismatch
If your Contract table doesn't already have the Data and Document Mismatch Button and Tab, follow these steps to add them to your KB.
Data and Document Mismatch Output Field
Create a new text field in your Contract table named Data and Document Mismatch Output field.
- In your KB, navigate to Setup [Contract].
- Navigate to the Fields tab.
- Click New and select Text.
- Name the field Data & Document Mismatch Output.
- Click Finish.
Data and Document Mismatch Action Button
Create an action that uses AI to run the Data and Document Mismatch Check:
- In your KB, navigate to Setup [Contract].
- Navigate to the Fields tab.
- Click New and select Action Button.
- Name the field Data and Document Mismatch Check.
- Give the button the display text Data and Document Mismatch Check.
- Select the Execute Actions checkbox and click Add Action.
- Choose Generative AI Action.
- Name it Data and Document Mismatch and click Next.
- Select Pre-built by Agiloft and select Data and Document.
- Click Copy. Rename the prompt Data and Document Mismatch. Click Next.
- In the prompt, ensure to read and then delete the legal preamble. Modify the prompt to ensure Data and Document Mismatch is running on the fields that are relevant to you.
- Choose the Data & Document Mismatch Output field as the output field.
- Click Finish in the prompt window.
- Click Finish in the action wizard.
- Click Finish in the Rules wizard.
- Click Finish.
Data and Document Mismatch Tab
Create the Data and Document Mismatch tab in the layout editor of the Contract table. Add the new action button and output field onto the tab.
- In your KB, navigate to Setup [Contract].
- Navigate to the Layout tab.
- Click the Add Tab button in the Tabbed Area.
- Name it Data and Document Mismatch.
- Click Finish.
- Add the action button field and the text field to the tab.
- Click Finish.
Clause Analysis
This feature makes it easy to compare the clauses extracted from your contracts. You can use this analysis to identify non-standard clauses, as well as generate standard and fallback clause library positions.
To use this feature:
- Navigate to the Clause Types table and open the Clause Type record you wish to analyze.
- In the Clause Analysis tab, click the Clause Analysis button.
After clicking the button, a report of clause data, a standard clause, and a fallback clause are generated in the Clause Type record.
Setting Up Clause Analysis
If your Clause Types table doesn't already have the Clause Analysis button and tab, follow these steps to add this feature to your KB.
Clause Analysis output fields
First, create 3 new text fields in your Clause Types table.
- In your KB, navigate to Setup [Clause Types].
- Navigate to the Fields tab.
- Click New and select Text.
- Name the field Clause Analysis Output.
- Click Finish.
- Repeat steps 1 through 5 again, but name the field Standard Clause Generation Output.
- Repeat steps 1 through 5 one last time, but name the field Fallback Clause Generation Output.
Clause Analysis action
Create an action that uses AI to analyze the selected clause type:
- In your KB, navigate to Setup [Clause Type].
- Navigate to the Fields tab.
- Click New and select Action Button.
- Name the field Run Analyze Clauses.
- Give the button the display text Run Analyze Clauses.
- Select the Execute Actions checkbox and click Add Action.
- Choose Generative AI Action.
- Name it Generate Standard Clause and click Next.
- Select Pre-built by Agiloft and select Generate Standard Clause.
- Click Copy. Rename the prompt Generate Standard Clause. Click Next.
- In the prompt, ensure to read and then delete the legal preamble. Modify the prompt to ensure the related table referenced in the prompt has the same field name as the one in your KB. You can check the name using the formula help wizard.
- Choose the Standard Clause Generation Output field as the output field.
- Click Finish in the prompt window.
- Click Finish in the action wizard.
- Click Finish in the Rules wizard.
- Click Finish.
- Repeat steps 3-25 again, except name the action Generate Fallback Clause in step 8 and select Fallback Clause Generation Output in step 12.
- Repeat steps 3-25, except name the action Analyze Clauses in step 8 and select Clause Analysis in step 12.
- Click Finish in the prompt window.
- Click Finish in the action wizard.
- Click Finish in the Rules wizard.
- Click Finish.
Clause Analysis Tab
Create the Clause Analysis tab in the layout editor of the Contract table. Add the new action button and output field onto the tab.
- In your KB, navigate to Setup [Contract].
- Navigate to the Layout tab.
- Click the Add Tab button in the Tabbed Area.
- Name it Clause Analysis.
- Click Finish.
- Add the action button field and the text field to the tab.
- Click Finish.