Spaces:
Sleeping
Sleeping
Commit History
-
0.5.4: End-to-end smoke test scriptβ
scripts/smoke_test.py runs against a live API, walks every gallery note through POST /api/code, checks: * S1 (faithfulness): every MEAT quote is a byte-exact substring of the input note. Any fabrication fails the script. * S2 (latency): p95 API latency against the 8s target. Also cross-checks /api/benchmark against the per-note pass. Prints a per-case table + latency rollup + a pass/fail report card. Exits non-zero on any invariant violation β suitable as a pre-push gate. Makefile: `make smoke` target. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>e8bfb8b -
Milestone 0.5.0: clinical UX pass (chart-query, RAF summary, filtered mentions, glossary)β
Pipeline - Chart-query generator: every HCCCandidate gets query_draft (markdown the coder pastes into their provider-query tool) when any MEAT category is insufficient. None when MEAT is complete. - CodingResult.filtered_mentions: expose every span the pipeline saw but did not attribute, with a FilterReason (negated / family_history / historical_non_chronic / hypothetical). Gives the coder a reassurance surface that the filter didn't overreach. - New helper functions: CodingResult.captured_raf / low_risk_raf / audit_exposure_raf for the RAF summary card. UI - RAFSummary hero card: three tiles (Submit as-is / After query / Audit exposure) with RAF sums + candidate counts. Externalizes the coder's mental model into a single-screen glance. - FilteredMentionsPanel: collapsible, groups dropped spans by reason, shows surface text + section kind + plain-English explanation per bucket. - RiskBadge: color-coded with lucide icons (CheckCircle2 / AlertTriangle / AlertOctagon β¦af68ac3 -
HF Space: add README frontmatter + token-safe push helpersβ
- README.md: add the HF Docker Space frontmatter block (title, colors, SDK, app_port, license) required for the Space to render correctly. - scripts/_hf_askpass.sh: GIT_ASKPASS helper that answers git credential prompts by reading .hf_access_token (gitignored). The token never lands in a command-line argument, a remote URL, or a config file. - scripts/push_to_hf.sh: wrapper around git push that wires the askpass helper, disables interactive prompts, and accepts --force for one-off overwrites. Refuses to run if the token file is missing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>23f3028 -
Milestone 0.4.0: narrative + polish (blog, demo script, keybinds, calibrator fit)β
Narrative - docs/BLOG_DRAFT.md β clinical-workflow framing first, ML second. Opens on RADV audits; pitches calibrated + auditable over SOTA F1. - docs/DEMO_SCRIPT.md β 75-second shot-by-shot demo video script with narration, UI actions, and recording hygiene notes. UI polish - ui/src/lib/useKeybinds.ts + App.tsx wiring: β/Ctrl + Enter codes the note; j / β and k / β navigate the HCC suspect list. Disabled while focus is in an editable control. - HCCList now shows a three-row animated pulse skeleton while loading, an informative empty-state explaining negation/family-history/historical filtering, and a pre-run state pointing at the keyboard shortcut. - Footer surfaces verifier_drops alongside latency β S1 is visible per run. - Header shows the keybinding cheatsheet on md+ screens. Calibrator - g_calibrator.default_calibrator() now loads data/models/calibrator.pkl if present (overridable via HCC_MEAT_CALIBRATOR_PATH). Identity fallback unchanged. - scripts/fit_calibratoβ¦6fc49c1 -
Milestone 0.3.0: coder-voiced README, benchmark button, NER feature flag, CMS fetcherβ
README - Opening rewritten in coder vocabulary (suspect list / capture / MEAT / RADV risk / hierarchy trumping). Targets the S4 30-second recruiter skim. Benchmark endpoint + UI - POST /api/benchmark re-runs every gallery item live and returns min/median/p95/max/mean ms + per-case timings. Surfaces the S2 target (8000 ms p95 on CPU free tier) explicitly. - MetricsTab now has a "Run gallery benchmark" button with a red/green p95 card and a collapsible per-case breakdown. NER backend feature flag - New TransformersNER wrapper around the HF token-classification pipeline with lazy import + label normalization onto SpanType. - default_ner() reads HCC_MEAT_NER_BACKEND (dictionary|transformers) and HCC_MEAT_NER_MODEL (default blaze999/Medical-NER). - test_ner_backend_selection.py asserts selector behavior without importing transformers when the env var is unset β keeps CI lean. CMS fetcher - scripts/fetch_cms_hcc_v28.py now has two subcommands: inspect β download the CMS β¦e43bca6 -
Milestone 0.2.0: metrics tabs, TF-IDF linker, 25-case fixture, Synthea scaffoldβ
UI - Add Metrics / Calibration / Subgroups / About tabs alongside the existing three-panel Coding view. - Wire a TabBar so switching tabs doesn't rerun the pipeline. API - New GET /api/metrics returning a snapshot computed against the regression fixture at startup. Shape is frozen for the UI contract. Pipeline - New TFIDFLinker β sklearn char-ngram TF-IDF over ICD-10 descriptions with an alias fast-path and exact-description shortcut. Now the default; the prior ExactMatchLinker stays available for lean runs. - Introduce a Linker Protocol in d_linker and drop the concrete dep on ExactMatchLinker from the orchestrator. Fixtures - Expand regression_suite.json from 10 β 25 cases: paroxysmal AF, unstable angina, hepatitis-C + cirrhosis trumping, PVD, COPD exacerbation, lowercase + typo'd notes, resolved acute, three-level kidney hierarchy, rare HCC-48, systolic-CHF specificity, pulmonary fibrosis, hypothetical workup, long multi-specialty prose, and an empty-note edge cβ¦cd5b31c -
Review pass: fix imports, broaden NER vocab, segmenter inline headersβ
- Segmenter now accepts inline content after a header (e.g., "HPI: 67yo..."). The previous regex required headers to be on their own line, which broke several fixture notes. - Expand DictionaryNER vocabulary so the Week-1 baseline recognizes "DM2", "diabetic polyneuropathy", "CKD stage 4 (severe)", "hemodialysis", "end stage renal disease", etc. Regex still word-boundary-bounded. - Add alias entries in ExactMatchLinker for hemodialysis, renal dialysis, and "dependence on renal dialysis" (all β Z99.2). Makes the dialysis-trumping fixture resolvable without the embedding linker. - Move fixture schema + loader from tests/fixtures/schema.py to eval_harness/fixtures.py (canonical location). Tests re-export from the old path for backwards compatibility. Eval CLI no longer depends on tests/ being on sys.path. - Add root conftest.py so pytest resolves app/eval_harness/tests regardless of invocation cwd. - Replace the `raise typer.Exit(1)` stub in scripts/fetch_cms_hcc_v28.pβ¦4855547 -
Initial scaffold: HCC-MEAT Coder v0.1.0β
End-to-end runnable pipeline with rule-based baselines in place of ML components, a FastAPI backend serving a React three-panel UI, and a 10-case regression suite guarding the invariants from AGENT_BRIEF.md Β§3 (faithfulness, negation/family-history filtering, hierarchy trumping, transparent risk). Deterministic components (real, tested): - E β HCC crosswalk + trumping over CMS-HCC v28 seed tables - H β over-coding (RADV) risk heuristic with named components + reasons - I β faithfulness verifier (substring guarantee + NLI hook) Baseline / swappable components: - A segmenter, B dictionary NER, C negation, D exact/alias linker, F rule-based MEAT extractor, G identity calibrator Infra: uv-driven pyproject, ruff + pytest + pre-commit, GH Actions CI for Python and UI, multi-stage Dockerfile for the HF Docker Space, typer CLIs for pipeline (`hcc-meat`) and evaluation (`hcc-meat-eval`). Reference data in data/reference/ uses PLACEHOLDER RAF weights; hydrate via scripts/fetch_cms_hcc_v28.β¦c6cfe5f