Skip to content
All Projects
AIIn Progress

Ambient Clinical Copilot

Launched from inside the EHR, this copilot listens to the visit, drafts a structured progress note in seconds, and links every claim to the transcript or chart. An independent verifier removes unsupported statements, CDS Hooks surface guidance at order time, and nothing is written back until the clinician signs.

20265 months, ongoing
Every note claim linked to evidenceClinician sign-off before any write-back0.4% unsupported claims on synthetic gold set
Ambient Clinical Copilot

My Role

Architecture and engineering — designed the streaming pipeline, the claim verifier, the SMART on FHIR and CDS Hooks integrations, and the clinical evaluation gate.

Duration

5 months, ongoing

Year

2026

Tech Stack

Claude Opus 5.5Deepgram Nova-3 MedicalSMART on FHIR 2.2CDS Hooks 2.0LangGraph 1.2Pydantic AILiveKitDeepEvalPostgreSQL 18Next.js 16

Status

In Progress
Overview

Launched from inside the EHR, this copilot listens to the visit, drafts a structured progress note in seconds, and links every claim to the transcript or chart. An independent verifier removes unsupported statements, CDS Hooks surface guidance at order time, and nothing is written back until the clinician signs.

The Challenge

Clinicians spend hours a day on documentation, much of it after clinic. Ambient scribes help, but the evidence is mixed: a 2025 randomized trial in NEJM AI found that one of two scribes reduced time in notes while physicians reported occasional clinically significant inaccuracies, and a blinded study in Frontiers in Artificial Intelligence found hallucinations in 31% of ambient notes, against 20% of gold notes. A note that reads well but contains an unsupported statement is dangerous because it is easy to sign.

The Approach

I built a SMART on FHIR app that launches inside the EHR with patient context. Audio streams through Deepgram Nova-3 Medical for diarized transcription, then Claude Opus 5.5 drafts a structured note in which every sentence must cite the transcript or the chart. A separate verifier splits the draft into atomic claims and checks each against its evidence: unsupported claims are removed, and inferred ones are held for the clinician. Nothing reaches the record until the clinician signs, and orders go back only as drafts. Evaluation so far uses a synthetic gold set of 400 scripted encounters, not real patient visits.

Key Features
1

Evidence-Linked Notes

Every claim carries a citation to a transcript timestamp or a chart resource, so reviewing means checking a source in one click instead of re-listening to the visit.

2

Independent Claim Verifier

A second pass checks each atomic claim against its evidence, with no access to the drafting reasoning. Removed statements are shown to the reviewer rather than dropped silently.

3

CDS Hooks at Order Time

order-select and order-sign cards surface guidance using current labs, such as SGLT2 inhibitor initiation thresholds and sick-day counseling, with one-click draft orders.

4

Coding Suggestions With Guardrails

ICD-10-CM suggestions appear only when the note documents them. Hypertension with CKD becomes I12.9 rather than I10, while an unconfirmed neuropathy stays off the claim.

5

Safe FHIR Write-Back

On signing, a transaction Bundle files the DocumentReference, draft MedicationRequest and ServiceRequest, and a Provenance resource recording both the model and the attesting clinician.

Technical Decisions

Key technology choices and the reasoning behind each decision.

Deepgram Nova-3 Medical

AI / ML

Chose a medical speech model with real-time streaming because drug names and doses are where general models fail. Key terms can be supplied per visit from the patient's medication list.

Claude Opus 5.5

AI / ML

Selected for note drafting because the hard part is reasoning about what was and was not said. Structured outputs keep the note and its citations in one validated schema.

LangGraph 1.2

AI / ML

Durable checkpoints and interrupts match the flow of draft, verify, and wait for the clinician. A visit can pause for hours before sign-off without losing state.

SMART on FHIR 2.2 + CDS Hooks 2.0

Backend

Standards rather than vendor-specific APIs keep one integration across EHR sandboxes. Patient context comes from the launch, so the model can never choose which chart to read.

LiveKit

Infrastructure

WebRTC handles unreliable clinic Wi-Fi and reconnects better than raw WebSockets, and it provides echo cancellation and noise suppression in the browser.

DeepEval

Infrastructure

Custom claim-support and medication-accuracy metrics run as CI tests, so a failing specialty blocks a release in the same place engineers already look.

Architecture

Streaming documentation pipeline with independent verification and a human sign-off gate.

01

EHR Launch

SMART App Launch 2.2 provides patient context, user identity, and narrowly scoped tokens.

02

Audio Capture

Browser audio streams over LiveKit, encrypted in transit, and is deleted after sign-off.

03

Transcription

Deepgram Nova-3 Medical streams diarized text, with key terms drawn from the medication list.

04

Note Drafting

Claude Opus 5.5 produces a structured SOAP note with a citation on each sentence, using minimum-necessary chart context.

05

Verification

The note is split into atomic claims and each is checked against its evidence. Unsupported claims are removed, and inferred ones are held.

06

Sign and File

The clinician resolves open items and signs. A FHIR transaction files the note, draft orders, and Provenance.

Challenges & Learnings

Key technical challenges I faced and how I solved them.

Challenge 1

Averages Hid a Pediatric Dosing Failure

Problem

A release candidate passed every overall metric, but weight-based pediatric doses were losing their mg/kg basis in 4 of 40 gold-set encounters. Overall medication accuracy still read 99.0%.

Solution

Made release gating per specialty and added a dose-structure check that compares drug, dose, basis, route, and frequency field by field.

Outcome

The gate blocked that release before it shipped. Worst-specialty medication accuracy is now a hard limit, set at 98%.

Challenge 2

Plausible Details That Nobody Said

Problem

Early drafts sometimes added typical-sounding history, such as a family history that never came up. Readers skim past these because they look normal.

Solution

Required a citation on every sentence, moved verification to an independent pass, and treated uncited claims as removed unless the clinician restores them.

Outcome

Unsupported claims fell from 1.4% to 0.4% across releases on the 400-encounter gold set.

Challenge 3

Noise Changed Safety More Than Accuracy

Problem

Background noise barely moved word error rate, from 2.1% to 2.9%, but unsafe outputs doubled because the errors concentrated in drug names and numbers.

Solution

Added a noisy variant of every gold encounter, tracked unsafe outputs as a release metric, and added read-back confirmation for low-confidence medication terms.

Outcome

Noisy-room unsafe outputs are now gated at 1%, and currently measure 0.6% on the gold set.

NEXT

Interested in working with TwilightCore?

We build production systems like this for teams and founders who value quality engineering.