> ## Documentation Index
> Fetch the complete documentation index at: https://dify-6c0370d8-add-new-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Question Classifier

> Intelligently categorize user input to route workflow paths

The Question Classifier node intelligently categorizes user input to route conversations down different workflow paths. Instead of building complex conditional logic, you define categories and let the LLM determine which one fits best based on semantic understanding.

## Configuration

### Input and Model Setup

**Input Variable** - Select what to classify, typically `sys.query` for user questions, but can be any text variable from previous workflow nodes.

**Model Selection** - Choose an LLM for classification. Faster models work well for simple categories, while more powerful models handle nuanced distinctions better.

<Frame caption="Question Classifier configuration interface">
  <img src="https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/node/2f039c5ff3f095b0eed291101d9bff15.png" alt="Question Classifier setup" />
</Frame>

### Category Definition

Create clear, descriptive labels for each category with specific descriptions of what belongs in each. Be precise about boundaries between categories to help the LLM make accurate decisions.

Each category becomes a potential output path that you can connect to different downstream nodes like specialized knowledge bases, response templates, or processing workflows.

## Classification Example

Here's how the Question Classifier works in a customer service scenario:

<Frame caption="Customer service classification workflow">
  <img src="https://assets-docs.dify.ai/dify-enterprise-mintlify/en/guides/workflow/node/2f06ecce149c844c23be70a8fcff09bc.png" alt="Customer service classification" />
</Frame>

**Categories Defined:**

* **After-sales service** - Warranty claims, returns, repairs, and post-purchase support
* **Product usage** - Setup instructions, troubleshooting, feature explanations
* **Other questions** - General inquiries not covered by specific categories

**Classification Results:**

* "How to set up contacts on iPhone 14?" → **Product usage**
* "What is the warranty period for my purchase?" → **After-sales service**
* "What's the weather like today?" → **Other questions**

Each classification result routes to different knowledge bases and response strategies, ensuring users receive relevant, specialized assistance.

## Advanced Configuration

### Instructions and Guidelines

Add detailed classification guidelines in the **Instructions** field to handle edge cases, ambiguous scenarios, or specific business rules. This helps the LLM understand nuanced distinctions between categories.
