Classify returns a category label, a per-criterion confidence breakdown for every category in your schema, and timing information. This page explains every field in the response.Documentation Index
Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
Use this file to discover all available pages before exploring further.
Response Structure
Top-Level Fields
| Field | Type | Description |
|---|---|---|
job_id | string | Unique identifier for the classification job |
result.category | string | The best-matching category from your classification_schema. Always one of the category names you provided. |
response_confidence | object | Per-category and per-criterion confidence breakdown. null when no criteria are provided. |
duration | number | Time in seconds the classify request took. May be null. |
Category Confidence Fields
Each entry inresponse_confidence.categories contains:
| Field | Type | Description |
|---|---|---|
category | string | The category name from your schema |
confidence | number | Float between 0 and 1 representing the fraction of criteria that matched for this category |
criteria_confidence | array | Per-criterion evaluation results |
Criteria Confidence Fields
Each entry incriteria_confidence contains:
| Field | Type | Description |
|---|---|---|
criterion | string | The criterion text from your schema |
confidence | string | "high" (criterion matched the document) or "low" (criterion did not match) |
Structured Confidence: Reasoning You Can Act On
Classify doesn’t just return a label. It returns a per-criterion confidence breakdown for every category you defined, not just the winner. This gives you structured, interpretable reasoning for why a document was classified the way it was. Each criterion you define becomes a yes/no evaluation. Theconfidence score for a category is the fraction of its criteria that matched (high). In the example above, "invoice" scored 1.0 because all 3 criteria matched, while "contract" scored 0.33 because only 1 of 3 criteria matched.
This structured output is useful in several ways:
- Auditability. You can trace exactly which criteria drove a classification decision. If an invoice was misclassified, inspect the
criteria_confidenceto see which criteria matched or didn’t. - Threshold-based routing. Instead of blindly trusting
result.category, check the confidence score. If the top category scores below a threshold (e.g.,0.6), flag it for human review rather than routing it automatically. - Ambiguity detection. If two categories score similarly (e.g.,
0.67and0.55), the document may be ambiguous. Use this signal to trigger a different workflow or request additional information. - Schema refinement. Low-confidence classifications across your pipeline tell you which criteria need to be more specific. The per-criterion breakdown pinpoints exactly which criteria are too broad or overlapping.
Example: Confidence-Based Routing
Use the per-category confidence scores to build routing logic that handles uncertain classifications gracefully.Related
Classify Overview
Quick start, request parameters, and pipeline integration.
Best Practices
Write better classification schemas for more accurate results.