# NLP import & export

## Import/export intents

You can import and export [intents](https://docs.chatlayer.ai/navigation/natural-language-processing-nlp/intents) from your [**Expressions**](https://docs.chatlayer.ai/navigation/natural-language-processing-nlp/expressions) tab. Intents and expressions go along inside a .csv file.

### Export intents

To export intents:

1. On the top right corner, click on **Export**.
2. Click on **Start export**.
3. Tick the intents that you would like to export.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FhgtVaGJ7JehAYsbgsLRa%2FScreenshot%202024-08-27%20at%2014.30.48.png?alt=media&#x26;token=818603d6-153e-4a2f-bc8c-773cba9b8075" alt="" width="375"><figcaption><p>Export intents.</p></figcaption></figure>

5. Click on **Export intents**.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FmtyoWxlqsdt96AjyDtPP%2FScreenshot%202024-08-27%20at%2014.33.39.png?alt=media&#x26;token=1957613c-0907-4c64-9962-fcad496349ea" alt="" width="375"><figcaption><p>Download your exported intents.</p></figcaption></figure>

6. When the spinner has finished, click on the **download** button just next to the export to download your intents.&#x20;
7. Open your export as a .csv file.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FCFuHLGLgTb5oJ8sTi4Ht%2FScreenshot%202024-08-27%20at%2014.34.50.png?alt=media&#x26;token=910f9bfb-4f74-4d5b-accb-98ba7807bf82" alt="" width="375"><figcaption><p>Open your intents export as a .csv file.</p></figcaption></figure>

### Import intents

To import intents:

1. On the top-right corner, click on **Import**.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FUHPpso8QmE4M8jGWKshB%2FScreenshot%202024-08-27%20at%2014.37.41.png?alt=media&#x26;token=df2276a8-aea9-42cc-86ee-378e5020df94" alt="" width="375"><figcaption></figcaption></figure>

3. A modal pops up. Make sure that you read it carefully before clicking on **Upload CSV file**.
4. Choose your file from your desktop.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FoUsgue0KmiNnc3EMQLMn%2FScreenshot%202024-08-27%20at%2014.40.03.png?alt=media&#x26;token=ad903a1c-0928-440e-b802-e957fe91c55a" alt="" width="375"><figcaption><p>Import intents.</p></figcaption></figure>

5. Read the modal carefully before choosing whether you want to add or overwrite your current intents. Select the radio button accordingly.

{% hint style="danger" %}
**Be very careful when chosing to replace your model because this cannot be undone. It's best to have a backup of your data before applying this step.**
{% endhint %}

6. Click on **Import**.

<details>

<summary>How to check for duplicate expressions</summary>

Chatlayer's NLP engine detects and rejects duplicate expressions, so use care when importing a large number at once. When adding expressions manually, the system checks for duplicates. This also applies to new import files, but identifying duplicates can be challenging. Follow these steps to spot duplicate expressions:

1. Make sure you export your current expressions.&#x20;
2. Now add your new expressions with the one that you just exported. (Make sure you don't replace your backup that you just downloaded).
3. Make sure that you have only unique expressions (Using tools like Excel helps here)
4. Delete all expressions from Chatlayer platform.
5. Import the new CSV you just created.
6. Update the NLP

With these steps, you should have all the expressions imported without any duplicates.

</details>

## Import/export entities

You can import and export entities from your [**Entities**](https://docs.chatlayer.ai/navigation/natural-language-processing-nlp/synonym-entities) tab.

### Export entities

To export entities:

1. Click on the **Export** button.&#x20;
2. Open your downloaded .csv file.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FOWfbeHI7c5F2BO8KfOR1%2FScreenshot%202024-08-27%20at%2014.54.06.png?alt=media&#x26;token=e10b8456-4c84-452a-94cf-8df4825a4914" alt="" width="375"><figcaption><p>Open your downloaded entities.</p></figcaption></figure>

### Import entities

To import entities:

1. Click on the **Import** button.
2. Make sure to carefully read the modal so that you provide a .csv file with the appropriate format.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FTzNRET8kzD83AX9NSRNj%2FScreenshot%202024-08-28%20at%2010.07.52.png?alt=media&#x26;token=a906baee-9a55-4e47-a2df-584ec93b16ac" alt="" width="433"><figcaption></figcaption></figure>

3. Click on Upload CSV file.
4. Choose your file from your desktop.

<figure><img src="https://2786867680-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LLTwFwbOqJj4dDhg8Ju%2Fuploads%2FikwMwF13xGM4qp7CEFMP%2FScreenshot%202024-08-28%20at%2010.09.47.png?alt=media&#x26;token=b3790eb6-b7fa-4f62-b9a8-89c452ff9deb" alt="" width="443"><figcaption><p>Replace or append your imported entities.</p></figcaption></figure>

3. A modal appears. Carefully read it before choosing to either replace the current entities or append your entities to the current ones.&#x20;
4. Click on **Import**.
