> For the complete documentation index, see [llms.txt](https://docs.drafter.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.drafter.ai/building-blocks/actions/classification.md).

# Classification

## Overview

Drafter AI's Custom Classification allows you to define the class or category of text from a defined list.&#x20;

This is useful for organizing and categorizing large volumes of text, such as customer feedback, social media posts, or product reviews. AI analyzes the text input and assigns it to the appropriate category. You can define the categories and customize the classification rules to suit their specific needs.&#x20;

It can also be integrated with other AI blocks to provide a comprehensive text analysis solution.

## How to Setup

Provide the next mandatory info:

1. Data input (text) - variables from other blocks or provided by a user as manual input
2. Data output (text) - result variable, that the block produces. Change its name for ease of further use.

{% hint style="info" %}
You can provide a custom list of categories.

If you want AI to categorize your text input itself - leave it blank (Remove the "Categories" part)
{% endhint %}

<figure><img src="/files/Fq39LkMgp2og8WcBOJEH" alt=""><figcaption></figcaption></figure>

## Inputs and Outputs

<table><thead><tr><th width="188">Input</th><th width="163.33333333333331">Output</th><th>Output Description</th></tr></thead><tbody><tr><td>Any Text (text)</td><td>Category (text)</td><td>Defines a category of the text in general, or assigns to a specific category from the pre-defined list.</td></tr></tbody></table>


---

# 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.drafter.ai/building-blocks/actions/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.
