1. Home
  2. Kore.ai Conversational Platform
  3. Bot Builder Tool
  4. Train – NLP Optimization
  5. Fundamental Meaning
  6. Managing Patterns

Managing Patterns

To optimize accuracy and recognition of the NLP interpreter, you can create patterns for names for tasks and task fields. While using synonyms is great for words used in the name, sometimes, users may refer to a task using slang, metaphors, or other idiomatic expressions. For example, a task name might be Get Current Weather, but the user inputs, what’s happening with today’s rain situation. In this case, none of the words used in the task name are used, yet the input has the same meaning as Get Current Weather. In these cases, using patterns can help to improve NLP interpreter accuracy.

When the NLP interpreter matches a synonym to one task or field, and a pattern to a different task or field, the pattern match is prioritized and used for positive recognition over the synonym match.

To learn more about best practices and tips for optimizing NLP, see the Natural Language Processing Guide.

Navigating to the Patterns Tab

  1. Open the bot for which you want to add patterns.
  2. Hover over the side navigation panel and then click Natural Language > Training.
  3. Click the Patterns tab.
  4. On the Patterns page, click one of the following tabs:
    1. Intent Patterns – Add or edit patterns for dialog task User Intent nodes.
    2. Entity Patterns – Add or edit patterns for dialog task Entity nodes.
    3. Field Patterns – Add or edit task field patterns, for example, Date, Location, or Name as user input. This option is available only if the bot has one or more action, alert or information tasks.
    4. Task Patterns (this option has been merged with Intent Patterns post v6.40 release) – Add or edit patterns for any bot tasks, for example, Get Weather.

Adding Patterns for Intents

You can define a pattern as a sentence that represents the task but does not actually contain any of the words in the name of the task. Also, you can define where words should be ignored by the NLP interpreter to improve accuracy for recognizing the correct task.

For example, you can build a pattern like find* testable* value to recognize in the user input a sequence of words in order where the word find is followed by any number of words, followed by the word testable, and again followed by any number of words, which are finally followed by the word value. For this pattern, the user input can be Find me any testable integers corresponding to the value, which would match the pattern.

In the Intents Patterns section, you can view, add, and delete patterns for dialog tasks.

To add an intent pattern

  1. On the Patterns page, click the Intent Patterns tab,
  2. Click an intent name to enter the patterns for it.
  3. In the Type and Enter to add patterns field, enter one or more sentence patterns, and press ENTER between patterns.
  4. You can reorder, edit or delete patterns using the appropriate icons.

Adding Patterns for Entities

In the Entity Patterns section, you can view, add, and delete patterns for dialog task Entity node names.


To add an entity pattern

  1. On the Patterns page, click the Entity Patterns tab,
  2. Click an entity name to enter the patterns for it.
  3. In the Type and Enter to add patterns field, enter one or more sentence patterns, and press ENTER between patterns.
  4. You can reorder, edit or delete patterns using the appropriate icons.

Adding Patterns for Fields

You can view, add, and delete patterns for task fields in the Field Patterns tab.

Note: This option is available only if the bot has one or more action, alert or information tasks.


To add a field pattern

  1. On the Patterns page, click the Field tab,
  2. Click a field name to enter the patterns for it.
  3. In the Type and Enter to add patterns field, enter one or more sentence patterns, and press ENTER between patterns.
  4. You can reorder, edit or delete patterns using the appropriate icons.
Was this article helpful to you? Yes No 1