← Back to Pull requests

fix(eval): flip negated invalid answers to valid in audio scoring #853

Merged
CJstate merged 2 files (15 lines) on Nov 30, 2026 14:18 UTC
View on GitHub
CJstate CJstate commented on Nov 19, 2026 09:08 UTC
Author

_extract_valid only flipped valid to invalid when a negation preceded it.
A reply like "not invalid" was therefore graded as invalid, when the double
negation means the answer is valid — a correct model answer marked wrong.

Negation now flips both labels, matching _extract_yes_no's yes/no path.

Regression coverage adds "not invalid" to the negation test; the three existing
"not valid" cases still grade as invalid.

Validation:

  • pytest tests/evals/ — 128 passed

  • git diff --check — clean
  • Diff: 15 lines (+11 / -4) across 2 files Reviewer: andimarafioti Review duration: 16150m
    All Vouch review confidence checks passed
    Residual risk 0.07 = Change Risk (0.21) × (1 − Review Confidence (0.68)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.21 · 15 lines diff across 2 files
    0.21
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.35 · 1 substantive comment(s)
    0.35
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    67%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.166
    Real PR Conversation Timeline
    2 items
    andimarafioti andimarafioti approved these changes on Nov 30, 2026 14:18 UTC
    Approved Reviewer
    Reviewers
    Assignees
    CJstate CJstate
    Labels
    risk: low confidence: 67.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 21% (LOW) · Higher = larger blast radius
    21%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 67.5% · Lower = rushed or shallow review
    67.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 6.8% · Safe to merge
    6.8%