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.
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.
Context
While
contexts
are active, Dialogflow is more likely to match intents that are configured with
input contexts
that correspond to the currently active contexts.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eDialogflow uses both rule-based grammar matching and ML matching algorithms to compare end-user expressions with intent training phrases, selecting the best result from both.\u003c/p\u003e\n"],["\u003cp\u003eIntent detection confidence scores, ranging from 0.0 to 1.0, determine if an intent is matched, with higher scores indicating greater certainty and if none are met, a fallback intent or no intent at all will be returned.\u003c/p\u003e\n"],["\u003cp\u003eIntent priority is used to choose the best match when multiple intents have similar confidence scores, but otherwise, the confidence score is the primary factor in intent matching.\u003c/p\u003e\n"],["\u003cp\u003eKnowledge connectors, which parse knowledge documents, can be matched alongside intents, and the match confidence along with knowledge result preferences will be used to determine which match will be returned.\u003c/p\u003e\n"],["\u003cp\u003eContexts increase the likelihood of matching intents with input contexts that correspond to currently active contexts, while fallback intents have the lowest priority for intent matching.\u003c/p\u003e\n"]]],[],null,["# Intent matching\n\nWhen an end-user writes or says something,\nreferred to as an *end-user expression* ,\nDialogflow compares the expression to the\n[training phrases](/dialogflow/docs/intents-training-phrases)\nfor each intent to find the best match.\nMatching an intent is also known as *intent classification*.\nThis document describes the factors used to match an intent.\n\nMatching algorithms\n-------------------\n\nDialogflow uses two algorithms to match intents:\n*rule-based grammar matching* and *ML matching*.\nDialogflow simultaneously attempts both algorithms\nand chooses the best result.\n| **Note:** ML matching can be [disabled for an intent](/dialogflow/docs/intents-settings#disable-ml), but this is rarely a good option.\n\nThe following table lists the pros and cons of these algorithms:\n\nIntent detection confidence\n---------------------------\n\nWhen searching for a matching intent,\nDialogflow scores potential matches with an *intent detection confidence* ,\nalso known as the *confidence score*.\nThese values range from 0.0 (completely uncertain) to 1.0 (completely certain).\nWithout taking the other factors described in this document into account,\nonce intents are scored,\nthere are three possible outcomes:\n\n- If the highest scoring intent has a confidence score greater than or equal to the [ML Classification Threshold](/dialogflow/docs/agents-settings#ml) setting, it is returned as a match.\n- If no intents meet the threshold, a [fallback intent](/dialogflow/docs/intents-default#fallback) is matched.\n- If no intents meet the threshold and no fallback intent is defined, no intent is matched.\n\nIntent priority\n---------------\n\nYou can set\n[priorities](/dialogflow/docs/intents-settings#priority)\nfor intents.\nWhen two or more intents match the same end-user expression\nwith similar confidence scores,\npriority is used to select the best match.\nOtherwise, the confidence score for intent matching\nis more important than priority.\n\nKnowledge connectors\n--------------------\n\n[Knowledge connectors](/dialogflow/docs/knowledge-connectors)\ncomplement defined intents.\nThey parse *knowledge documents* (for example, FAQs)\nto find information related to end-user expressions.\n\nIf a defined intent and a knowledge document are both potential matches,\nthe match confidence of each and the\n[knowledge results preference](/dialogflow/docs/knowledge-connectors#settings)\nare used to determine which match is the selected match.\n\nContext\n-------\n\nWhile\n[contexts](/dialogflow/docs/contexts-overview)\nare active, Dialogflow is more likely to match intents that are configured with\n[input contexts](/dialogflow/docs/contexts-input-output#input_contexts)\nthat correspond to the currently active contexts.\n\nFallback intents\n----------------\n\n[Fallback intents](/dialogflow/docs/intents-default#fallback)\nhave the lowest priority for intent matching."]]