Skip to main content
Version: 2.0.0

Personalized Answer

This chapter will explain what personalized answers are and how to configure them in skills.

Basic Concept

Generally speaking, when several intents are similar, the risk of the bot answering incorrectly increases. At this time, the question-answering effect can be optimized by increasing the number of similar statements under each intent. However, the improvement of the effect of this more traditional method is still limited, and the operation personnel need to invest a lot of work, and the efficiency is relatively low.

Through observation, we can find that these queries with similar intentions have the same structure in most cases, but the subject of the query is different.

For example, in an e-commerce scenario, a certain product has different models, and each model has its own price, configuration and other information introduction. In actual scenarios, users often consult information about the same dimension of different models of products, such as "how much is model A?", "what is the current price of model B?", "what are the configuration details of model C?", "Is the model D configuration good?" and so on. After a little analysis, it can be found that these questions can be completely classified into the following two types of structured inquiries:

1.What is the price of X model? 2.What is the configuration of X model?

The "X model" represents the specific description of model A, model B, model C and model D (as well as the synonyms of these four models), around which the user will ask questions about the price, configuration and other content of the product.

In other scenarios, we can also find this situation. For example, in insurance consulting scenarios, user questions can often be summarized into the following structured types:

What is the insurance age for X Insurance? How many days is the hesitation period for X insurance? What is the content of the claim rules of X insurance? ……

These questions have a strong structure, but questions of the same structure may be aimed at completely different subjects. When such questions appear in the bot question answering scenario, even if there are many similar statements, it is still unavoidable that there will be incorrect answers. However, because they have similar structural characteristics, and the data used to answer these questions is also very suitable for structured storage, we can use a new way to optimize Q&A results, which is Personalized Answer.

Sentence Pattern

To use personalized answers, we must start with user questions that have structural characteristics, and learn to upgrade scattered user questions into sentence pattern.

Taking the above insurance scenario as an example, we have summarized the structured question types from users' questions. How to upgrade them into sentence patterns?

At this time, it is necessary to use entities and slots.

  1. First, we can create an intent of "query insurance age", and configure a sentence pattern in the intent as a similar statement, which can be as follows (you can view the sentence pattern composition rules in the intent configuration interface): What is the insurance age for {"entity":"insurance name"}?

Here, the "insurance name" after "entity" is the subject of structured questions, which can specifically refer to insurance A, insurance B, insurance C, and so on. create-intent-en-v1.8

  1. Secondly, we need to create an entity for the "insurance name". The names of the three specific insurances, insurance A, insurance B, and insurance C, are the entity values. Then, we create a slot and associate it with the insurance name entity. create-entity-en-v1.8 create-slot-en-v1.8

  2. In this way, we have successfully created a sentence pattern. No matter what kind of insurance is the subject of the user's specific question, as long as the query conforms to this sentence pattern, the sentence pattern will hit the intent and extract the entity of insurance name. And, the bot will use the extracted entity value to fill the slot in preparation for the next query answer.

Of course, users may also use other sentence structures to ask questions, so we can add more sentence patterns to make it easier to match the sentence structure to the user's intent. add-sentence-pattern-en-v1.8

Answer by Table

After creating the intent with the sentence pattern, we need to configure the answer. Since the answers to these questions have strong structural characteristics, we can store and use the answer data in a tables.

  1. As follows, we have created a table and put some insurance information into it.
note

The column name of the table does not allow spaces, if necessary, please use underscore instead.

create-table-en-v1.8

  1. Next, create a FAQ skill and associate the intent of "query insurance age". Turn on the switch to the right of "Answer by Table", and start configuring the rules for it, that is, specifying how the bot queries the table to return the correct answer. create-skill-en-v1.8

  2. Positioning condition is the condition for the bot to query the table data. Multiple positioning conditions can be configured. There are three relationships between them to choose from: The "AND" option is the most commonly used. All conditions are met to query the table to return the answer. For example, in an e-commerce scenario, products may not only be divided into models, but also colors. Using "AND" option can ensure that the query condition of the table is model = xx model, and color = xx color. The "OR" option means that only one of the multiple positioning conditions needs to be met. The "Complex" option allows for more complex positioning condition configuration using custom scripts.

In the scenario of querying the insurance age, we only need to position the insurance name, so both "AND" and "OR" option are applicable. Click "Add", select the first column in the table, that is, "insurance_name" as the positioning column name, select "Equal to" for the positioning relationship, click {/} in the space bar on the right, and select the insurance name slot that was created earlier. So the bot can use the result of entity extraction to fill the slot.

Then, in the drop down list of Return, select the "insurance_age", so that the bot can return the specific answer in the column of insurance age in the table to the user. positioning-condition-en-v1.8

  1. Finally, we need to configure the default answer for the FAQ. If table answering is enabled, the bot will first reply to the user using the data in the table, but sometimes, the data in the table may be vacant. For example, insurance D is added to the table, but the value of its insurance age column is empty, in which case the bot fails to query the table and it returns the default answer to the FAQ. default-faq-answer-en-v1.8

  2. After the configuration is complete, change the status of the FAQ to "ON", and train the bot, then we can test the effect of answering by table. test-effect-en-v1.8

Obviously, by using the table, we can realize the personalized answer for the insurance age, avoid the repetitive work of creating a separate FAQ for each insurance name, and save a lot of manpower and efficiency. Of course, we can also configure more personalized answers according to the needs of actual scenarios.

In addition, in actual use, with the change of business, insurance names are likely to continue to increase, but no matter how many names there are, as long as its data conforms to the table structure, all we need to do is to increase the entity value, and then just configure the answer for it in the table.