# Enrichment

This feature enables you to automatically enrich the extraction results of a document with data from the CSV file that uses commas "," to separate values.

{% hint style="info" %}
The enrichment data will be selected based on the extracted result from your document.
{% endhint %}

### Start with the Configuration

First, select one of your supervised processes from your Dashboard. Once you are in the **Queue** view, click the [Configuration](https://alphamoon.gitbook.io/documentation/platform-walkthrough/configuration) button.&#x20;

<figure><img src="https://1037371503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3NQDmelveCcQtL0yaFs%2Fuploads%2FrAGn9ChFbVLujqFDM6NI%2FZrzut%20ekranu%202024-04-18%20o%2016.48.54.png?alt=media&#x26;token=2bc7e44f-5c15-44f4-8efd-3ce607b1d14c" alt=""><figcaption><p>Configuration button</p></figcaption></figure>

In the Configuration, from the navigation on the left side of the page, select the **Enrichment** tab:

<figure><img src="https://1037371503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3NQDmelveCcQtL0yaFs%2Fuploads%2F0rJSPNkVTgRTni6G9sZk%2FZrzut%20ekranu%202024-04-15%20o%2013.01.28.png?alt=media&#x26;token=3125a408-fd75-4519-81e0-35cf1e02a179" alt=""><figcaption><p>Enrichment tab</p></figcaption></figure>

### Add new enrichment

Next, click the **+ New enrichment** button to open the right-hand settings panel:

<figure><img src="https://1037371503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3NQDmelveCcQtL0yaFs%2Fuploads%2Fxmb24XZma70MMJgm5H6m%2FZrzut%20ekranu%202024-04-15%20o%2013.24.42.png?alt=media&#x26;token=d39ccddd-ed8b-468e-b72f-2e8ec3ea8db0" alt=""><figcaption><p>+New enrichment button</p></figcaption></figure>

<figure><img src="https://1037371503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3NQDmelveCcQtL0yaFs%2Fuploads%2FGC6EYsYb5ltDk4SQ0glO%2FZrzut%20ekranu%202024-04-15%20o%2013.25.11.png?alt=media&#x26;token=13db4459-469d-49f3-8f69-f96eae775c02" alt=""><figcaption><p>Right-hand settings panel</p></figcaption></figure>

{% hint style="info" %}
Bear in mind that your setting will be applied to each new collection you upload and to any existing ones that you choose to reprocess.
{% endhint %}

### Upload your CSV file

Start with adding your CSV file that contains the data you want to enrich your document extraction results with.

<figure><img src="https://1037371503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3NQDmelveCcQtL0yaFs%2Fuploads%2F7XWMHAcXV0CUIHcfaZbG%2Fimage.png?alt=media&#x26;token=607f6461-1e6e-40cb-9351-da012d782881" alt=""><figcaption><p>Upload CSV file</p></figcaption></figure>

### Key mapping

Now, go to the key mapping step. We define keys as columns that help us match the right rows in your CSV file.  All you need to do is specify how column names from your file correspond to Alphamoon's extraction fields.

Take a look at the example:

<figure><img src="https://1037371503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3NQDmelveCcQtL0yaFs%2Fuploads%2FK5XZ6AnHfjOuO1Rforjl%2FZrzut%20ekranu%202024-04-18%20o%2015.17.44.png?alt=media&#x26;token=48ee20fa-813a-40f7-8699-0a395eb6e538" alt=""><figcaption><p>Key mapping</p></figcaption></figure>

You can add new mapping by clicking the **+Add mapping** button.

### Field settings

Fields are the column(s) from your CSV file that contains the data used to enrich the extraction results.

#### Set the enrichment name

Once you define the key mapping, type the name of your Enrichment. We will use it as the name of the additional section in the [Supervision](https://alphamoon.gitbook.io/documentation/platform-walkthrough/supervision). In this tutorial, we will name the enrichment as "Additional data".&#x20;

Now, select, if the enrichment section is mandatory or not.&#x20;

{% hint style="info" %}
If you select ‘**No**’, capturing the just defined data from every document will not be necessary for the whole collection to get the "Accepted" status.

Go with ‘**Yes**’ in case you wish to see the Needs review status for the whole collection every time the defined data won't be captured from each of your documents automatically.
{% endhint %}

#### Choose data points to include

You can decide which data points you want to include in your "Additional data" enrichment section. Similarly to the previous step, decide whether they are mandatory or not.

<figure><img src="https://1037371503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3NQDmelveCcQtL0yaFs%2Fuploads%2FrfI47BBsd0MHf9ueqISM%2FZrzut%20ekranu%202024-04-18%20o%2015.32.21.png?alt=media&#x26;token=5e30bcbe-c556-406e-9600-689d554e9ac5" alt=""><figcaption><p>Field settings</p></figcaption></figure>

Once you finish setting up the field details, click the **Add** button at the top of the panel:

<figure><img src="https://1037371503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3NQDmelveCcQtL0yaFs%2Fuploads%2FiKF6YxyQfuyxbHBWnvo4%2FZrzut%20ekranu%202024-04-18%20o%2015.36.13.png?alt=media&#x26;token=3cb65abe-5056-461b-8aac-61dcc963ea3e" alt=""><figcaption><p>Add button</p></figcaption></figure>

Your new enrichment will be listed as follows:

<figure><img src="https://1037371503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3NQDmelveCcQtL0yaFs%2Fuploads%2FNMPyM5oKAVVuk8MZHdLD%2Fimage.png?alt=media&#x26;token=1d1f451e-3ce2-448f-89b8-e51ef0ff4518" alt=""><figcaption><p>New enrichment</p></figcaption></figure>

{% hint style="info" %}
You can add **multiple** enrichments.
{% endhint %}

### Upload collections or reprocess existing ones

To see the enriched results, either upload a new collection in the [Queue](https://alphamoon.gitbook.io/documentation/platform-walkthrough/queue) or simply reprocess an already existing collection.

{% hint style="info" %}
To reprocess the collection, click the **three dots** next to the given collection and select the "**Reprocess**" option.
{% endhint %}

<figure><img src="https://1037371503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3NQDmelveCcQtL0yaFs%2Fuploads%2F5Py9JzPLFEA569TwIOzd%2FZrzut%20ekranu%202024-04-18%20o%2016.45.56.png?alt=media&#x26;token=68e563af-8011-448e-9b85-759af6cfe72a" alt=""><figcaption><p>Reprocess collection</p></figcaption></figure>

### Verify the enrichment

After uploading or reprocessing the collection, double-click on it to open the [Supervision](https://alphamoon.gitbook.io/documentation/platform-walkthrough/supervision).&#x20;

On the right-hand panel with the list of extracted fields, you will find the Enriched data section:

<figure><img src="https://1037371503-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa3NQDmelveCcQtL0yaFs%2Fuploads%2F5LAEJXasEN7QxBDPN8tl%2FZrzut%20ekranu%202024-04-18%20o%2015.48.29.png?alt=media&#x26;token=45ce47f0-bba0-4d82-9010-601623520b9a" alt=""><figcaption><p>Enriched data</p></figcaption></figure>

**See more:**
