Knowledge Center next icon Getting Started with Entities
Sep 28, 2022
5 minutes read

Getting Started with Entities

Intents form the basis for Conversational AI Cloud's recognition as it attempts to capture an end user’s purpose when interacting with your project. Once an end user’s intent has become clear, Conversational AI Cloud needs to direct the user to one of the questions (as a part of an article) that match this intent. As explained in the Recognition article, Conversational AI Cloud does this through both entity and keyword matching. For now, we're just going to focus on entity matching.

Entity Matching

Entity matching is used to find the entities (objects) of the end user’s interaction and decide what answer is best based on the combination of intent, and entity matches.

Let's look at an example based on buying a new phone. You can substitute the intent and entities from this example with your own content and follow along with the steps. Now, let's assume the following situation:

The end-user asks the question "I'd like to purchase an iPhone". In our intent model, we have the intent "purchasing" defined. The purchasing intent contains two articles that look as follows:

Article 1:

  • Q: "I want to buy an iPhone"

  • A: "You can buy your iPhone here"

Article 2:

  • Q: "I want to buy the latest iPhone"

  • A: "You can pre-order the latest iPhone here"

Articles example.png

Now, let's say our end-user asks the following question: "I want to buy the new iPhone". Without entities, the keyword "new" won't be seen as similar to the word "latest" and will not have an impact on recognition. We’ll be solving this by creating our entity.

Create an Entity

If we want two (or more) words (usually synonyms, or abbreviations of the same word) to be considered the same when recognizing end-user interactions, we'll need to put them in an entity together. There are different variations possible when defining entities, but for now, we'll focus on entities that consist of singular keywords.

Conversational AI Cloud's entity editor offers a simple way of defining new entities. For the purpose of this guide, we'll create a new entity with just a couple of singular words.

To create an entity, perform the following steps in order:

  1. Open the Entity editor
  2. Click the add “+” icon and select “Create standard”
  3. Enter a name and description for the entity
  4. Click the add “+” icon
  5. Type a word into the text field and click the add icon “+”; do this for each synonym you want to add to the entity
    1. For now, adding the words “new” and “latest” is sufficient for our earlier example scenario.
  6. Click the “Add” button  
  7. Click the “Save” button

15210-cm-create-entity.gif

After creating the entity you’ll see an expansion panel at the bottom of the entities page. Here you’ll find two sections, one for articles and one for dialogs. Each panel will show you the places where the entity is matched on your content. This allows you to assess the impact of a specific entity without having to go through all of your content by hand. With our previous example, after adding the word “latest” in an entity, you should see our article contain the question “I want to buy the latest iPhone” show up in the entity's article reference section.

Test Entity Recognition

So far, you've created a new entity in a project that:

•    Contains a working intent model, and
•    Has a minimum of two articles's in a single intent that we want to differentiate on using the previously created entity.

The next step in your content workflow is to test if your project is actually able to recognize a real user's input and match it to the right article based your intent model, and the entity you've just created.
There are a few ways to test your projects recognition. For now, we'll use the most straightforward approach, which is asking a question to your project and seeing what answer is matched in the test center.

Follow these steps to test your recognition:

•    Navigate to the test center by clicking the "Test" option in Conversational AI Cloud's navigational bar on the left-hand side of the screen.
•    Ask the question that we initially based our entity on:
 "I want to buy the new iPhone", it should now match article 2.
•    Ask variations of questions related to the "purchasing" intent, but make sure the questions contain one of the keywords we used to create the entity. All results that match the "purchasing" intent and include one of the keywords should result in recognition for article 2.

Feel free to substitute the content we created in this guide with content that is relevant to your own project. The workflow described in this guide is simple, but effective and can be applied to any entity-related use case you may encounter.

If you're satisfied with the result of your recognition test, you can continue adding other entities to your project to further strengthen its recognition.

Show Condition Sets

Condition sets show you which words are entities, keywords, and stop words in your article and dialog questions. Click on the "Show condition sets" button and hover over the words. 

show-conditions.gif

Entity Decision Tree

If you're unsure whether a word should be an entity, keyword or stop word, look no further!


entity-decisiontree.png

Entity Overlaps

When your project contains multiple entities that contain the same word, it will create an overlap task. When this occurs, Conversational AI Cloud is no longer able to decide which entity to match on the end user's input. To avoid recognition issues, both entities are disabled until the overlap is resolved.

The overlapping entities will be highlighted red in the task so you know which words to resolve. Simply select the entity that you want to keep and click the resolve button.

16353-cm-entity-overlap.gif

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