Skip to main content
Decision models are an alternative to language-model judges for classification-style evaluations. Both are used the same way in the Phoenix SDK: you pass either one as an evaluator’s judge. See LLM as a Judge for the language-model approach.
A language-model judge reads a prompt and generates text, then Phoenix parses a label and an explanation from that text. A decision model works differently: it is constrained to answer one typed question; here, which label applies; and returns the chosen label together with a probability for each option (and a confidence when the provider reports one). Because it does not generate free-form text, it returns no explanation. This makes a decision model a natural fit for classification, where the task is exactly to pick one label from a fixed set. You trade the written rationale of an LLM judge for a direct, structured choice with per-label probabilities.

When to Use a Decision Model

Use a decision model when:
  • The evaluation is a classification with a fixed set of labels (binary or multi-class).
  • You want calibrated per-label probabilities rather than a single label.
  • You do not need a written explanation for each judgement.
Use a language-model judge instead when you need a human-readable rationale, or when the task is not a simple classification.

How It Works

1

Identify Evaluation Criteria

Determine what you want to evaluate, such as faithfulness, toxicity, or relevance. See the pre-built evaluators for examples.
2

Define the Labels

A decision model answers a choice question, so define the set of labels (the choices) it must pick from.
3

Select a Decision Model

Choose a decision model from a supported provider. The decision model is passed to the evaluator in the same place as a language model.
4

Generate Evaluations and View Results

Run the evaluator across your data. Each result carries the chosen label, a numeric score, and per-label probabilities (and a confidence when the provider reports one) in its metadata — but no explanation.

Example

Any classification evaluator, including every pre-built metric, accepts a decision model in place of a language model.

Using Decision Models in Phoenix

Custom Evaluators

Build classification evaluators in Python or TypeScript, backed by a language model or a decision model.

Configuring the Decision Model

Decision providers, their adapters, and required parameters.