# Classification

## Overview

Fastino’s Classification Model is a general-purpose, multi-task classifier designed to assign structured labels to freeform text. It supports sentiment analysis, topic tagging, tone detection, content moderation, document type prediction, and more. Users can define custom label sets at runtime or rely on rich, built-in domain coverage across business, safety, and enterprise scenarios.

The model is zero-shot capable and optimized for high-throughput inference.

***

## Example Use Cases

* Tagging customer support messages with tone, intent, or urgency
* Classifying product reviews, social posts, or news into topical categories
* Detecting hate speech, threats, or spam for trust & safety
* Labeling documents or forms for routing and indexing
* Implement guardrails for LLM outputs by enforcing tone, scope, or factuality policies

***

## Domains

Fastino’s classification model supports dozens of domains, each with pre-trained, extensible label sets.

| Domain                  | Description                                                                      | Example Classes                                                   |
| ----------------------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| Sentiment & Emotion     | Classify tone, polarity, or opinion in communications.                           | Positive, Negative, Joy, Trust, Sarcastic                         |
| Topic Detection         | Tag content for routing, personalization, or analysis.                           | Sports, Politics, Health, Technology, Travel                      |
| Toxicity & Safety       | Detect abusive, harmful, or policy-violating content.                            | Racial Hatred, Harassment, Threats of Violence, Slurs             |
| Spam & Attacks          | Identify phishing, scams, or low-quality/malicious messages.                     | Phishing, Financial Scam, Unsolicited Marketing                   |
| LLM Guardrails          | Classify model inputs/outputs to enforce safe and aligned behavior.              | Jailbreak Attempt, Friendly Assistant, Out of Scope               |
| Language Detection      | Identify the input language for multilingual routing or filtering.               | English, French, Mandarin Chinese, Korean                         |
| Intent Recognition      | Extract structured intent from user queries across industries.                   | TransferFunds, ResetPassword, ScheduleAppointment, ReportClaim    |
| Document Classification | Predict document types in insurance, healthcare, legal, and financial workflows. | Loan Application, HIPAA Form, Employment Agreement, Sales Invoice |
| Social & User Content   | Tag social posts, blogs, or feedback by structure or purpose.                    | Meme, Product Review, Life Event, Advocacy Post                   |
| E-commerce & Listings   | Classify retail products or listings by type for personalization or search.      | Electronics, Clothing, Furniture, Books                           |

***

## Usage

{% code title="Example Body" %}

```jsonp
{
  "model_id": "fastino-classification-••••••••••", 
  "input": [
    {
      "text": "The performance was absolutely electrifying. Best concert I’ve ever been to!",
      "parameters": {
        "classifications": [
          {
            "task": "sentiment",
            "labels": "positive, negative, neutral"
          },
          {
            "task": "topic",
            "labels": "entertainment, sports, politics, technology"
          }
        ]
      }
    }
  ]
}
```

{% endcode %}

{% code title="Example Response" %}

```
{
  "prediction": {
    "sentiment": ["positive"],
    "topic": ["entertainment"]
  },
  "probabilities": {
    "sentiment": {
      "negative": 0.01,
      "neutral": 0.04,
      "positive": 0.95
    },
    "topic": {
      "entertainment": 0.92,
      "sports": 0.03,
      "politics": 0.01,
      "technology": 0.04
    }
  }
}
```

{% endcode %}
