> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.milliseconds.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.milliseconds.ai/_mcp/server.

# Recipes

A [pattern](/patterns/overview) is a shape you apply to your own problem. A recipe is a finished job. Each page below names the capability, the exact labels or schema, the thresholds, and the code that ties them together.

## Pick a recipe by the problem

| Recipe                                                              | The job                                                           | Capabilities used                                                                              |
| ------------------------------------------------------------------- | ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [Support ticket triage](/recipes/support-triage)                    | Route, prioritise, and flag an inbound ticket with three calls.   | [classify](/capabilities/classify), [rate](/capabilities/rate), [yes-no](/capabilities/yes-no) |
| [Invoice extraction with verification](/recipes/invoice-extraction) | Pull a typed invoice record, then prove the critical fields.      | [extract](/capabilities/extract), [verify](/capabilities/verify)                               |
| [Content moderation](/recipes/content-moderation)                   | Score harm, hard-flag the clear cases, send the rest to a person. | [rate](/capabilities/rate), [yes-no](/capabilities/yes-no)                                     |
| [RAG passage filtering](/recipes/rag-passage-filtering)             | Drop retrieved passages that do not answer the question.          | [yes-no](/capabilities/yes-no)                                                                 |
| [PII detection](/recipes/pii-detection)                             | Find personal data and its offsets, then redact.                  | [entities](/capabilities/entities)                                                             |
| [Taxonomy classification](/recipes/taxonomy-classification)         | Walk a deep label tree one level at a time.                       | [classify](/capabilities/classify)                                                             |

## The recipes

#### [Support ticket triage](/recipes/support-triage)

Three independent calls return a queue, a priority score, and an urgency flag for one ticket.

#### [Invoice extraction](/recipes/invoice-extraction)

Extract the invoice header fields, verify the number and total, build a review queue.

#### [Content moderation](/recipes/content-moderation)

Rate harm on a described scale. Route the uncertain band to a human reviewer.

#### [RAG passage filtering](/recipes/rag-passage-filtering)

Score every retrieved passage against the question. Keep, drop, or flag by probability.

#### [PII detection](/recipes/pii-detection)

Describe each PII type, then redact with the start and end offsets the response returns.

#### [Taxonomy classification](/recipes/taxonomy-classification)

Classify level by level. Stop the descent when confidence drops below your bar.

## By capability

Use this index when you already know the capability and want a worked example.

| Capability                         | Recipes                                                                                                                                               |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Yes / no](/capabilities/yes-no)   | [Support triage](/recipes/support-triage), [Content moderation](/recipes/content-moderation), [RAG passage filtering](/recipes/rag-passage-filtering) |
| [Classify](/capabilities/classify) | [Support triage](/recipes/support-triage), [Taxonomy classification](/recipes/taxonomy-classification)                                                |
| [Rate](/capabilities/rate)         | [Support triage](/recipes/support-triage), [Content moderation](/recipes/content-moderation)                                                          |
| [Extract](/capabilities/extract)   | [Invoice extraction](/recipes/invoice-extraction)                                                                                                     |
| [Entities](/capabilities/entities) | [PII detection](/recipes/pii-detection)                                                                                                               |
| [Verify](/capabilities/verify)     | [Invoice extraction](/recipes/invoice-extraction)                                                                                                     |
| [Answer](/capabilities/answer)     | No recipe yet. [Choosing a capability](/concepts/choosing-a-capability) covers when to use it.                                                        |

## By input type

| Your input                                      | Start here                                                  |
| ----------------------------------------------- | ----------------------------------------------------------- |
| A short message from a person                   | [Support triage](/recipes/support-triage)                   |
| User-generated posts or comments                | [Content moderation](/recipes/content-moderation)           |
| A scanned or parsed document                    | [Invoice extraction](/recipes/invoice-extraction)           |
| Retrieved chunks from a vector store            | [RAG passage filtering](/recipes/rag-passage-filtering)     |
| Free text that may hold personal data           | [PII detection](/recipes/pii-detection)                     |
| Text against a label tree of hundreds of labels | [Taxonomy classification](/recipes/taxonomy-classification) |

> **Note**
>
> Every recipe runs against `https://api.milliseconds.ai` as written. Every request needs an API key. See [Authentication](/authentication).

## Before you copy one

Three things change per deployment. Read them once, then adapt each recipe.

1. Your label and statement wording drives accuracy. [Writing good statements and labels](/concepts/writing-good-questions) gives the rules.
2. The thresholds in each recipe are starting points, not defaults. Set your own bands with [thresholds and confidence routing](/concepts/thresholds).
3. A `text` holds at most 20,000 characters, and `texts` holds at most 32 items. [Limits and rate limits](/reference/limits) lists every other field limit.