Intent matching

Stay organized with collections Save and categorize content based on your preferences.

When an end-user writes or says something, referred to as an end-user expression, Dialogflow compares the expression to the training phrases for each intent to find the best match. Matching an intent is also known as intent classification. This document describes the factors used to match an intent.

Matching algorithms

Dialogflow uses two algorithms to match intents: rule-based grammar matching and ML matching. Dialogflow simultaneously attempts both algorithms and chooses the best result.

The following table lists the pros and cons of these algorithms:

Algorithm Pros Cons
Rule-based grammar matching
  • Accurate with a small or large number of training phrase examples.
  • Models are updated quickly.
ML matching
  • Inaccurate with a small number of training phrase examples.
  • Models are updated slowly.
  • Less accurate than grammar matching for agents with training phrases in template mode.

Intent detection confidence

When searching for a matching intent, Dialogflow scores potential matches with an intent detection confidence, also known as the confidence score. These values range from 0.0 (completely uncertain) to 1.0 (completely certain). Without taking the other factors described in this document into account, once intents are scored, there are three possible outcomes:

  • If the highest scoring intent has a confidence score greater than or equal to the ML Classification Threshold setting, it is returned as a match.
  • If no intents meet the threshold, a fallback intent is matched.
  • If no intents meet the threshold and no fallback intent is defined, no intent is matched.

Intent priority

You can set priorities for intents. When two or more intents match the same end-user expression with similar confidence scores, priority is used to select the best match. Otherwise, the confidence score for intent matching is more important than priority.

Knowledge connectors

Knowledge connectors complement defined intents. They parse knowledge documents (for example, FAQs) to find information related to end-user expressions.

If a defined intent and a knowledge document are both potential matches, the match confidence of each and the knowledge results preference are used to determine which match is the selected match.


While contexts are active, Dialogflow is more likely to match intents that are configured with input contexts that correspond to the currently active contexts.

Fallback intents

Fallback intents have the lowest priority for intent matching.