Skip to main content
Intent routing maps a user message to one of your intents, for example to choose a support queue or a conversation flow. It is the default task type, so you don’t need to set task_type.

Label-only intents

For the most reliable abstention, list your intents as label-only options: descriptive ids with an empty description.
Response
With label-only options, abstention_status is calibrated: the abstention threshold was validated for this setup. See Abstention.

Out-of-scope messages

When a message matches none of your intents, the model abstains. With the same options and the context "What is the weather like on Mars?":
Route these messages to a fallback, like a general assistant or a human, instead of forcing them into an intent.

Naming intents

With label-only options, the option id is all the model sees about the intent. Good ids make a difference:
  • Use descriptive snake_case ids: lost_or_stolen_card, not intent_07.
  • Keep ids distinct. If two intents are hard to tell apart from their names, expect more abstentions between them.
  • Avoid a catch-all like other. Let abstention handle out-of-scope messages.

Intents with descriptions

You can add a description to each option when an id alone is ambiguous:
This works well for accuracy, but abstention for intents with descriptions is advisory, not calibrated. Treat abstain as a hint and keep your own checks for high-stakes routes.

Many intents

A question can have up to 64 options. If you have more intents, route in two steps: first choose a category, then choose an intent within that category in a second request.