Skip to content

feat(match): confidence calibration, honesty metrics, disambiguation (D2/D6/G1) — Gate 4#30

Merged
officialCodeWork merged 1 commit into
developmentfrom
build/phase-4/step-4.5-calibration
Jul 14, 2026
Merged

feat(match): confidence calibration, honesty metrics, disambiguation (D2/D6/G1) — Gate 4#30
officialCodeWork merged 1 commit into
developmentfrom
build/phase-4/step-4.5-calibration

Conversation

@officialCodeWork

Copy link
Copy Markdown
Owner

Step 4.5 — Confidence calibration & ambiguity protocol (closes Gate 4)

Failure modes D2 / D6 / G1. The final matching-engine step.

  • Calibration — confidence thresholds live in core (CONFIDENCE_THRESHOLDS). New node eval/dist/run.js --calibrate measures precision at the high cutoff on the eval set and writes eval/calibration.json (precision@high 1.000, n=71).
  • Honesty metrics + gates — the scorecard now reports highConfidenceCorrect, ambiguityHonesty, and poisonRate; thresholds.json gates them at = 1.0 / ≥ 0.90 / ≤ 0.05. This run: 1.000 / 1.000 / 0.000.
  • Ambiguity protocol (D6/G1) — the disambiguation question is built from the differences between the tied leaders:

    Which one — BillingForm (shows "Card number"), or ProfileForm (shows "Display name"), or SettingsForm (shows "Notifications")? Add a term unique to the one you mean.
    Declined reasons stay machine-readable (no-signal / not-our-app / …).

Verification

  • 40 core + 3 vision + 102 parser tests pass.
  • pnpm eval: green with the new calibration/honesty/poison gates.

Gate 4 passes — the matching engine (Phase 4) is complete (milestone M4: screenshot/text → ranked, calibrated, honest matches).

🤖 Generated with Claude Code

…ation (D2/D6/G1) — Gate 4

Close out the matching engine (TRACKER step 4.5):

- Calibration: confidence thresholds live in core (CONFIDENCE_THRESHOLDS); a new
  `node eval/dist/run.js --calibrate` measures precision at the `high` cutoff on
  the eval set and records eval/calibration.json (precision@high 1.000, n=71).
- Honesty metrics + gates: the scorecard now reports highConfidenceCorrect,
  ambiguityHonesty, and poisonRate; thresholds.json gates them
  (=1.0 / ≥0.90 / ≤0.05). Current run: 1.000 / 1.000 / 0.000.
- Ambiguity protocol (D6/G1): the `disambiguation` question is now built from
  the DIFFERENCES between the tied leaders — "Which one — BillingForm (shows
  'Card number'), or ProfileForm (shows 'Display name')?" — so the caller can
  answer with a resolving term. Declined reasons stay machine-readable
  (no-signal / not-our-app / …).

40 core + 3 vision + 102 parser tests pass; eval green with the new gates.
**Gate 4 passes — matching engine complete (M4).**

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@officialCodeWork
officialCodeWork merged commit 1298cb0 into development Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants