Skip to content

test(eval): recognize real Discharge Planning docs in golden alias#206

Merged
BigSimmo merged 1 commit into
mainfrom
claude/remaining-supported-triage
Jul 2, 2026
Merged

test(eval): recognize real Discharge Planning docs in golden alias#206
BigSimmo merged 1 commit into
mainfrom
claude/remaining-supported-triage

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Smallest safe fix for the admission-discharge-comparison golden failure (item #2 from triage).

Root cause

The golden fixtures reference synthetic MHSP.* filenames that no longer exist — the corpus was repopulated with real named documents. The clinicalDocumentAliases layer maps the old names to real ones, but the Discharge alias listed only "…to Discharge" mental-health variants, not the "Discharge Planning for Community Patients / Inpatients" documents that actually rank for this query. So the case reported a false top-5 recall miss on the non-existent MHSP.Discharge.pdf, even though a real, relevant discharge document ("Discharge Planning for Community Patients (NMHS).pdf") was retrieved and the answer was grounded.

Fix

Add "Discharge Planning" to the Discharge alias. Any "Discharge Planning …" document is unambiguously a discharge document, so this recognizes a genuine hit rather than masking a miss (the concern I flagged during triage).

Verification

  • admission-discharge-comparison now passes: grounded, 5 citations, no failures.
  • tests/eval-quality.test.ts 11/11; typecheck/lint/prettier clean.

Not included (deliberately): the NOCC and agitation-table failures are a separate, deeper issue — the deterministic document-list / table answers are mangled by the clinical-prose sanitizer (sanitizeStructuredText) they shouldn't run through. That has no small safe fix (the sanitizer is shared and load-bearing for real LLM prose), so it's left as a scoped follow-up rather than risking regressions.

🤖 Generated with Claude Code

… alias

The golden fixtures reference synthetic MHSP.* filenames that were superseded
when the corpus was repopulated with real named documents. Most alias-match, but
the Discharge alias listed only "…to Discharge" mental-health variants, not the
"Discharge Planning for Community Patients / Inpatients" documents that actually
rank for the admission-vs-discharge comparison. That made
admission-discharge-comparison report a false top-5 recall miss on the
non-existent MHSP.Discharge.pdf even though a real, relevant discharge document
was retrieved.

Add "Discharge Planning" to the Discharge alias. Any "Discharge Planning …"
document is unambiguously a discharge document, so this recognizes a genuine hit
rather than masking a miss. admission-discharge-comparison now passes (grounded,
5 citations); eval-quality unit tests 11/11.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BigSimmo
BigSimmo merged commit 4df9ad4 into main Jul 2, 2026
4 checks passed
@BigSimmo
BigSimmo deleted the claude/remaining-supported-triage branch July 2, 2026 17:22
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