Page tree

Machine Learning Actions

 Machine Learning (ML) actions are special actions that are used to channel artificial intelligence models in ways that can be easily used in a KB. Machine Learning actions are connected to a specific AI model that runs whenever that action is initiated. ML actions use the ext prefix when they are shown in the action list. In Agiloft, ML actions use AI models to analyze documents and extract relevant data.

At first glance, a ML action has four tabs. These four tabs are General, Model, Task, and Field Mapping. However, additional tabs can appear depending on the type of model you select. 

  • General: used to enter a name and description for the action.
  • Model: used to select the model that the action runs. The choice made here can cause new tabs to appear.
  • Task: primarily used to determine whether or not the action runs a model or helps to train a model. If the model you selected in the Model tab isn't trainable, the training option is unavailable. This tab is also used to configure the format and destinations of outputted metadata.
  • Labels: added to the wizard if you choose a model that identifies key term and/or clauses annotations, such as either of the ATHENA models. This tab allows you to pick and choose which annotations you'd like the model to extract from a contract document. This feature was added to ensure that users can customize their ML actions instead of needing to fully customize AI models. Labels and annotations are used interchangeably as a way to collectively refer to key terms and clauses.
  • Field Mapping: used to map the labels that were chosen on the Labels tab to fields in the KB after the AI model extracts the values from the contract document. The fields you can map to depend on the table you chose to create the action in.
  • Question Answering: added to the wizard if you choose a model that answers questions, such as the Question Answering model. This tab allows you to input questions for the model and map the answer it gives you to a specific field. This field can be thought of as another Field Mapping tab made specifically to accommodate Question Answering models.
  • Parameters: this tab is added to the wizard if you choose a model that identifies clauses. It is used to customize details about the AI model for this specific action.

Create a Machine Learning action

You can access the Actions wizard in several ways, but the easiest way is to select Setup [Table] from the table where you want to create the action.

  1. From the top nav bar, expand the table's drop-down and select Setup [Table].
  2. Select the Actions tab in the Table wizard.
  3. Click Create Machine Learning action.
  4. Give the action a name and description. Click Next.
  5. In the Model tab, select the AI model you want to use. Make sure the selected model shows Connected in the Status field. The model you choose here determines which tabs you need to complete in order to finish configuring the action.
  6. Click Next. Different tabs appear depending on the type of model you chose on the Model tab. 
  7. On the Task tab:
    1. If you are not training a model, select "Choose Calculate results from data in this table."
    2. Select whether you want the output to update one or more records.
      1. For the "Update a single record" option, select the ID field used to indicate the record being updated. This allows you to, for example, extract information and add it to a linked company record using the linked ID field.
      2. For the "Create/update multiple records" option, an Import action is needed to map the JSON in the JSON output field into records. For more information, see the Import from Agiloft Fields section of Import and Export Actions.
    3. Select the plain text field used to hold the JSON output from the AI model. All models use JSON as their data output format. This information is used for debugging, or as a placeholder before it is exported to another table, so the JSON field does not need to be included in the table layout.
  8. If you chose a model that extracts clauses or key terms, the Labels tab appears between Tasks and Field Mapping. Use this tab to determine which labels you'd like the model to identify. By default, all labels are selected. Select only the labels you need so that the action can run more quickly and efficiently. If the model you've chosen on the Models tab is a multimodel, you can see the labels contained by every submodel on the Labels tab along with the name of the model they belong to under the Group column.
  9. On the Field Mapping tab, there is a section called Model Inputs. In the input field, select the corresponding Agiloft field. This is generally a field that holds an attached file of the document in question. The data in this field is processed by the model. 

    If you chose a Question Answering model, the Field Mapping tab changes slightly. 
    You can now choose both an input field for the document file as well as an input field for the questions you'd like to ask the model. 

  10. In the Output Mapping section of the Field Mapping tab, set the confidence threshold for adding data to empty fields and overwriting existing data. In most cases, you should require a higher confidence threshold to overwrite fields that contain data. We recommend using a threshold of .95 for overwriting data and .70 for adding data to empty fields. If you chose a Question Answering model, there are outputs for the answer and the answer score.
  11. Below the confidence score options, the labels you selected on the Labels tab are all shown. Use this section to map the output data from the model to fields in your KB. Make sure you also have a field to hold each confidence score. The output confidence score is compared to the thresholds you set in step 10.
  12. If you chose a model that answers questions, the Question Answering tab appears after the Field Mapping tab. Use this tab to to provide questions for the model. These questions are automatically processed whenever the ML action runs. To create new questions, simply click the New Questions button. You can map the answers to these default questions to automatically populate fields in your KB.

  13. If you chose a model that extracts clauses, the Parameters tab appears at the end of the wizard. Go to this tab to customize AI model details for this specific action.
  14. Click Finish.