Skip to content

feat: record a tie for the top option and count ties in the report - #97

Merged
TMHSDigital merged 1 commit into
mainfrom
feat/record-ties
Sep 25, 2026
Merged

TMHSDigital merged 1 commit into
mainfrom
feat/record-ties

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Part of #10. This covers the two open questions that can be settled without live calls.

Should a tie be recorded in the artifact? Yes. Prediction.tied_for_top returns the options sharing the highest probability when two or more do, and otherwise returns (), including when there is no distribution. Each artifact record now carries tied_for_top. It's derived from the distribution already stored, and it's written for auditors, not read back.

Should the report surface the tie count? Yes, beside accuracy, and only when something tied:

  • Ties: 5 of 10 scored rows had two or more options tied for the highest probability, so the vendor's tie-break chose the answer, not a margin. On 5 of them the gold label was one of the tied options and was not the one chosen, so those rows count as wrong by a tie-break.

The selected label is still always the vendor's pick, never a recomputed argmax, as METHODOLOGY requires. METHODOLOGY's "Read the vendor's selected label" section now describes the flag and the report line, and says the tie-break's determinism is unknown.

Still open on #10: whether the vendor's tie-break is deterministic. That needs repeated live calls on a tied row, and the new flag is what makes those rows findable.

Tests: the property on tied, untied and single-option distributions; the flag in a written artifact; the count and the against-gold count in the report; no line when nothing tied. docs/example-report.md is unchanged, since the mock produces no ties. The gate, the site checks and the prose checks all pass.

🤖 Generated with Claude Code

On a two-decimal grid two options sharing the top probability is ordinary,
and a row decided by the vendor's tie-break looked like any other.
Prediction.tied_for_top names the tied options, each artifact record
carries them, and the report says beside accuracy how many rows tied and
on how many the gold label was a tied option the vendor did not choose.

Part of #10: whether the vendor's tie-break is deterministic needs live
calls, and the flag is what lets that be checked.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@TMHSDigital
TMHSDigital merged commit 49daf16 into main Sep 25, 2026
23 checks passed
@TMHSDigital
TMHSDigital deleted the feat/record-ties branch September 25, 2026 11:11
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.

1 participant