By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
You now have numbers. The last step — the one that turns a tester into a quality engineer — is deciding what the numbers mean for a release. That decision has to be made before you see the numbers, by rules everyone agreed to.
def evaluate_release(metrics, previous=None, tolerance=0.05) -> tuple[bool, list[str]]:
"""metrics: {name: {'mean': float, 'scores': [float], 'threshold': float,
'floor': float, 'high_is_bad': bool}}"""
reasons = []
for name, m in metrics.items():
worst = max(m['scores']) if m.get('high_is_bad') else min(m['scores'])
if m.get('high_is_bad'):
if m['mean'] > m['threshold']:
reasons.append(f"{name}: mean {m['mean']:.2f} above max {m['threshold']}")
if worst > m['floor']:
reasons.append(f"{name}: worst {worst:.2f} above floor {m['floor']}")
else:
if m['mean'] < m['threshold']:
reasons.append(f"{name}: mean {m['mean']:.2f} below {m['threshold']}")
if worst < m['floor']:
reasons.append(f"{name}: worst {worst:.2f} below floor {m['floor']}")
if previous and name in previous:
delta = m['mean'] - previous[name]
if (delta < -tolerance) if not m.get('high_is_bad') else (delta > tolerance):
reasons.append(f"{name}: regressed by {abs(delta):.2f}")
return (not reasons), reasonsmetric mean worst threshold status
faithfulness 0.86 0.31 0.85 FAIL (floor 0.50)
answer_relevancy 0.91 0.72 0.80 pass
correct_refusal 1.00 1.00 1.00 pass
rule_violations 0.00 0.00 0.00 pass
p95_latency_ms 3120 4210 <=4000 pass
VERDICT: BLOCK - faithfulness floor violation on 2 cases
q_014 'Can I return a gift card?' score 0.31
q_037 'Do you ship to New Zealand?' score 0.44This is what a trustworthy gate looks like: the average passed, the gate still blocked, and it named the two cases that caused it. If your gate cannot produce that output, it will be ignored within a month.
Key takeaways
A gate answers four questions: average, worst case, regression, zero-tolerance rules.
Hard floors and regression checks catch what averages hide.
A good failing report names the cases and the unsupported claim.
Report the same result three ways: engineers, product, leadership.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.