Skip to main content
Add a top-level schema.classifications array to define one or more classification tasks. Each task accepts exactly these keys:
string
required
A stable name for the classification task. The same name appears in the parsed result.
string[]
required
At least one permitted label. Decide does not accept label-description objects.
boolean
default:"false"
When false, return the single highest-scoring label. When true, return every label that reaches cls_threshold.
number
An inference-time cutoff from 0 to 1 for multi-label tasks. It does not affect training and does not change single-label selection.
integer
Accepted for compatibility, but currently has no effect on GLiNER 2.5 Decide.

Parse classification results

GLiNER 2.5 Decide returns a standard Chat Completions envelope. The classification result is serialized as JSON inside choices[0].message.content:
Do not read classification tasks directly from choices[0]; parse message.content first.

Single-label classification

Single-label tasks always return the highest-scoring label:
label is one of the strings supplied in the task’s labels array. confidence is the model’s confidence for the selected label, from 0 to 1. Labels are unordered; listing low, medium, and high in that order does not create an ordinal scale.

Multi-label classification

Multi-label tasks return an array containing each selected label and its confidence:
Only labels meeting the task’s cls_threshold are selected. Increase cls_threshold to favor precision; decrease it to favor recall. A stricter threshold can produce a shorter array or no selected labels.

Run multiple tasks in one request

Tasks are scored in one forward pass but remain independent. Classic classification does not enforce implications, exclusions, cardinality rules, or ordinal relationships between tasks. The parsed result is keyed by the task names:

Default schema

If you omit both schema and response_format, Decide uses its catalog-default intent task with book, cancel, change, and status. The response reports x_fastino.default_schema_applied: true when that default is used.

Common validation mistakes

Evaluate and train

Measure quality, tune thresholds, and adapt the model for your domain.

API reference

Inspect the complete Chat Completions response schema.