concept
Paired prompt regression evaluation
Compare reviewed pass/fail decisions on identical case IDs. Report counts and critical failures; an empty set has no pass rate. This measures the recorded cases, not general model reliability.
Formal Syntax & Structure
artificial-intelligence syntaxartificial-intelligence
regression = old_pass and not new_passWorking Example
Example Snippetartificial-intelligence
def compare_versions(cases): # Each row contains independently reviewed pass/fail booleans. if any(len(row) != 2 or any(type(v) is not bool for v in row) for row in cases): raise ValueError("each row must contain two booleans") return {"total": len(cases), "old_pass": sum(a for a, b in cases), "new_pass": sum(b for a, b in cases), "regressions": [i for i, (a, b) in enumerate(cases) if a and not b], "improvements": [i for i, (a, b) in enumerate(cases) if b and not a]}
print(compare_versions([(True, True), (False, True), (True, False)]))