# 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[​](https://dev.docs.dydu.ai/docs/Complementary_items/matching_groups#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".

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FObj4Ga8dEu0gvrwtxhty%2Fimage.png?alt=media&#x26;token=29638a9e-d762-4706-b873-30a72d4f45a7" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FihDGmN328OOgoZhqxgjG%2Fimage.png?alt=media&#x26;token=5eba8e24-e8c7-428a-811a-30eb66b6cf68" alt=""><figcaption></figcaption></figure>

### 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[​](https://dev.docs.dydu.ai/docs/Complementary_items/matching_groups#create-a-matching-group-from-the-matching-groups-section) <a href="#create-a-matching-group-from-the-matching-groups-section" id="create-a-matching-group-from-the-matching-groups-section"></a>

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](https://dev.docs.dydu.ai/docs/Complementary_items/matching_groups#translate-your-matching-groups-into-other-languages-supported-by-your-bot) 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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F0qGvBcjaL5LrL2hrufoW%2Fimage.png?alt=media&#x26;token=7e2447ae-d710-42c9-80be-5da53203b688" alt=""><figcaption></figcaption></figure>

4. 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”.&#x20;

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FKKKPl5XPymc1AQSqKhRg%2Fimage.png?alt=media&#x26;token=a285ffd4-9eae-4bf9-9699-10003b79c6d1" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FcOXQdNxyKmDJ3P0Zw0vk%2Fimage.png?alt=media&#x26;token=c5713ef0-156e-4c0c-85df-bbce34f572bd" alt=""><figcaption></figcaption></figure>

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).

  Multilingual matching groups are symbolized by the ![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAjCAYAAACD1LrRAAAAAXNSR0IArs4c6QAAAGJlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAABJKGAAcAAAASAAAAUKABAAMAAAABAAEAAKACAAQAAAABAAAAHqADAAQAAAABAAAAIwAAAABBU0NJSQAAAFNjcmVlbnNob3Qo3ssBAAAB1GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4zNTwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4zMDwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlVzZXJDb21tZW50PlNjcmVlbnNob3Q8L2V4aWY6VXNlckNvbW1lbnQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo4lLSQAAACMUlEQVRYCe1XvS9DURQ/TyhCfFTiMzpoSCiDpEJCpzIwIB0kJh+T2eKPkLDa2GyCxdSJgbC1CMJQQUkQImkxcH+n7suLuPe9NKWDnuT1ndzz8bvnd869LzU+hFAWJC8LmAyZA/4z5nNU56j+NQb+4XBFj09/jU5d4nyd0Wp7eHqhnYNDOo/d0PXdA5vqq93k9dRRn99H7vJSq7utbkSOTj7aW1u0jhvhXQF6pPUJCPDhYLfWx2q0Ha6F5XUTtKKshGN9zR5qaqxlXa5tCzYWha9T0QKj0htBa1FhAU2EgpR8feeq6qurmGJUiDXY4IMWIMaJKIFTPU3ROxnqp0TyjZODUinQAQgbfCBoCWLtRNlju75WimHCQAHk8RtQn7+NRoI9WmzlVJ/H4hwIOjG9S6tbXzS7aT9yxraujmamdzO8RzPjg6Z+8RWrQ1YCo7cQK7Xy+MhN4ShJgY4Hm5DHTdp+eit7/JNzJteUFdcJelE1jklDTRVjohLDMOjxOTU8F5dxszroV7f37IdYO0l7uHSJnQyXkuqAv93MjcHBkGGS5+emaaC3kx/ouEDGhgI8XDLAGivXvr+VwDgq2DlkZS3MoInkK1Mvk6ANkOIiF/tAR4yTe1tJNZJAcGXKCUfFOLNeT624OFx0eBbjDclzjN7OTo2mAm1+DSd/YewuE2A46at1L46AEYAbavsgKj6LcZMBVIjq0VMn9KYFbA3KhK4crkwk1+XIAevYyagta1R/An7f6hu5AH+GAAAAAElFTkSuQmCC) icon.
* **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.

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

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FAGSDMSx3VdHXdjzi0HG9%2Fimage.png?alt=media&#x26;token=ea34ecea-7e2a-4d5d-a7d1-c354110726a4" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
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.
{% endhint %}

{% hint style="success" %} <mark style="color:green;">Bulk addition :</mark>

Click on "Options > Bulk Addition". Enter several formulations (separated by line breaks), then click on "Add".&#x20;
{% endhint %}

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F8fGZWC6qFULw4iRAMuyq%2Fimage.png?alt=media&#x26;token=6577fefc-7509-4e95-9d28-a5d4efca81b3" alt=""><figcaption></figcaption></figure>

{% hint style="success" %} <mark style="color:green;">One by one :</mark>&#x20;

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:&#x20;

![](https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F3rudfjkb1gLyiJZYbXuJ%2Fimage.png?alt=media\&token=d6ef8bba-1484-4e00-aeb7-0958fa0c1686)

* **Formulation** : it's the default type without any special options. Most of the formulations will be created with this type.
* **Keyword:** the formulations will be created as Keyword. The keyword has greater weight on our matching system. This means that if the bot matches both a group of formulations A which contains a keyword and another group B which contains only a simple formulation, group A will be considered by the bot as more relevant in the matching results, even if B would have had a higher matching score. Keywords added as wording are symbolized by the icon ![](https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FO2sMzxRSna0voOcFbvUd%2Fimage.png?alt=media\&token=0c39f3b7-3640-49fc-8f41-7bc8eaecd0c7).&#x20;
* **Exclusion:** it allows you to exclude a wording from the group, which means that the bot will ignore this wording in its matching system. Therefore, the formulation group will never be triggered by this formulation. Excluded formulations are symbolized by the icon ![](https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FbFeEUBjG5ffaeJZFNT2y%2Fimage.png?alt=media\&token=2d00408a-ac98-4c0d-ac20-ee4b66a651f9).

After choosing the wording type, click "**Add"**.&#x20;

2. 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:&#x20;

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

   <figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FO4rIwRDVq3LWoOvluMxX%2Fimage.png?alt=media&#x26;token=dbe3438b-e6c4-4a9a-9fe4-682ab68b78dc" alt=""><figcaption></figcaption></figure>

   * Identify the type of each group suggested by its color. (For details, refer to the explanation on[ Formulation Group](https://docs-en.dydu.ai/contents/matching-groups) Types.)&#x20;
   * Make the group optional:&#x20;
   * 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.&#x20;

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

![](https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FEbCxRiZjps3B7eFBjCR0%2Fimage.png?alt=media\&token=ef3444b0-32d4-4728-b5c7-c72674293a85)

3. Choose the suggestion that suits you best. You can also ignore the suggestion by clicking "Add" once more.
   {% endhint %}

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

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FuWOJEtruMa0cPncrbMnG%2Fimage.png?alt=media&#x26;token=860bad05-cdae-4a25-90ac-d41271393af3" alt=""><figcaption></figcaption></figure>

> 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".

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F3mUD1baMyJejoe0ZepYL%2Fimage.png?alt=media&#x26;token=20aac2ca-1965-4d48-9721-0f4c8760403c" alt=""><figcaption></figcaption></figure>

2. 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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FDzvII9ywPTeNUWEtYOZY%2Fimage.png?alt=media&#x26;token=2cb3993f-3cc3-4142-8016-002f15c8e419" alt=""><figcaption></figcaption></figure>

3. In the panel, enter the name of the matching group you are about to create.
4. Click on "Update" and you will see that the term has now turned into a matching group.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FofFxwOJAX2mCVGHIvz6T%2Fimage.png?alt=media&#x26;token=4f794dc7-631d-4596-84da-9d1f0e681723" alt=""><figcaption></figcaption></figure>

**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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FsZpUG4sIZSlCDQfdoKk6%2Fimage.png?alt=media&#x26;token=beb06a8e-6ddb-423c-9629-d833e496a996" alt=""><figcaption></figcaption></figure>

### 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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FnYsEaWpwZv5prUNcdZke%2Fimage.png?alt=media&#x26;token=4c9e81fc-558b-4f3a-94f9-57abe800e728" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FCLWKx7mKblpAO810wfwe%2Fimage.png?alt=media&#x26;token=6740b082-0a5c-4f71-b657-20a3204ef78d" alt=""><figcaption></figcaption></figure>

For more details about how to edit a user’s question, refer to [this article](https://dev.docs.dydu.ai/docs/Knowledge/Types/answer_to_a_question).

### 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 <a href="#enrich-a-matching-group-from-the-knowledge-item-editing-page" id="enrich-a-matching-group-from-the-knowledge-item-editing-page"></a>

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

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F5DjSEwqsVDklJjZc4pNG%2Fimage.png?alt=media&#x26;token=6bad0bdd-a322-45e6-9fd4-c540a37d7d88" alt=""><figcaption></figcaption></figure>

2. 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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F8sTfwLsh7ymjCXB4qSwi%2Fimage.png?alt=media&#x26;token=42a7039c-63ca-4037-89df-f7eedf73f9e1" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FdSPY6IjWmU1ai1N4bIsH%2Fimage.png?alt=media&#x26;token=a0ed40c0-a629-44db-9d5f-7a8d30b510df" alt=""><figcaption></figcaption></figure>

4. 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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2Fr7AkO08MwEIzcggPOaPh%2Fimage.png?alt=media&#x26;token=a55d9d1d-ffd5-4900-ac39-fa3523843b11" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F5IfDQuj2nhHVVub2hndB%2Fimage.png?alt=media&#x26;token=62dbca99-811d-4bca-8119-0a8f40cf5833" alt=""><figcaption></figcaption></figure>

#### 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.](https://docs-en.dydu.ai/contents/matching-groups)

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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FU15YZGSrbQQUOzuZYoEy%2Fimage.png?alt=media&#x26;token=ae174086-cbbe-414f-b5f0-269b4417f512" alt=""><figcaption></figcaption></figure>

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[​](https://dev.docs.dydu.ai/docs/Complementary_items/matching_groups#monitor-the-usage-of-matching-groups) <a href="#monitor-the-usage-of-matching-groups" id="monitor-the-usage-of-matching-groups"></a>

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

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FQ6ItSSHws128xgG3P5Il%2Fimage.png?alt=media&#x26;token=ee1513bb-b0cb-4897-b0e2-f48c6316e084" alt=""><figcaption></figcaption></figure>

#### 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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FXbZOKWHrN80aaFyDEcdt%2Fimage.png?alt=media&#x26;token=e80ca1bd-8506-453a-a104-5fe0e2e2c5a8" alt=""><figcaption></figcaption></figure>

#### Usage[​](https://dev.docs.dydu.ai/docs/Complementary_items/matching_groups#usage) <a href="#usage" id="usage"></a>

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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FznId9oFPHRZhqZ5VmsLj%2Fimage.png?alt=media&#x26;token=cd225d3f-4d05-4d3f-8a90-35ab5a993a43" alt=""><figcaption></figcaption></figure>

### 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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FrttehAzgxPOeHApBSbMT%2Fimage.png?alt=media&#x26;token=8cccb1ac-0bf0-44e9-b5f5-6f52eaa9b539" alt=""><figcaption></figcaption></figure>

3. Click **Choose a file** then select your .xslx or .xml file.
4. 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:

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FwKamZfws9ZUKLCssK0xI%2Fimage.png?alt=media&#x26;token=798bdbed-36c4-4c4a-9cc2-1ed5901252a7" alt=""><figcaption></figcaption></figure>

### More advanced options about matching groups[​](https://dev.docs.dydu.ai/docs/Complementary_items/matching_groups#more-advanced-options-about-matching-groups) <a href="#more-advanced-options-about-matching-groups" id="more-advanced-options-about-matching-groups"></a>

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FAiqGnGvFL1xvLF76UTT9%2Fimage.png?alt=media&#x26;token=5d97845f-d23d-44a4-aad5-b672395af1ca" alt=""><figcaption></figcaption></figure>

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**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FvpjAalX1XxNcckjDFx3Q%2Fimage.png?alt=media&#x26;token=11cb3ac1-a91e-45ba-bb62-6775e740a2fa" alt=""><figcaption></figcaption></figure>

By clicking on the ![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAVCAIAAABHbRCDAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAAPZJREFUSIlj/P//PwONAROtLaCTHSwkqXZycv769Sucy83NvW/fXoK6hktYDRc7SIvzjMyMX79+HTp4kIGBwc7eno2Njfp2hIWGMjAwvHj+nIGBISY6mkhdjHjyeVFR8dGjR0lyhLW1dV9fL5ogAX/k5uViurenp4eBgaGkpARNfMnSpefOnsM0BLsdS5YuZWBgePbsGSMjIwMDg5CgkJeXJwMDw6rVq3/9+nXr1i2IGjY2Nkjobdu2/d37d+fPnX/27BlEL7LLsIeVubkFMldZWXnZsqUMuPN5VFT03bt3kbWcPHkCzh4u+WO42IEvf1ALDJewAgAAVFoUhKAOxQAAAABJRU5ErkJggg==) icon, you can get more details about the matching process.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FOGnal6fZUR5R18XMWfPy%2Fimage.png?alt=media&#x26;token=a820f251-320c-472f-abea-e8b93449726e" alt=""><figcaption></figcaption></figure>

2. **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**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2Fg2oQB0GM7o3ekTBVsNLA%2Fimage.png?alt=media&#x26;token=e29c944f-5590-431b-8277-679e24b20c29" alt=""><figcaption></figcaption></figure>

3. &#x20;**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**.

4. &#x20;**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**.

5. **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**.

6. **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**.

7. **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**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FVl63qUNzVeU4C9UP0eVq%2FCapture%20d%E2%80%99e%CC%81cran%202023-09-25%20a%CC%80%2015.04.29.png?alt=media&#x26;token=2e882785-863f-457f-ac8f-2000a8e93736" alt=""><figcaption></figcaption></figure>

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**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FBSN5veyG9omv3C29kN4y%2FCapture%20d&#x27;%C3%A9cran%202024-03-05%20154509.png?alt=media&#x26;token=fc422f56-8c97-4ae9-b1c6-35477f2d74b2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FaAcpMtgDOaXkobtiW4iy%2FCapture%20d&#x27;%C3%A9cran%202024-03-05%20154333.png?alt=media&#x26;token=baaa0155-60b0-49f0-8d02-32758de113ee" alt=""><figcaption></figcaption></figure>

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2Feb87gbNso8sF5TWfBHZS%2FCapture%20d&#x27;%C3%A9cran%202024-03-05%20154526.png?alt=media&#x26;token=ee255722-e7f5-47f7-be93-38dea4145d1d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FO3AcTKd31Qyqi26gHbKk%2FCapture%20d&#x27;%C3%A9cran%202024-03-05%20154728.png?alt=media&#x26;token=a6388c1a-bd41-46f3-af22-a341bc4511ff" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FrEj9uI1tNE2phwUYZQeL%2Fimage.png?alt=media&#x26;token=af739289-0fec-401e-9419-89bd8f342d78" alt=""><figcaption></figcaption></figure>

With variable capture:

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FmvUqxJKSHDK89rfmnc1B%2Fimage.png?alt=media&#x26;token=9965e656-cfe7-4f73-ae0a-4832e8d0e086" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FaJxzJxC7Wpo91ZDLr2yz%2Fimage.png?alt=media&#x26;token=abd8c033-dd1c-46db-a726-78256546ef0b" alt=""><figcaption></figcaption></figure>

* **Case 2: solver configured on the matching group&#x20;*****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**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FbQxbKahFyqg405apDUZh%2Fimage.png?alt=media&#x26;token=40d25bf3-3c02-4d55-a15c-b455f7c68c82" alt=""><figcaption></figcaption></figure>

* **Case 3: solver configured on the matching group&#x20;*****Computer*****&#x20;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**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FM0EkTVtXLYlK5bQL8afO%2Fimage.png?alt=media&#x26;token=a59e2d92-22c7-4a72-a1e9-4651212f7c4a" alt=""><figcaption></figcaption></figure>

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):

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F13LeYdFt5Am2U4e7TCMm%2Fimage.png?alt=media&#x26;token=8d77b5db-9ccc-4570-8210-a411e988f17f" alt=""><figcaption></figcaption></figure>

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.

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

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FyxShArqujEt6JYGJYxTW%2Fimage.png?alt=media&#x26;token=08171fef-8bfb-45c3-883e-546f9cc03553" alt=""><figcaption></figcaption></figure>

3. Go to the bottom of the page and click on the **Solver** tab.
4. Specify **getNbPersons(groupTokens)** (for the purpose of the example) in the **Resolved value** field.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FAlaCwNyzJuCQNkEs7TVO%2FCapture%20d%E2%80%99e%CC%81cran%202023-09-25%20a%CC%80%2015.07.01.png?alt=media&#x26;token=5e8f5b5e-e332-4960-b53b-291ce4ea9db6" alt=""><figcaption></figcaption></figure>

5. Click **Update**.
6. Test your solver through a knowledge with capture (see [Variables](https://dev.docs.dydu.ai/docs/Complementary_items/variables)). You then obtain:

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FIHopIh3TxPKapdOIEp4o%2Fimage.png?alt=media&#x26;token=1a382763-8ec9-4591-900d-4068f1dc7e64" alt=""><figcaption></figcaption></figure>

**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.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2Fw7TtZzLIZLb3M5dqwFPj%2Fimage.png?alt=media&#x26;token=6dff8cff-446d-4d37-82ff-df5c92f0b421" alt=""><figcaption></figcaption></figure>

| Situation                                                                     | Synchronization action                                  |
| ----------------------------------------------------------------------------- | ------------------------------------------------------- |
| Adding additional formulation on the destination server (added manually)      | No deletion                                             |
| Adding additional formulation on the destination server (added automatically) | Deleting the formulation on the destination server only |

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.
