> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/platform-resources/skill-library/ai-skills/intent-classification.md).

# Intent Classification

**Intent Classification** takes a natural-language query and matches it to one of the intents you've defined, so the workflow can route to the right action rather than guessing.

{% hint style="info" %}
**Reference layer pending.** This page documents the skill's purpose and configuration as used in the builder. Its formal configuration schema, output schema, and error codes are not yet documented — see the [Skill Library](/platform-resources/skill-library.md) overview.
{% endhint %}

## Worked example: routing inquiries in a financial chatbot

An agent powers a financial inquiry chatbot. A customer types *"Can you please check my account balance?"* or *"I need to dispute a recent transaction."* The workflow has to understand which, and route accordingly.

**The problem.** Customers phrase the same goal in different ways. A keyword search misses *"How much money is in my account?"* — no keyword matches, but the intent is obvious to a person.

**The approach.** Define a set of intents (`CheckAccountBalance`, `DisputeTransaction`) with examples of how each might be phrased. The skill uses an LLM to match the query to the best-fitting intent.

**1. Choose the model.** Select a model from the **Model ID** dropdown.

<figure><img src="/files/SG9cvEVrKS5O2kBhthla" alt=""><figcaption><p>Choosing the model for Intent Classification</p></figcaption></figure>

**2. Define your intents.** This is the part that matters. For each:

* **Name** — a clear identifier, e.g. `CheckAccountBalance`.
* **Description** — what the intent means: *"Triggered when a user wants to know their current account balance."*
* **Examples** — several phrasings a user might actually use: *What's my balance?*, *How much money is in my account?*, *Show me my current funds.* These are what teach the model to recognize the intent.

Repeat for every intent the workflow handles — `DisputeTransaction`, `ApplyForLoan`, and so on.

**3. Set the query.** Point the **Query** field at the user's message from the previous step — `$input.userQueryText`.

<figure><img src="/files/yANRMf07w3v8OIUzyrRn" alt=""><figcaption><p>Feeding the user's message in for analysis</p></figcaption></figure>

{% hint style="info" %}
The quality of the examples decides the quality of the classification. Write the phrasings your customers actually use — including the awkward ones — rather than the tidy version you'd write yourself.
{% endhint %}

## Output

* **`intentMatched`** — `true` or `false`: whether a suitable intent was found.
* **`intents`** — the list of potential matches. **The first item is the best match.** Branch on this to route the workflow.
* **`query`** — the original query that was analyzed.

Handle `intentMatched: false` deliberately. A user whose intent you didn't anticipate is a real case, and falling through to nothing is a worse experience than saying you didn't understand.

***

To add this skill to an agent, see [Adding a Skill to the Agent](/agent-builder/build/adding-a-skill-to-the-agent.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.uptiq.ai/platform-resources/skill-library/ai-skills/intent-classification.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
