# Managing the taxonomy

> This section describes how to manage field groups, fields, and field types, as well as how to add prompt instructions.

This section describes how to manage field groups, fields, and field types, as well as how to add prompt instructions.

## Overview of prompt instructions

* **Overall extraction instructions** - provide context to the model that is relevant across the taxonomy, including details on the overall extraction task and the documents in the project.
* **Instructions** - provide context for the model on how to successfully extract data from the document. Iterating on instructions helps to improve predictions.

## Managing field groups

You can manage field groups from the following locations:

* **Manage Taxonomy** page.
* Annotation pane of the **Validate predictions** page.

### From Manage Taxonomy

Manage field groups directly in the inline table. This allows you to create, edit, move, or delete multiple items before saving your edits. All changes are applied at once when you save them and are saved as a single project version update, instead of generating a new version for each individual change.

#### Creating and configuring field groups

To create and configure field groups from the **Manage Taxonomy** page, proceed as follows:

1. Under the **Fields and field groups** tab, enter your instructions in the **Overall extraction instructions** field.
   :::note
   Project-level instructions can include a description of the industry or document type, or document-specific considerations, such as multiple occurrences of the document within one file.
   :::
2. Select **Field group** and fill in the following required fields in the inline table:
   :::note
   You can only add individual fields within their respective field groups after you create the field groups.​
   :::
   * **Name** - Give your field group a name using natural language.
   * **Instructions** - Give your field group a description, using natural language.
3. Under the new field group, select **Add** to add a **New field** or a **New field group**. The **New field group** option creates a child field group under the parent field group you created.
   :::note
   For more details on adding new fields, check [Creating and configuring fields](https://docs.uipath.com/ixp/automation-cloud/latest/user-guide/creating-and-configuring-fields#creating-and-configuring-fields).
   :::
To define a hierarchy between field groups, create a parent field group and then add one or more child field groups within it. This structure establishes the relationship between them, which means that if no predictions are returned for the parent field group, the child field groups will also return no predictions. The parent field group effectively serves as the primary classification, with its children providing additional levels of detail.
   :::note
   The instructions for a parent field group do not influence a child field group.
   :::
4. After making all of the changes, select **Save**. Changes are saved and applied in bulk.

   ![The Fields and field groups tab in Manage taxonomy.](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-the-fields-and-field-groups-tab-in-manage-taxonomy-631741-cc57fa11.webp)

You can add and configure additional field groups, fields, and field types directly from the **Validate predictions** page at any point during the annotation process.

#### Example of field groups and their hierarchies

The following example shows field groups and their hierarchies:

* Invoice​
  + Invoice Number​
* Invoice &gt; Line Items​
  + Unit Price​
  + Quantity​
  + Line Amount​​

:::note
If the model cannot find any Invoice field group in a document, that is the document is not an invoice, no Invoice &gt; Line Items is returned.​
:::

#### Editing field groups

You can edit your field groups directly in the inline table as follows:

1. In the **Manage Taxonomy** page, under the **Fields and field groups** tab, select the name of your field group or instructions.
2. Make your modifications.
3. Select **Save**.

#### Moving field groups

To move your field groups, proceed as follows:

1. In the **Manage Taxonomy** page, under the **Fields and field groups** tab, select the ellipsis button on the field group you want to move.
2. Select **Move**.

   ![The Move option for field groups in the Manage Taxonomy page.](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-the-move-option-for-field-groups-in-the-manage-taxonomy-page-631737-4337c6aa.webp)
3. In the **Move field group** window that appears, select the dropdown list.
4. Select the new parent for your field group.
   :::note
   The greater-than sign `&gt;` is used to define the field group hierarchy. This sign establishes a relationship between the parent field group and the child field group.
   :::

   ![The Move field group window.](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-the-move-field-group-window-631747-7a568a61.webp)
5. If the field group is a child, you can also select **None** from the dropdown list to make it a parent field group instead.
6. Select **Move field group**.
7. Select **Save**.

#### Deleting field groups

To delete your field groups, proceed as follows:

1. In the **Manage Taxonomy** page, under the **Fields and field groups** tab, select the ellipsis button for the field group you want to remove.
2. Select **Delete**.
3. In the **Confirm delete** window that appears, select **Delete**.
   :::important
   Deleting a field group will result in the loss of its annotations. This action can only be undone by reverting to a previously published model version. Publish the latest model version before making significant changes.
   :::

### From the annotation pane

#### Creating and configuring field groups

To create and configure field groups from the annotations pane in the **Validate predictions** page, proceed as follows:

1. In the annotation pane, select **Add field group**.

   ![The Add field group button in the Validate predictions page.](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-the-add-field-group-button-in-the-validate-predictions-page-631777-c6cad15a.webp)
2. Select **New field group**.
3. In the **Add field group** side panel, fill in the following fields:
   * **Field group name** - Give your field group a name using natural language.
   * **Instructions** - Give your field group a description, using natural language.
4. Select **Add**, which turns the current
5. In the **Edit field group** side panel, you can edit the field group you created and add new fields using the **New field** button.

#### Editing field groups

To edit your field groups, proceed as follows:

1. In the annotation pane, hover over your field group and select the ellipsis button.
2. Select **Edit field group**.
3. In the side panel that appears, under **Field group details**, you can edit the instructions, as well as edit and delete fields.
4. Select **Save** after you perform your modifications.

   ![The Edit field group option in the annotation pane, in the Validate predictions page.](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-the-edit-field-group-option-in-the-annotation-pane-in-the-validate-predictions-page-631781-f155a4e1.webp)

#### Dismissing field groups

If you want the model to exclude a field group, proceed as follows:

1. In the annotation pane, hover over your field group and select the ellipsis button.
2. Select **Dismiss field group**. This action makes the field group appear with a crossed line.
3. To revert the changes, select **Revert field group dismissal** from the ellipsis for the same field group.

## Managing fields

You can manage fields from the following locations:

* **Manage Taxonomy** page.
* Annotation pane of the **Validate predictions** page.

### From Manage Taxonomy

Manage fields directly in the inline table. This allows you to create, edit, move, or delete multiple items before saving your edits. All changes are applied at once and saved as a single project version update, instead of generating a new version for each individual change.

#### Creating and configuring fields

To create and configure fields from the **Manage Taxonomy** page, proceed as follows:

1. Under the **Fields and field groups** tab, expand the field group to which you want to add fields.
2. Select **Add**.
3. Select **New field** to create individual fields.
4. In the inline table, fill in and configure the required details as follows:
   * **Name** - Give your field a name that accurately describes the data it represents.
   * **Instructions** - Give your field a relevant and detailed description to provide the necessary context for extraction.
   * **Field type** - Each field must have assigned a field type, which can be one of the pre-configured or custom field types. Use the **Field type** drop-down menu and select one of the pre-configured options: **Date**, **Exact Text**, **Inferred Text**, **Monetary Quantity**, **Number**, or **Boolean**.
     :::note
     * You can reuse field types across different fields, which allows you to share the instructions.
     * You can change the field types once the field is created. However, changing the field type will result in the loss of any
     existing annotations.
     * Text field type can have input values that are present in the document and extracted as-is (**Exact Text**), or can be inferred from the document, if it is not explicitly stated in the text (**Inferred Text**).
     :::
      If you want to create a custom field type, select the **New field type** option from the drop-down list. For more details, check [Creating and configuring field types](https://docs.uipath.com/ixp/automation-cloud/latest/user-guide/creating-and-configuring-fields#managing-field-types).
      * **Data type** - This field is filled in automatically, depending on the field type you select.
5. Select **Save**.

   ![The Fields and field groups tab with steps that show how to create and configure a new field.](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-the-fields-and-field-groups-tab-with-steps-that-show-how-to-create-and-configure-a-new-field-631824-3836ab0d.webp)

#### Editing fields

You can edit your fields directly in the inline table as follows:

1. In the **Manage Taxonomy** page, under the **Fields and field groups** tab, expand the field group where the field is.
2. Select the field name, instructions, or field type.
3. Make your modifications.
4. Select **Save**.

#### Moving fields

To move your fields within the same field group they are part of, proceed as follows:

1. In the **Manage Taxonomy** page, under the **Fields and field groups** tab, hover over your field.
2. Use the drag handle to move your field anywhere within the field group it is part of.
3. Once you are happy with the new order, select **Save**.

To move your fields to other field groups, proceed as follows:

1. Select the ellipsis button for the field you want to move.
2. Select **Copy field definition**, which copies the entire field along with its details.
3. Next, select the field groups where you want to paste the copied field.
4. Once you select the field groups, select **Paste** in the window that appears.

Alternatively, to move all fields from one field group to another, follow the same steps as previously described, but make sure to select the ellipsis button for the field group where the fields you want to move are located.

#### Deleting fields

To delete your fields, proceed as follows:

1. In the **Manage Taxonomy** page, under the **Fields and field groups** tab, select the ellipsis button for the field you want to remove.
2. Select **Delete**.
3. In the **Confirm delete** window that appears, select **Delete**.
   :::important
   Deleting a field will result in the loss of its annotations. This action can only be undone by reverting to a previously published model version. Publish the latest model version before making significant changes.
   :::

### From the annotation pane

#### Creating and configuring fields

To create and configure fields from the annotations pane in the **Validate predictions** page, proceed as follows:

1. In the annotation pane, hover over your field group and select the ellipsis button.
2. Select **Edit field group**.

   ![The Edit field group option in the annotation pane, in the Validate predictions page.](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-the-edit-field-group-option-in-the-annotation-pane-in-the-validate-predictions-page-631781-f155a4e1.webp)
3. In the side panel that appears, select **New field** and fill in the required fields:
   * **Name** - Give your field a name.
   * **Field type** - Select from the dropdown list one of the pre-configured options: **Date**, **Exact Text**, **Inferred Text**, **Monetary Quantity**, **Number**, or **Boolean**.

     :::note
     * You can reuse field types across different fields, which allows you to share the instructions.
     * You can change the field types once the field is created. However, changing the field type will result in the loss of any
     existing annotations.
     * Text field type can have input values that are present in the document and extracted as-is (**Exact Text**), or can be inferred from the document, if it is not explicitly stated in the text (**Inferred Text**).
     :::

   If you want to create a custom field type, select the **New field type** option from the drop-down list. For more details, check [Creating and configuring field types](https://docs.uipath.com/ixp/automation-cloud/latest/user-guide/creating-and-configuring-fields#managing-field-types).
      * **Instruction** - Describe what you want to extract from the documents and how to extract the details.

   ![The fields to configure when adding a new field from the annotation pane.](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-the-fields-to-configure-when-adding-a-new-field-from-the-annotation-pane-631846-0f8b1d1f.webp)
4. Select **Save**.
:::note
You can also edit fields from the same **Edit field group** side panel.
:::

#### Deleting fields

To delete fields from the annotation pane, proceed as follows:

1. In the annotation pane, hover over your field group and select the ellipsis button.
2. Select **Edit field group**.
3. In the side panel that appears, select the ellipsis for the field you want to remove.
4. Select **Delete**.
5. In the **Confirm delete** window that appears, select **Delete**.
   :::note
   Deleting a field will result in the loss of its training data. This action can only be undone by reverting to a previous pinned model version. Pin the latest model version before making significant changes.
   :::

   ![The Delete field button in the Edit field group side panel in the Validate predictions page.](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-the-delete-field-button-in-the-edit-field-group-side-panel-in-the-validate-predictions-page-631879-b08b2362.webp)

## Managing field types

### Creating and configuring field types

To create and configure new field types, follow these steps:

1. Select **New field type** in the **Field types** tab from the **Manage taxonomy** page.

   ![The image shows the New field type button.](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-the-image-shows-the-new-field-type-button-570794-ceef2c5f.webp)
2. Fill in the required fields:
   * **Name** - the name of the field type.
   * **Instruction** - should include common instructions on how the data is formatted and should be extracted for all fields that share the field type.

     :::note
     * You can reuse field types across different fields, which allows you to share the instructions.
     * The **Instruction** field guides how values are extracted. For data types with pre-trained models - **Date**, **Number**, and **Monetary Quantity** - the output format is fixed and cannot be changed through this field.
     :::

3. Use the **Data type** drop-down list to select one of the following values:
   * **String**: can include any characters such as letters, numbers, and so on. It can also have input values that are explicitly present in or inferred from the document. For example, organization name, first name, address line​, or phone number.
     + Select one of the following for the **Input value**:
       - **Must be present in the document**: the value must be extracted exactly as it appears within the document.
       - **Inferred from the document**: the extracted value can be inferred from context and does not need to exactly match the text within the document. You can use the instruction field to normalize the output into a specific format, for example phone numbers as `+1 (XXX) XXX-XXXX`.
   * **Date**: comes in unstructured formats that vary, and uses the UiPath pre-trained date field. For example, start dates, expiration dates.
   * **Number**: comes in unstructured formats that vary, and uses the UiPath pre-configured field type to structure the values in a standardized format. For example, the number of items​, change in percentage​, decimal values.
   * **Monetary Quantity**: comes in unstructured formats that vary, and uses the UiPath pre-trained monetary quantity model. For example, total premium value, fees due. ​
   * **Boolean**: True or False values that are inferred from documents. For example, True can be for an existing customer and False for a non-existent customer.
   * **Choice**: the Inferred or Exact values that are mapped to a set of pre-defined values. For example:
     + Languages: English, German, French.
     + Document types: water bill, gas bill, energy bill.
     + Product categories: investment account, savings account, current account.
     + Customer types: tier 1, tier 2, tier 3.Once you select **Choice** as your data type, the following options are displayed:
     + **Display value**
     + **Alternate Values**
     + **Add choice**You can input values and optionally annotate evidence. The value will be mapped to a set of given values where possible.

     :::important
     Once the data type is configured, you cannot change it. Make sure you select the correct data type, otherwise, you must delete the field type and recreate it with the correct data type. This is because you cannot remap annotations for incompatible field types that have different data types.
     :::

4. Select **Save**.

   ![This image shows the fields of the New field type button.](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-this-image-shows-the-fields-of-the-new-field-type-button-570788-4c8f6d5a.webp)

### Example of inferred and exact fields

**Inferred fields**

I work for the underwriting operations team at an insurance company, and we have hundreds of set policy categories, for example, automotive, home, health, luxury goods, and so on, that we offer to customers, each corresponding to a Type category, for example, Type A, B, C, and so on.

Based on the content of the document, I want to be able to extract and identify the Type category of the policy that needs to be processed.

In this example, there is nowhere in the message that explicitly states that this email pertains to Type E. In the instructions, context is provided for each insurance type to inform the predictions of the model. For example, claims related to luxury goods all belong to the Type E category.

Examples of fields that might need to be set up as Inferred:

* Values that are not present anywhere in a document, but are implied from its context
* Values that need to be concatenated across different areas in a document.
* Values that span across multiple paragraphs, lines, or columns.

**Exact fields**

To facilitate this request, I may need the existing policy number, name, and the value claimed. These are values that I know need to be explicitly stated in the document itself and extracted into a downstream process.

Figure 1. Example of inferred and exact fields

  ![The image shows an example of inferred and exact fields.](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-the-image-shows-an-example-of-inferred-and-exact-fields-565255-3084ad48.webp)
