Skip to content

fix: accuracy scorer checks section field, not just citation label - #44

Merged
crewcricle merged 1 commit into
mainfrom
fix/scorer-section-field-check
Jul 29, 2026
Merged

fix: accuracy scorer checks section field, not just citation label#44
crewcricle merged 1 commit into
mainfrom
fix/scorer-section-field-check

Conversation

@rprabhat

Copy link
Copy Markdown
Collaborator

Summary

Found while writing a detailed failure analysis of the production-path benchmark: q09 (bad debt deduction question) retrieved exactly the right section — the citation dict's section field read "...Section 25-35 (Bad debts)", an exact match for the expected "ITAA 1997 s.25-35" — but the citation LABEL stayed a bare "ITAA 1997". score_answer() only ever checked citation, never the richer section field hierarchical chunking already populates, so a perfectly-grounded answer scored cit_ratio=0.

Extends the existing section/division-token loosened match (from #43) to also check against the section field alongside the citation label and answer text.

Test plan

  • Full backend suite: 821 passed
  • New tests: section-field match credited when citation label is bare; wrong section in the field still not credited (guards against over-loosening)

…label

Found via q09 of the production-path benchmark: retrieval hit exactly
the right section (heading breadcrumb "...Section 25-35 (Bad debts)"
in the citation dict's `section` field, an exact match for the
expected "ITAA 1997 s.25-35"), but the citation LABEL stayed a bare
"ITAA 1997" - score_answer only ever read `citation`, never the
richer `section` field hierarchical chunking already populates.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
taxflow-dashboard Ready Ready Preview, Comment Jul 29, 2026 6:22am

@crewcricle
crewcricle merged commit 3cf4a1b into main Jul 29, 2026
7 checks 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