← Projects

scribecheck — Audit AI Scribe Notes Against The Visit Transcript

Active
PythonOllamaNext.jsReactTypeScript
View Repository →
▶Product demo

Problem

Ambient AI scribes write the clinical note for a visit, and every vendor claims it is accurate. None publish hallucination rates with a method a clinic can rerun on its own notes. A note that says the patient reports chest pain when the patient said no chest pain, or that leaves out a stated penicillin allergy, is easy to miss in a quick read.

Business Impact

scribecheck is for clinics, health-tech teams and anyone evaluating an AI scribe vendor. It gives them a method they can rerun on their own notes instead of relying on a vendor's accuracy claim. Because the CLI exits non-zero on unsafe findings, it can gate a vendor or model upgrade in CI. It ships with synthetic transcripts, so it can be evaluated without any patient data.

System Approach

  • A Python command line tool with no runtime dependencies; an encounter is a folder with transcript.txt and note.txt.
  • Parses the transcript into timestamped turns and the note into claims, then runs three checks: flipped, dropped, invented.
  • Flipped (negation) and dropped (drug, dose, allergy) checks are deterministic string matching, with a seed drug lexicon in scribecheck/lexicon.py.
  • The invented check asks a local Ollama model to select the supporting transcript span for each claim, then verifies the timestamp exists.
  • Writes findings.json, which the Next.js viewer reads to show note and transcript side by side; an optional events.jsonl records each run step for the viewer's replay console.

Key Decisions & Trade-offs

  • Deterministic checks and the model check are separate layers, and every finding carries a detector field, so a reader knows whether a rule or a model made the call.
  • The invented check is posed as span selection rather than entailment, so the model must point to evidence that can be verified.
  • Severity follows the model's own confidence: only a confident miss is marked unsafe, other model findings are review.
  • Ollama by default and no API keys, because a clinic cannot point a tool at real notes if it sends them to a hosted service.
  • findings.json is the contract between the CLI and the viewer, so others can build their own checker against it.
  • The exit code is non-zero on unsafe findings, with a --fail-on option, to make it usable as a CI gate.

Current Status

Alpha (0.1.0), MIT licensed. Install with pip install scribecheck and run scribecheck fixtures --model qwen2.5:14b; use --skip-model for the deterministic checks only. Four synthetic encounters are bundled, and deterministic tests run with python tests/test_checks.py. The viewer runs with npm install and npm run dev inside the viewer folder.

Roadmap

  • Replace the seed drug list of about 35 names with a real RxNorm dump.
  • Add attribution flips, such as a patient-reported symptom charted as clinician-observed.
  • Validate the checks with practising clinicians before the numbers are presented as clinical evidence.

What I'd Improve Next

  • The drug lexicon is a small seed list, so dropped-drug coverage is limited to the names it contains.
  • The invented check depends on the local model and can raise review-level false positives on terse note fragments; the checks have not been validated by clinicians.

Explore More