Knowledge Center next icon How do I import intents?
Nov 17, 2022
4 minutes read

How do I import intents?

⚠️This guide was written for projects using Intents V1

Goal

Import intents into your Conversational AI Cloud project.

Product

  • Conversational AI Cloud

Background

Why you may want to import intents into Conversational AI Cloud:

  • You already have an intent model that you've built outside of Conversational AI Cloud, and don't want to go through the trouble of manually recreating the content

Steps to Import Intents

Conversational AI Cloud offers the option of importing one, or multiple intents at the same time through an import functionality exposed through the intent overview screen. In this guide, we'll examine how to import intents into Conversational AI Cloud by using some of Conversational AI Cloud's out-of-the-box intents available to all customers. At the end of this article, you'll have imported a CSV file containing one, or multiple intents.

Regardless of what your reason is, importing intents into Conversational AI Cloud is a straightforward process. Conversational AI Cloud built its import functionality around the use of CSV files. CSV files are widely used for managing (complex) datasets in a variety of ways.

In the example below, you'll see an example intent CSV import file.
(Pay attention to the headers in row 1 for V1 & V2 of the intent model. If they look like V2, this guide should still work as long as the correct headers are used.)

image.png

When formatting your CSV file, keep the following in mind:

  • A file size limit of 25MB
  • Intent entries can not be empty
  • Type entries can not be empty
  • Training phrase entries can not be empty
  • The "|" symbol is used as the CSV delimiter
  • Each record is located on a separate line, delimited by a linebreak (CRLF).
  • Fields containing line breaks (CRLF), double quotes, and pipes should be enclosed in double-quotes. Line breaks will be stripped
  • If double-quotes are used inside a field, these have to be escaped by preceding double quotes

You should also be aware of the following choices Conversational AI Cloud makes when importing intents:

  • If an intent is imported, and that intent already exists for a project, then the existing intents data (training phrases) will be replaced in its entirety by the contents specified in the CSV file.
  • If an intent is imported, and that intent does not exist yet for that project, then no changes will be made to any pre-existing CMS content and the imported intent will be created along with its training phrases as new CMS content.

For the purposes of this how-to guide we'll provide you with our out-of-the-box intent "standard_contact". If you have your own intent model that you'd like to import feel free to use that for the rest of this guide, or check out our other out-of-the-box intents. Just make sure that whatever intents you're adding the formatting of the CSV content is according to the specifications mentioned above.

Download the import file for "standard_contact" (in English)

Now that you have our CSV file containing our intents, let's look at how to import the contents of the file into Conversational AI Cloud.

Follow these steps to import:

  1. Navigate to the intents page in the Conversational AI Cloud CMS for one of your projects.
    1. You should now see the intent model overview page. If you already have a few intents defined (and perhaps even a model trained) then don't worry. It won't affect what we're doing right here.
  2. On the intent overview screen, below the coverage quality assurance task we see the sorting options for the intents overview. On the right side of these options we see a three-dot menu. Click on that menu and you should see the "Import" functionality. Click on the "Import" menu item to go to the import screen.
  3. Now that we're on the import screen, we see a section that tells us to "Select a CSV file to upload". Click on this item to open your file explorer, and select the intent CSV that you want to import into your project.
  4. On the right side of where you previously had the "Select a CSV file to upload" option, and where you now see the file you selected along with the file size there's a button that says "Upload & Validate". Press this button. Pressing this button will:
    1. Upload the selected file to Conversational AI Cloud.
    2. Conversational AI Cloud validates the contents of the file and ensures that it matched the specifications we talked about earlier.
    3. Conversational AI Cloud removes any duplicate intents-training phrase combinations from the uploaded CSV.
    4. Conversational AI Cloud returns the pre-processed contents of the uploaded CSV and presents them for review.
  5. After pressing the "Upload & Validate" button the screen will be populated with all (one or more) of the intents that were provided in the CSV file. You can open each intent, and see the training phrases you imported for that intent on the screen. Don't worry, at this point no changes have been saved yet for your project. All we've done is provide a CSV containing (one or multiple) intents, Conversational AI Cloud has validated the CSV file, and pre-processed it for us. We still need to finalise the importing of the actual intents themselves.
  6. After uploading and validating the contents of the CSV as mentioned in the previous step we're ready to actually import the intents into Conversational AI Cloud. Before we do so, we need to be absolutely sure that we're not overriding any content defined in the CMS that we don't want to lose (as mentioned above). If you're sure of the contents you're importing, press the "Import" button on the screen. Conversational AI Cloud will save the uploaded intents to your projects CMS content.
  7. Good job! We've imported a CSV file containing intents according to Conversational AI Cloud's specifications. If you want your newly imported intent(s) to be used for recognition for your project you should consider retraining the intent model on the intents overview screen.

group icon
Get support

Can’t find the answer you are looking for?
Ask for the help of our chatbot, or get in touch with our support team.

Contact Support
Is this region a better fit for you?
Go
close icon