What are we trying to do?
Extract the measurements clinicians write in their notes, reliably enough that researchers can build cohorts and run analyses on them, across more than a million records.
Many values that matter for sleep medicine research, such as the results of multiple sleep latency tests, live in narrative notes rather than structured fields. If they can be extracted faithfully, studies that would otherwise depend on manual chart review become possible at the scale of the whole record.
How is it done today, and what are the limits?
- Manual chart review is accurate, but slow and costly. It does not scale to 1.25M+ records.
- Keyword and rule-based search is fast, but brittle against the many ways clinicians phrase the same finding.
- Structured fields are easy to query, but often missing the values researchers need.
- General-purpose language models are flexible, but can invent values, and clinical text cannot be sent to outside services.
What is new, and why should it work?
Treat extraction as measurement: define each variable with clinicians, filter before extracting, run models where the data lives, and evaluate errors by type rather than by a single accuracy number.
- Clinician-defined variables. Research variables are agreed with clinicians and interdisciplinary researchers before any model runs, with evaluation protocols for reliability and validity.
- An upstream filter. A fine-tuned transformer classifier screens notes before extraction, which reduced downstream hallucination. On 5,486 annotated notes, it identified notes reporting multiple sleep latency test results with an F1 score of 0.900, against 0.895 for a bag-of-words baseline, and was preferred for its robustness to varied clinical language (SLEEP 2026 abstract).
- Open-weight models on internal hardware. Models of two sizes are served with vLLM, 4-bit quantization and pipeline parallelism across an 8-GPU cluster, so large models fit fixed hardware and records never leave VA systems.
- Error analysis by type. Evaluation tooling separates hallucination, omission and mismatch errors against 5,486 labeled examples, and model sizes are benchmarked on accuracy and cost.
Who cares, and what difference does it make?
Researchers get the variables they need at the scale of the whole record, without months of chart review.
- Clinician-researchers studying narcolepsy, hypersomnia and other sleep disorders in veterans can define and study cohorts that were previously impractical to assemble.
- VA leadership gets model choices grounded in measured accuracy and cost, rather than in model size alone.
- Program evaluation benefits from the same data infrastructure: a SQL database over the enterprise data warehouse, R dashboards for the Office of Rural Health telehealth evaluation, and Streamlit dashboards for stakeholders.
- Clinical studies can use measures that used to require chart review. A co-authored SLEEP 2026 abstract compared narcolepsy subtypes across 13,122 veterans, using mean sleep latency, sleep-onset REM periods and Epworth scores extracted from notes by an NLP pipeline with over 90% accuracy (abstract).
- The clinical NLP community gets peer-reviewed evidence: an IEEE AIxSET 2025 paper, two SLEEP 2026 late-breaking abstracts and a manuscript under review.
What could go wrong?
- Risk
- Mitigation
- Invented values enter the dataset and look like findings
- Upstream filtering, and hallucination tracked as its own error category
- Missed values quietly bias cohorts
- Omissions measured separately from other errors
- Clinical text cannot leave VA systems
- Open-weight models served on internal infrastructure
- Fixed compute limits model size
- 4-bit quantization and pipeline parallelism, plus a size-versus-cost benchmark
- A measure is extractable but not meaningful
- Variables defined with clinicians, and protocols for reliability and validity
What does it take?
No new hardware and no per-query fees: the cost is mainly people's time.
- Compute. An existing 8-GPU cluster, made sufficient by 4-bit quantization.
- Models. Open-weight, so there are no licensing or per-token costs.
- Expertise. Clinician and researcher time to define variables and label 5,486 evaluation examples.
- Data. 1.25M+ records queried with SQL from the enterprise data warehouse.
How long does it take?
| When | Milestone |
|---|---|
| Jan 2025 | Fellowship begins. Pipelines from the data warehouse to analysis-ready datasets. |
| 2025 | IEEE AIxSET 2025: ordering an LLM cascade to extract mean sleep latency from MSLT reports. |
| 2026 | SLEEP 2026: bag of words versus transformers for identifying MSLT reports, and a national cohort study of narcolepsy subtypes. |
| 2026 | Manuscript under review: LLM extraction of narcolepsy and hypersomnia metrics. |
| Ongoing | Model-size benchmarking, error analysis and stakeholder reporting. |
How do we know it is working?
Midterm checks
- Error rates by type on the labeled set
- Whether the upstream filter lowers hallucination downstream
- Whether deployment fits the cluster's memory and time budget
Final checks
- Agreement with clinician judgment (validity) and consistency across runs (reliability)
- Accuracy against cost for each model size
- Datasets used in peer-reviewed research
No patient data appears on this page.