Matching groups

Simplify bot knowledge base creation with matching groups

A matching group is a collection of words or terms with similar intention or signification. Using matching groups simplifies the knowledge base creation for your bot.

The concept

Definition and advantage of matching groups

A matching group is a collection of words and terms that have similar meaning or intention.

When you have a question that can be worded in different ways, instead of creating separate questions for each variation, you can use matching groups to represent them.

For example, instead of creating separate questions for "What is the procedure to activate my account?", "How do I activate my account?", and "How does it go to activate my account?", you can create a matching group called "How to activate" with phrases like "What is the procedure to activate", "How to activate", and "What do I need to do to activate".

As shown in the image, you can make your matching group more powerful by using various matching groups inside a parent matching group. It will expand the comprehension capacity of the parent group.

Matching groups are useful for gathering synonyms and simplifying the process of creating questions for your bot.

Matching group types

There are two types of matching groups in the BMS:

  • Generic matching groups: Dydu provides a large portion of "generic" matching groups (160) through its social base. These groups facilitate enrichment work and ensure better understanding of your bot. The words and terms that make up these groups have the same meaning or sense, regardless of your sector or the scope of your bot. Examples include "Yes", "No", "How to", "email address", "login", and "password". Dydu has created these generic matching groups over 10 years of research and development, as well as support for clients with various issues from many sectors. These groups are shared among all Dydu customers.

  • Domain-specific matching groups: this type of group refers to specific domains that are relevant to the bot's expertise, such as HR, e-commerce, and IT help desk. A formulation can have different significations depending on the sector and context of the bot. For example, the word "ticket" may mean "a transport ticket" for a transport company’s customer service bot, while for an IT helpdesk bot it means "a support request".

To facilitate the creation of domain-specific matching groups, Dydu offers templates in various verticals such as e-commerce, HR, IT, and citizen relations. These templates come with pre-packaged questions, responses, and matching groups that you can further tailor to your needs and context.

To visually distinguish these two types of matching groups, Dydu displays them in different colors in the Bot Management System:

  • Blue: generic matching groups.

  • Green: domain-specific matching groups.

How to create a matching group?

There are two ways to create a matching group:

  • In the Content > Matching Groups section.

  • In the knowledge item editing zone as you edit your knowledge base.

Create a matching group from the "Matching Groups" section

  1. Go to Content > Matching Groups.

  2. Choose the language in which you want to create the matching group. It can be translated into other languages of your bot later (refer to this section for more details).

  3. Click Add. You can choose to add a new matching group or a new category that allows you to organize different matching groups.

  1. If you choose to create a new category, a window will pop up where you can enter the name of the category. Then, click on “Add”.

If you choose to create a new matching group, click on "Add a new matching group" and a window will pop up as follows:

Enter the name of your matching group and determine the following parameters:

  • Multilingual: activating this option allows you to create a matching group in all languages and consultation spaces in your bot. This option is useful if you have generic matching groups that share the same name across different languages (e.g. brands' names).

  • Include the name of the matching group in its formulations: check the box only if you want the name of the matching group to be part of its formulations.

  1. Click on "Add and open". You can now add formulations inside the matching group you just created.

To add formulations, you can either add them one by one from the "formulation" field or add several at once by using the bulk addition feature in the "Options" tab.

Bulk addition :

Click on "Options > Bulk Addition". Enter several formulations (separated by line breaks), then click on "Add".

One by one :

  1. Enter one formulation at a time in the "formulation" field. You can either enter a text or an existing matching group. Then, choose the type of the formulation from the dropdown list:

  • Formulation : it's the default type without any special options. Most of the formulations will be created with this type.

After choosing the wording type, click "Add".

  1. At this stage, the bot may suggest replacing certain words/terms in your formulation with existing formulation groups in your bot (such as generic formulation groups, default variables, action verbs...). This allows you to enrich the understanding capacity of your bot. With the suggested wording groups, you can perform the following actions:

    • See the formulations contained in each group by hovering over them with your cursor.

    • Identify the type of each group suggested by its color. (For details, refer to the explanation on Formulation Group Types.)

    • Make the group optional:

    • Normally, when a group of formulations matches the user question, the knowledge that contains this group will be considered more relevant than that which does not contain it. However, when a formulation group is optional, it will not affect the matching result. This feature is useful if your knowledge contains a group of wordings with generic wording (like "how to", "how can I do" or "how to") that is likely to match a large number of user questions and therefore can bias the matching.

    To do this, click on the arrow in the formulation group bubble, then check the “optional group” box.

  1. Choose the suggestion that suits you best. You can also ignore the suggestion by clicking "Add" once more.

  1. Once formulations are added, they can be edited, deleted individually or massively by clicking on the corresponding icon:

Note: the mass deletion option will only appear when you have more than 1 formulation within a matching group. You will need to choose one formulation to conserve while deleting all others.

Once created, matching groups can be immediately used in your knowledge items.

Create a matching group from the knowledge item editing zone

When editing your knowledge items, you may find it beneficial to transform a term into a matching group.

Our solution enables you to do this when creating a user's question or editing formulations inside a user's question after creating it.

Create a matching group while editing a user’s question

  1. To create a matching group while editing a user’s question, switch to the Selection mode by clicking on the T icon then click on "Selection".

  1. Locate the term you want to transform into matching group and double-click on it. Then click on the + icon that appears on the right. A panel will open.

  1. In the panel, enter the name of the matching group you are about to create.

  2. Click on "Update" and you will see that the term has now turned into a matching group.

Create a matching group while editing a formulation

To create a matching group while editing a formulation, open the formulation list panel and start editing one existing formulation by clicking on the 3 dot icon. And repeat the steps above-mentioned.

Use matching groups in a knowledge item

When creating a knowledge item or adding a formulation to a user's question, the Dydu BMS automatically suggests matching groups to use. You are free to accept or reject these suggestions.

You can also use the dedicated button in the user's question panel to search for a matching group and manually add it to a formulation.

For more details about how to edit a user’s question, refer to this article.

Enrich your matchings groups

Once matching groups are created, as you learn more about your end users you may want to enrich the existing matching groups with new formulations.

You can do this from the knowledge item editing page or directly in the Matching groups tab.

Enrich a matching group from the knowledge item editing page

  1. After you create a user's question or a new formulation, switch from Edition to Selection mode by clicking on the T icon.

  1. Locate the term you want to add and double-click on it. Then click on the + icon that appears on the right. A panel will pop up.

  1. Start typing the matching group’s name in the field. An auto-suggestion will be made based on what you type.

  1. Select the group you want to enrich from the auto-suggestion list and you will see all the formulations contained in that group. The "formulation(s) to add" section is already pre-filled with your selected term. You can also add more formulations if you wish.

  1. Click "Update" and you will see that the term is now replaced by its belonging matching group.

Enrich a matching group from the “matching groups” tab

The steps to follow are the same as creating the first formulations for a matching group.

You can either add them one by one from the "formulation" zone or add several at once by using the "Bulk Addition" feature in the "Options" tab.

Translate your matching groups into other languages supported by your bot

To translate your matching groups, go to the "Matching groups" tab and select the target language from the dropdown list. This will refresh the language setting of the page.

Matching groups that were created in the original language will be shown with a suffix indicating the original language.

Firstly, translate the matching group's name. Then, to add formulations in the target language, open the editing panel of a matching group and start adding them one by one or in bulk.

Monitor the usage of matching groups

You can gain insight into how a matching group is used across your knowledge base by analyzing its usage and dependency.

Dependency

This feature is especially useful if some of your matching groups are used as formulations in other matching groups. It enables you to see the dependency between them in a graphical format.

Click on dependency and a new tab will open showing a graphic.

Here's how to interpret the graphic:

The arrow always starts from the parent group and points to the child group. The number indicates how many times the child matching group is used as a formulation.

Usage

This feature allows you to view which knowledge items and matching groups are currently using this matching group.

To access this feature, click on usage. A new tab will open, displaying the following information:

  • The number of knowledge items that use this matching group

  • The number of matching groups that use this matching group

Clicking on an item from the list will redirect you to the corresponding content page in a new tab.

Import/Export of matching groups

Import

The matching groups page allow you to import or export all of your matching groups.

To import your matching groups, please follow these steps:

  1. Click Import at the top of the page. A new window opens.

  2. Click Template to download the template to follow. Note that you can import your matching groups in Excel or XML format.

Note : In an Excel cell, the limit is 2672 lines. If you wish to import more than 2672 formulations into a matching group, you need to set up several lines for the same group and repet the category and group name on each line.

  1. Click Choose a file then select your .xslx or .xml file.

  2. Click Import. Your matching groups are then imported.

Important: The massive import of matching groups is limited to 99. It does not work for 100 groups or more.

Export all the matching groups

To export your matching groups, please follow these steps:

  1. Click the Export button.

  2. Choose the format of your export (XML or Excel) and click on it

The download of your matching groups in the selected format will start immediately.

Export one matching group

This option allows you to export 1 matching group and its formulations in the txt. or xml. format.

It is accessible via the Option tab in the matching group editing pannel:

More advanced options about matching groups

  1. Search

This option allows you to see the matching details of a given phrase regarding the existing formulations inside a matching group.

Enter a phrase and click Search. You will see to which extend this sentence matches the formulations you have already added. This will give you a better idea on the relevance of your formulations.

This option is accessible via the matching group editing panel > Search.

  1. Edition of the variables

This feature allows you to define a formulation as a variable or modify a variable's value. This feature is effective When the user's question matches the matching group's formulation that contains this parameter.

It is accessible via the matching group editing panel > Options > Options.

  1. Strict matching with formulations

When the option is activated, user questions must contain exactly the same formulation as the one in the matching group.

For exemple, “Bordeaux” is one of the formulations of the matching group “City”. If the user’s question contains “brodeaux”, the matching group will not match the user’s question.

This option is accessible via the matching group editing panel > Options > Options.

  1. Can be suggested when adding rewords

When the option is activated, the matching group can be suggested to replace similar words or phrases in knowledge items.

This option is accessible via the matching group editing panel > Options > Options.

  1. Optional or Mandatory Group

When one of the options is enabled, the formulation group becomes either:

  • Optional, which means it will not affect the result of the matching.

  • Mandatory, which means the presence of this group is essential for the matching to be performed.

These options are accessible via the formulation group editing panel > Options > Options.

  1. Set update url

This option allows you to add matching groups in bulk from an url.

Paste the URL that contains your matching group formulations in the designated zone and they will be added immediately in the matcning group.

This option is accessible via the matching group editing panel > Options.

  1. Solver

The solvers have the following goals:

  • Define a value to be saved when matching a matching group and define the capture to store this value (either at the group level or at the group formulation level);

  • Perform javascript treatments during a matching groups of multilevel formulations.

Adding a solver can be made on a matching group.

To add a solver to a group level, go to Content > Matching groups, select a group, click the Solver tab and enter the solver value. Then click Update.

If you want to add a solver to a term in your matching group, add it directly to the formulation addition as follows: fill in the fields Add this formulation and Resolved value then click Add.

Note: you can also add a solver to a term later by editing your term.

Example (matching group Computer):"I want to buy a [Computer]" Go to Content > Knowledge, Add a New Knowledge, write the user sentence to understand, click on the T, repeat the steps of the previous paragraph.

With variable capture:

Note: the variable can also be in JSON format to allow use of type $ {capture.MaVariable.Champ1}.

  • Case 1: no configured solver

Shown value here is the word identified by the matching group.

  • Case 2: solver configured on the matching group Computer

The value displayed here corresponds to the value of the solver defined on the group. This value will appear for all terms in the matching group. In this example, the solver value of the group is: machine.

  • Case 3: solver configured on the matching group Computer and solver configured on the term "laptop computer"

The value displayed here corresponds to the value of the solver defined on the term and not on the group because it is considered more specific. In this example, the solver value of the group is: machine. The solver value of the term "portable pc" is: laptop.

It is also possible to capture a constant as a solver value or to make a call to a server-side Javascript function.

  1. In this example, the goal will be to take into account the groupTokens parameter that represents a keyword in the solver configuration. To use its content (object table) in your matching groups, first insert a function that returns its value (JS server-side):

In practical terms, the goal of this example is to count the amount of people in a knowledge item from information such as "My wife and I", "My friend and two children", and so on.

  1. Create matching groups of number and type of people (cousin, son, niece, etc.).

  1. Go to the bottom of the page and click on the Solver tab.

  2. Specify getNbPersons(groupTokens) (for the purpose of the example) in the Resolved value field.

  1. Click Update.

  2. Test your solver through a knowledge with capture (see Variables). You then obtain:

Behavior of the solvers

  • If no solver is defined, the group returns the formulation that was matched;

  • If only one solver is defined, for a given formulation (at the level of the group or the formulation), this one is used;

  • If the solver is defined for the group and the formulation, the solver of the formulation is used because it is more specific.

8. Synchronization information for matching groups

This page aims to present the technical elements related to the synchronization of matching groups with the social bot.

The synchronization of the matching groups (and their structures) is carried out from the UUID in priority. Thus, if a group has the same UUID, it will be updated: labels, adding and deleting formulations.

In the case where a formulation has been added manually to the synchronizing server, it will not be deleted.

The content of the formulation matters to synchronize groups. If the content is different, then the formulation is different.

The synchronization of the matching groups is carried out once an hour.

Last updated

Tous droits réservés @ 2023 dydu.