Quality Score
Understand how EvalGate computes the 0-100 quality score for every evaluation run, what each component measures, and how to interpret flags and evidence levels.The quality score is EvalGate’s flagship metric — a single 0-100 number computed for every evaluation run. It captures pass rate, safety, judge quality, schema compliance, latency, and cost into one comparable score so you can track quality trends and gate releases.
How the score is computed
The score is a weighted average of six sub-scores, each normalized to 0-1 before blending:
Weights are normalized so they always sum to 100%. Organizations can override weights via system policy — see
ScoringPolicyConfig.
Formula
Default values
Latency scoring
Latency is scored linearly between the good and bad bands:- Score 1.0 when
avgLatencyMs <= 1500ms - Score 0.0 when
avgLatencyMs >= 8000ms - Linear interpolation between the two thresholds
Cost scoring
Cost is scored relative to the budget:- Score 1.0 when
avgCostUsd <= budgetUsd - Linear decay when cost exceeds budget
- Score 0.0 when cost reaches 2x budget
Custom metrics
You can add custom metrics to the score by providingcustomMetrics in the score inputs. Each custom metric has a value (0-1) and a weight (positive number). Custom metrics are blended with the base score proportionally to their total weight.
Fallback behavior
When a data source is missing, the score uses conservative fallbacks:
This means a run with only pass/fail data still gets a meaningful score, but the flags will indicate which dimensions are missing.
Flags
Flags are warning indicators surfaced alongside the score. They don’t change the score but alert you to data quality issues or risks:Evidence levels
The evidence level indicates how trustworthy the score is based on data completeness:
Use the evidence level to decide whether to trust a score for gating decisions. A “weak” score may still be useful for trend tracking but should not block a release on its own.
Scoring spec versioning
Every quality score is persisted with:scoringVersion— the spec version used (currentlyv1)inputsJson— the exact inputs that produced the scorescoringSpecJson— the full scoring spec at computation timeinputsHash— SHA-256 hash of canonicalized inputsscoringSpecHash— SHA-256 hash of canonicalized scoring specscoringCommit— Git commit SHA when the score was computed
/api/quality/spec, which returns the current scoring spec.
API access
GET /api/quality/spec— Returns the current scoring spec (weights, thresholds, version)GET /api/quality/{evaluationId}— Returns quality scores for an evaluationPOST /api/quality/recompute/{runId}— Recomputes the quality score for a specific run