Medical Chat
AI clinical assistant for healthcare professionals, by Chat Data
Built the medical RAG and citation system, LangGraph clinical workflows and model routing, safety and evaluation pipeline, and fine-tuned self-hosted models behind Medical Chat, Chat Data's AI clinical assistant.
Medical Chat: an AI clinical assistant for healthcare professionals
0.80–0.90
Recall@10, hybrid search + reranking
95% or more
Claims covered by a supported citation
2–4 s
p95 time to first token
95–98%
Red-flag sensitivity
Stack
Overview
Medical Chat is an AI clinical assistant made by Chat Data for healthcare professionals. It helps clinicians research medical questions, analyze patient cases and interpret labs, ECGs and chest X-rays, retrieving guidelines and research before it answers and linking every clinical statement to its supporting evidence.
The central idea: The LLM handles reasoning and language, while trusted medical systems remain the source of medical knowledge.
The problem
A physician investigating a patient case may need guidelines, research, patient history and lab results, and general-purpose AI assistants are not built for clinical accountability.
- Unsupported statements: general assistants can make claims that no source backs up.
- Invented or outdated references: they can cite papers that do not exist or rely on outdated knowledge.
- Missing patient context: they can overlook patient-specific factors such as allergies, renal function or pregnancy.
My role
I worked at Chat Data as an AI engineer on Medical Chat. I built the medical RAG and citation system, the clinical AI workflows with their model routing and ECG and chest X-ray analysis, the safety, evaluation and monitoring pipeline, and the self-hosted GPU profile for PHI-restricted tenants. I worked alongside the other Chat Data engineers, and contracted clinicians labeled data and reviewed model outputs.
What I built
Medical RAG and citations
- Hybrid retrieval in Amazon OpenSearch: BM25 plus dense vector search, fused with reciprocal rank fusion and reranked by a cross-encoder.
- Evidence ranking that weighs reranker relevance with source authority, freshness and patient context.
[E#]evidence identifiers that the model cites, plus claim-level citation verification on a different model; unsupported claims are removed or regenerated.
Clinical workflows and model routing
- LangGraph workflows for clinical chat, differential diagnosis, structured reports produced as validated JSON, and lab, document and image analysis.
- A model router with a default model per task, such as Claude Sonnet 4.5 for answers, and cross-provider fallback.
- An ECG and chest X-ray pipeline with QTc computed in code, schema-validated findings with confidence levels, and clinician review of each finding.
Safety, evaluation and monitoring
- A safety engine with deterministic medication checks, red-flag detection, Llama Guard 3 8B guardrails and Presidio PHI redaction before anything reaches logs or traces.
- Clinician golden sets, an LLM judge, slice analysis and release gates.
- OpenTelemetry and Arize Phoenix tracing, with quality and safety alerts.
Self-hosted model profile
- For PHI-restricted tenants, I QLoRA-tuned MedGemma 27B and served it on vLLM.
- Fine-tuned the MedCPT encoders and cross-encoder and served them on TEI.
Results
- Retrieval: recall@10 of 0.60–0.75 with vector search alone, and 0.80–0.90 with hybrid search and reranking.
- MedCPT fine-tuning: +3 to +10 points of recall@10 over the base MedCPT model.
- Citations after verification: 95% or more of clinical claims covered by a supported citation, citation precision of 90% or more, and unsupported claims under 2–3%.
- Latency: p95 time to first token of 2–4 s; full answers in 8–20 s.
- Self-hosted serving: MedGemma 27B (4-bit) on one L40S GPU (G6e) generates 30–45 tokens/s per stream, with a cold start of 2–4 minutes.
- Differential diagnosis: top-3 accuracy of 60–75% and top-5 accuracy of 70–85% on the clinician case sets.
- Red-flag sensitivity: 95–98%, and 100% on the cannot-miss set.
- Cost per answer: $0.04–0.08 with hosted models, and $0.005–0.02 on the self-hosted profile.
Tech stack
| Layer | Technologies |
|---|---|
| Frontend | Next.js, React, TypeScript, Tailwind CSS, shadcn/ui, TanStack Query, TipTap, SSE streaming |
| Backend | Python, FastAPI, Pydantic, SQLAlchemy, LangGraph, Amazon SQS |
| AI | Claude Sonnet 4.5, GPT-5 and GPT-5 mini, Gemini 2.5 Pro and Flash, MedGemma 27B (QLoRA, vLLM), MedCPT (TEI), Cohere Embed v3 and Rerank 3.5, Llama Guard 3 8B, Presidio |
| Data | PostgreSQL (Amazon RDS), Amazon OpenSearch, Redis, Amazon S3 |
| Healthcare integration | SMART on FHIR, FHIR R4, HL7v2 over MLLP, SNOMED CT, ICD-10, LOINC, RxNorm, pydicom |
| MLOps | Amazon SageMaker, Weights & Biases, Label Studio, Ragas, Arize Phoenix |
| Infrastructure | Amazon EKS with Karpenter, Helm, Terraform, GitHub Actions, Amazon Cognito, CloudFront, AWS WAF |
Related case studies


