← back to work
solo project

Governed Clinical Copilot

Role: Sole engineerPython · PyTorch · sqlglot · LangGraph

A self-hostable natural-language→SQL analytics agent over de-identified clinical (MIMIC-IV) data — built governance-first, so it refuses what it shouldn't answer instead of guessing.

PythonPyTorchsqlglot (AST)LangGraphTransformersQLoRA / ORPO

Context

Clinicians and analysts want to ask questions of EHR data in plain English. But an LLM that writes and runs SQL over health data is genuinely dangerous: it can issue destructive statements, read protected-health-information (PHI) columns, return re-identifiable small cells, or — worst — answer confidently when it should say "I can't."

Problem

The hard part wasn't SQL accuracy — it was trustworthiness under adversarial input. The system had to enforce read-only access, block PHI, suppress small-cell results, and know when to abstain, all before a query ever touches the database.

Approach

Results & what I learned

Honest scope: the 0.873 is my own evaluation, not independently verified against the gated leaderboard; and the served inference path uses Hugging Face + bitsandbytes (a vLLM/AWQ path was planned, not shipped). The guardrail rigor, the diagnosed GRPO failure, and the self-caught scoring bug are the parts I stand behind fully.