Page tree

AI Trainer

AI Trainer is Agiloft's proprietary platform for training AI models. With AI Trainer, you can customize the type of content that AI can extract from contracts.

This process works by feeding an AI model a dataset that contains examples of what you'd like it to recognize. Once it has been trained on that dataset properly, it will be able to recognize similar content.

Using AI Trainer

Consult the following sections for information on how to use AI Trainer to build a custom model.

Creating an AI Project

All trainings go through the AI Project record. To create an AI Project:

  1. In your KB, navigate to the AI Projects table.
  2. Click New.
  3. Choose AI Label Training from the Type drop-down list.
  4. Name the project.
  5. Click the search icon next to Models.
  6. Select one or more label-finding models you'd like to train. You can add as many labels as you like to the same project. The models you select here represent what you will be able to tag in your training set documents. You can also create a new record here, as long as you verify it hasn't already been created. If you need to create a new Model record:
    1.  Select Label Model from the Create new drop-down at the top right-hand corner of the Model search.
    2. A modal window opens. Add a Name. Changing this name at a later date could cause your model to fail.
    3. Choose a Model Type.
    4. Optionally add a value for Applies to Document Types based on the type of contract that this training applies to. Leaving this field blank indicates that this is a generic label-finding model that can be used on multiple contract types.
    5. To the right of Associated Label Library Entry, either:
      • Click Link to existing Label if you already have a relevant Label record in your Label Library table that this Label Model could be stored under.
        1. Select the proper Label record.
        2. Click Import/Append.
      • Click New if you do not have a relevant Label record in your Label Library table.
        1. Add a Name.
        2. Add a Label Type.
        3. Click Save.

Preparing the Document Set

  1. From the Add Documents From drop-down list, select the location of your document set. While it's convenient to have them in one source, you can add these documents from any combination of the following places by changing the drop-down list value to another source after the documents have been added from one. You should add at least 20 documents.
    • Upload from your computer: select contracts saved on your computer to use as training data.
    • Another AI Project: use contracts that were already added to an existing AI Project record.
    • Agiloft Contract Lifecycle Management: select contracts that already exist as Attachments in your KB.
  2. Click Attach/Manage or drag and drop files to add documents.
  3. When you've added all the files, click Add Documents. They now appear in the Training Set Documents section of the project with a status of Processing, where they are evaluated for Document Quality and Document Type. When a document has been fully processed, the quality and type are updated and the status changes to Ready to Annotate. Any documents that can't be analyzed are shown on the Flagged Documents tab. Remember: variety is more important than the quality of a single document, so if you see that OCR has done a poor job and the data seems off around the words you would like to label, it is usually best to unlink this document from the project.
  4. Now, begin annotating the Ready to Annotate documents. This may vary according to your project's labeling policy, so be sure that you have a strong understanding of the scope of the policy and written guidelines you can refer to for decision making.
  5. Open a document from the Training Set Documents table.
  6. Highlight text in the document that correlates to the models you chose when creating the AI Project, and select the respective model from the drop-down list that appears.
  7. When the annotations have been completed for the document, click Ready to Train.

Training and Testing the Model

  1. Once all the documents have been annotated, navigate to the Training tab and click Start Training. This is what actually creates the new model.
  2. When the model is done training, you will get an F1, Precision, and Recall score. The metrics that you are looking for here will vary depending on your labeling policy, but generally the closer to 1, the better your model is performing. You will likely have to make some iterations to reach your desired metrics, but now that you have a base model, you can test and iterate it.
  3. To test the model, navigate to the All Documents tab and select a document with the Ready to Annotate status. You can click Generate AI Suggestions from here, or open the document in document viewer and click Generate AI Suggestions there.
  4. Navigate to the AI Suggestions tab in the document viewer if you aren't there already. From here, you can see examples of labels that the model has tagged. You can accept suggestions that reflect what you want the model to do, as well as remove suggestions that don't. This is a quick and easy way to give the model some reinforcement training. You can also use the Review Attachments button in the AI Projects or Label Models table to generate an .xlsx file of your annotations to review data quality.
  5. Continue iterating the model using documents from the document set until you get metrics that align with your labeling policy. Now, you can publish the model for use in your KB.

Publishing the Model

  1. From the Training tab of the AI Project record, click Publish.

The label now shows a Model Status of Published, and is now accessible for use with Document Analysis and Machine Learning actions in Agiloft. Your label model needs to be attached to a Label Library record to become available to run in actions, however. You may create a new record, if your label is new to the system, or attach it to an existing Label Library record and incorporate your custom model into an existing process.


CONTENTS