- An LLM judgment for correctness, built with
arize-phoenix-evalsClassificationEvaluator. - A deterministic code check for format — a regex for a citation tag at the end of the answer.
explanation so you can audit how the final number was built.
Each axis runs independently — some can be LLM-judged, others pure code — and their scores blend into one number you can rank runs by.
Code
- Python
- TypeScript
Input mapping
If you add more sub-scores (e.g. a conciseness check that needs the original
input), expose them as new parameters here.
Output configuration
Continuous score in the range0.0 to 1.0 (matches the choice scores you configured on each sub-evaluator). Optimization direction: maximize.
Runtime requirements
Variants
Tune the weights or add more axes
TheWEIGHTS dict is the only knob — push correctness toward 1.0 for a near-pure correctness signal, or add a third axis (e.g. tone, length, safety) by appending a new ClassificationEvaluator and another entry in the dict. Each new LLM-judged sub-score adds one more API call per example, so weigh latency and cost when stacking too many axes.
All-code composite (no LLM)
If every sub-check is deterministic, dropphoenix.evals entirely — the evaluator runs in the in-process WebAssembly or Deno sandbox with no dependencies, no network, and no API key. Useful for cheap multi-rule checks: “has citation tag”, “ends with period”, “under 500 tokens”.
All-LLM composite (no code rules)
Replace the format regex with a secondClassificationEvaluator for conciseness, tone, or whatever other axis you care about. Every sub-score becomes a judge call, so latency and cost scale linearly with the number of axes.
Related
- LLM Jury — instead of combining different axes of one judgment, combine the same judgment from multiple LLMs.

