> 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/sentiment-recognition.md).

# Sentiment Recognition

## Overview

Sentiment Recognition AI block allows you to analyze the sentiment of any given text.&#x20;

It uses advanced natural language processing techniques to identify the emotions and attitudes expressed in the text, whether they are positive, negative, or neutral. This AI block is highly accurate and can be used to analyze large volumes of text quickly and efficiently.&#x20;

It is particularly useful for businesses and organizations that need to monitor customer feedback, social media posts, and other forms of online communication. With Sentiment Recognition, you can gain valuable insights into the opinions and attitudes of your customers, allowing you to make informed decisions and improve your products and services.

## 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 - result variable, that the block produces. Change its name for ease of further use.

![](/files/btTm9qOYE8FPipVAyAuP)

## 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>Text (text)</td><td>Sentiment label (text)</td><td>"Positive", "negative" or "neutral" classification of the text input</td></tr><tr><td></td><td>Positive (score/number)</td><td>An exact score from 0 to 1 that defines the degree of positivity of the text input</td></tr><tr><td></td><td>Negative (score/number)</td><td>An exact score from 0 to 1 that defines the degree of negativity of the text input</td></tr><tr><td></td><td>Neutral (score/number)</td><td>An exact score from 0 to 1 that defines the degree of neutrality of the text input</td></tr></tbody></table>

{% hint style="info" %}
**Labeling** is useful for the general classification of texts at scale.

**Exact scores** are useful for:

A) Normalizing texts on the same axis&#x20;

B) Filtering them out using a filter with a specific threshold.
{% endhint %}


---

# 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/sentiment-recognition.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.
