Use entities in conversations

Completed

Once your entities have been defined, they're available to be used when constructing agent conversations. The easiest way to use them is by opening the authoring canvas for a topic and adding a Question node. Question nodes allow the agent to identify user-submitted information using entities and saving this information as a variable. The Identify function of a Question node tells the agent what piece of information needs to be identified from the user query.

When presented with this question in the conversation, the user simply needs to type the department they're looking for. The item is then compared to and matched to an item on the entity list.

Screenshot of department entered with item matched from list.

In the image above, the user has expressed interest in Trekking, which is another way of saying Hiking. The agent recognizes this, and since we defined Trekking as a Synonym of Hiking, the agent displays information related to Hiking.

In some cases, an organization might decide they would rather display buttons to users to simplify the selection. For example, if you would like some of the category items to display as buttons, users can select as their input, choose Select options for user and then pick from the list. While in a conversation, a customer can either select the item button they want or enter a different category manually as text.

Working with slot filling

Slot filling is a natural language understanding concept that saves an extracted entity to an object. In simple terms, slot filling matches what is input by a customer and stores it appropriately in a variable. For example, when asked for a category type, the customer might select Hiking, or they might type in something like Trekking as shown in the image below. Since Trekking was defined as a synonym, it should still be considered as the user entered hiking. Slot filling ensures that even though something else was entered, it's associated with the correct category. The extracted entity Hiking is used as the values for the product category variable.

Proactive slot filling

Another concept is known as Proactive slot filling. This is where the user can specify multiple pieces of information that map to multiple entities. The agent understands what information belongs to which entity automatically.

Proactive slot filling can be manually controlled at the node level. If you would like to always prompt for the question within a specific node, regardless of whether the slot has been filled from previous user responses, you can disable the Skip question option and make it ask it every time for that question node.

The default Question behavior is set to Allow question to be skipped, which allows the agent to proactively detect entities from user queries without prompting the user for information they already provided.

In the example below, the user wrote I want to buy some trekking gear. This includes the trigger phrase that the customer wants to buy gear, but it also provides a second piece of information, the actual type of gear. In this case, the agent fills in both the entity for buying gear, and the type of gear. This is unlike the previous example where the agent needed to prompt the user for the type of equipment. The agent takes the user input and intelligently skips the question asking for the product category.

Screenshot example of proactive slot filling.

Note

Notice that since the user provided a value for the Outdoor Sports Categories entity, the question node is skipped, allowing the agent to move the conversation forward without asking for information the user already provided.

The agent is always actively listening to user input, remembering information upfront so it can skip unnecessary steps as appropriate.

Let's restart the testing again and try another case. In this round, we added a few more question nodes asking for things like the type of hiking gear, and the price range (using the Money entity).

Screenshot of additional entity question nodes.

This time when the product category question is presented, instead of telling the agent only the product category, the user can say I want to buy a pair of hiking boots under $100.

Screenshot of additional question nodes.

In this example, the agent isn't only able to route to the correct hiking product category path, but also actively fills the slots asking for the type of hiking gear and the target price range information.

Screenshot of the message node's input mapping.