Skip to content
Ali Zarreh
Live demo Healthcare

Cohort Risk & Review Lab

Patient risk stratification that is fair by measurement, not by assumption.

A calibrated risk model decides who is flagged, fairness is audited for every subgroup, an AI agent assembles the evidence, and a clinician makes every enrolment decision. It also reproduces how training on cost instead of illness burden skews who gets care.

flagged patients in the review queue
19,409
enrolment gap from the label-choice experiment
5.7 pts
subgroup axes audited with confidence intervals
4
Cohort Risk & Review Lab home page showing the four-step flow from risk model to fairness audit to AI evidence agent to clinician decision

Why it exists

A care-management team can only call so many patients. Deciding who to call first is a ranking problem, and the most dangerous failure is a model that looks accurate on average while quietly under-serving one group.

Two things go wrong in practice. First, a score is often trained on a convenient label such as future cost when the real goal is future need. Groups that face barriers to care generate less cost for the same illness, so they are ranked as lower risk — the label-choice failure documented by Obermeyer et al. (Science, 2019). Second, a single overall accuracy figure hides the groups where the model performs badly.

The goal was a pipeline where both failures are measured and visible, and where no automated component can enrol a patient on its own.

How it works

  1. 01 Input Patient record
  2. 02 Model / AI Calibrated risk model never sees race
  3. 03 Check Per-subgroup fairness audit age, sex, race, insurance
  4. 04 Model / AI Evidence brief read-only tools, cannot change the score
  5. 05 Human Clinician decides enrol, decline or defer
In order · Model / AI Independent check Human

Each step has a clear owner:

  • A calibrated model scores every patient. A statistical model — not a chatbot — estimates each patient’s chance of a high illness burden.
  • Fairness is audited per group. Calibration and true-positive-rate parity are reported across age, sex, race and insurance strata with confidence intervals. Strata with too few patients show “insufficient data” instead of a misleading number.
  • An AI agent assembles the evidence. For each flagged patient it gathers encounters, labs and care gaps into a short brief: drivers, corroborating evidence and what is missing. It cannot change the score or recommend enrolment.
  • A clinician decides. Nothing happens to a patient without that decision.

The label-choice experiment

The most instructive part of the app is a single interactive artifact: two otherwise identical models, one trained to predict cost and one trained to predict illness burden. On this synthetic cohort, which has a deliberately injected access gap, the cost-trained model enrols Black patients at a lower rate — a 5.7 percentage-point gap between the two labels. It demonstrates the mechanism on controlled data; it is not a finding about any real health system.

Results and honest limits

  • Gated in CI: a validation harness fits both models on a frozen, race-stratified sample of the generated cohort and requires AUROC and calibration floors, correct small-sample handling, and that the label-choice gap never silently regresses to zero.
  • Scenario tests: four hand-authored patients exercise the care-gap tools — including one with no recorded history, where every evidence category must be reported as missing.
  • Full-stack delivery: a review queue of 19,409 flagged patients, case pages, the fairness audit and the label-choice chart, served by a persistent API and a Next.js interface covered by Playwright browser tests.

Engineering decisions

  • Model and agent are separated by contract. The risk pipeline — features, calibration, thresholds, fairness audit — may not import any LLM framework, and an import-linter rule enforces it in CI.
  • Typed tools, not text-to-SQL. The agent can only call a fixed set of read-only evidence tools, so its reach into patient data is bounded and testable.
  • Human review is a real graph interrupt. The case flow suspends at the decision step and resumes through the API once a clinician decides, with a streaming trace of each step.
  • No fabricated numbers. Below the minimum sample size, the audit reports a subgroup as missing rather than computing a statistic from a handful of patients.

Who it’s for

For health systems and payers, it shows how to put a risk model, a fairness audit and a human reviewer into one auditable workflow. For teams evaluating AI in regulated settings, it shows how to keep an LLM useful while keeping it out of the decision path.

All case studies
Credit Decisioning review page showing the model's reasons and the eight notice-verification checks
Live demo Finance

Credit Decisioning

A calibrated credit model, notices written by code from a reviewed template, an independent eight-check verifier proven by mutation testing, and a human who makes the call. A read-only AI analyst explains cases — and code checks every number it states.

  • Evaluation & guardrails
  • Fairness & explainability
  • Machine learning
Clinical Care Navigator home page with the four-step guardrail flow: pre-flight screen, record lookup, post-flight check, and publish, hold or replace
Live demo Healthcare

Clinical Care Navigator

An assistant that explains a patient's own record, with independent safety checks before and after the AI. Dosing questions are refused, emergencies get urgent guidance, and answers that conflict with the record — such as a critical lab value — are overridden and sent to a clinician.

  • Evaluation & guardrails
  • Agentic AI
  • RAG & retrieval
RxFlow Pharmacy Assistant chat interface with the current patient, insurance and medication summary in the sidebar
Live demo Healthcare

RxFlow Pharmacy Assistant

A conversational prescription-refill assistant built on a 10-state workflow and a LangChain agent with 16+ tools. Controlled substances, expired prescriptions and unknown medications are routed to a doctor or pharmacist instead of being handled by the AI.

  • Agentic AI
  • Evaluation & guardrails

Open to consulting, advisory roles and select projects.

Building AI that has to be right?

I help teams design systems with verifiers, guardrails and human review built in from the start — not bolted on after the demo.

Search zarreh.ai