Skip to content

add a Grades admin tab for fact-decomposition reviews - #33

Open
MrKoga wants to merge 4 commits into
MedARC-AI:codex/decomposition-evalfrom
MrKoga:evan/grades-viewer
Open

MrKoga wants to merge 4 commits into
MedARC-AI:codex/decomposition-evalfrom
MrKoga:evan/grades-viewer

Conversation

@MrKoga

@MrKoga MrKoga commented Oct 21, 2026

Copy link
Copy Markdown

Adds a Grades tab to the admin page (web/ frontend only, no server changes). It reads the existing admin export for a fact-decomposition dataset and shows what reviewers did with the model's claims:

  • Overview: one row per task, with summary tiles for grade disagreements, review flags, and added claims.
  • Task view: one row per claim, with every reviewer's grade, review choice, and extraction-issue notes.
  • Analysis: the counts behind each review question (extraction, atomic claims, duplicates, missing claims, grading), with a model-vs-human grade grid and per-task bars.

Also adds "Download everything as one file" to the Export tab.

Tests: bun run check (types, lint, 35 unit tests), bun run build, and a new Playwright spec, tests/admin-grades.spec.ts, which imports one row, reviews it, and checks all three views read it back. The full e2e suite passes on this branch (101 tests).

The Grades tab reads the existing admin export for a fact-decomposition
dataset and shows every reviewer's decisions on the model's claims:

- Overview: one row per task with the source text color-coded by claim,
  how often humans disagreed with the model's grade, with each other's
  grades, and flagged a review issue, plus the claims reviewers added.
- Task view: one row per claim with each reviewer's grade and review
  choice, the extraction-issue notes, and a "By reviewer" dialog.
- Analysis: the questions the review data is for (extraction, atomic
  claims, duplicates, missing claims, grade agreement), each answered
  with the numbers behind it and how far the reviewers agreed.

The Export tab gains "Download everything as one file". No server-side
changes.
Analysis: a 3x3 grid of the model's grade against the humans' grades,
one bar per task on the three review-issue cards (click opens the task),
and a split agreement bar under every Human agreement heading. Overview:
a thin meter under each rate tile, the review-issues meter split by flag.

Counting changes: a claim two reviewers both added counts once; a review
"issue" means one of the three flag buttons, so a grade change alone is a
grade disagreement, not a review issue; claims made with Split into atoms
are not counted as claims the model missed.

Wording: one name per measure across tiles, filter chips, both tables and
the Analysis cards; "Multiple Facts" spelled as the review page's button;
the humans-vs-humans metric explained behind an info icon wherever it
appears. Removed the row tint, the search box and duplicated bullets.
Review choices live in one list (reviewOptions.ts).
Real questions are whole clinical vignettes and real answers run to
several paragraphs, so one Overview row filled the screen. The Question
and Source text cells now show their first few lines, with a Show more /
Show less link that appears only when the text is cut off.
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