CMU Builds a Multilingual Pregnancy Chatbot That Triages Emergencies on WhatsApp
A CMU-led team built a WhatsApp maternal health assistant for India that catches 86.7% of emergencies through stage-aware triage and evidence-grounded generation.
ProTakeaways
- CMU, Nivi, and Indian health partners built a WhatsApp maternal health chatbot for English, Hindi, and Assamese users. Paper
- Four-stage pipeline: stage extraction, deterministic triage, hybrid BM25+E5 retrieval with MedCPT reranking, and GPT-4-Turbo generation.
- Triage layer achieves 86.7% emergency recall and 89.7% precision on 150 clinician-authored test queries.
- Synthetic multi-evidence retrieval benchmark labels chunks as DIRECT, RELATED, or IRRELEVANT to measure evidence sufficiency.
- Adding safety triage to RAG improves grounding scores from 2.48 to 1.89 on 781 real user queries.
- LLM judge alignment with experts jumped once the judge received retrieved context to assess claim support.
Building a medical chatbot that works in a clinic in the US is hard. Building one that works over WhatsApp for pregnant women across rural India, in three languages, with short and often ambiguous questions, is a different problem entirely. A team from Carnegie Mellon, health-tech company Nivi, the Population Council Institute, and the Sitaram Bhartia hospital just published a paper describing how they built and evaluated exactly that system before a live pilot.
The result is less about a novel model and more about a defense-in-depth recipe: a stage-aware triage layer, hybrid retrieval over curated Indian maternal guidelines, and an evaluation workflow that treats synthetic benchmarks, LLM judges, and clinicians as complementary signals rather than substitutes.
Why maternal health chatbots break in the wild
The company operates a WhatsApp based platform which delivers timely health information about each week of pregnancy to users in English, Hindi, and Assamese, onboarding roughly 1,500 to 3,000 users every month. The catch is that real user questions look nothing like the clean prompts in medical QA benchmarks. Queries are often short, underspecified, and code-mixed, and may reflect uncertainty about symptom severity, gestational timing, or what constitutes an emergency.
That creates two intertwined risks. A base LLM might confidently answer a query that actually describes preeclampsia. Or it might over-escalate and tell a user with mild back pain to rush to the ER, burning trust and clinic capacity. Unsafe outcomes frequently arise not from incorrect medical facts, but from selecting an inappropriate response mode under uncertainty.
A four-stage pipeline with guardrails at every step
The team uses GPT-4-Turbo as the generator, with early prototyping showing open instruction-tuned models were weaker on multilingual robustness. The pipeline runs four steps on each query:
- Stage extraction. A deterministic regex-based extractor identifies pregnancy, postpartum, or newborn context, plus gestational week.
- Stage-aware triage. A pre-RAG router decides whether to return an expert-written template (emergency referral, crisis hotline) or pass through.
- Hybrid retrieval. Dense multilingual E5 embeddings plus BM25, fused with Reciprocal Rank Fusion, then reranked with MedCPT, a biomedical cross-encoder.
- Evidence-grounded generation. The model answers conditioned on retrieved guideline chunks, with prompts forbidding brand-name prescriptions, gender predictions, and speculation beyond the evidence.

The triage layer is deliberately not an LLM call. It combines regex triggers for explicit crisis language (bleeding, seizures, suicidality, domestic violence) with a lightweight MiniLM sentence encoder that matches paraphrased or colloquial descriptions against 22 canonical emergency symptoms. Thresholds and severity mappings are stage-conditioned. Severity thresholds are stage-dependent: fever interpretation differs for neonates versus pregnant adults; bleeding varies by gestational age and postpartum window.
The numbers that matter
On a 150-query labeled triage benchmark authored by clinical partners, the routing layer hits 86.7% emergency recall and 89.7% precision for classifying any emergency. Digging into the breakdown reveals a useful pattern: recall is 95.6% for EMERGENCY_NOW versus 77.8% for SAME_DAY, and 83.3% of missed emergencies are SAME_DAY queries. In other words, the system rarely misses acute crises; the leakage happens on ambiguous same-day urgent cases that then get a second escalation check during generation.
For retrieval, the team built a synthetic multi-evidence benchmark of 100 questions where each chunk is labeled DIRECT, RELATED, or IRRELEVANT. Hybrid retrieval clearly beats sparse-only and dense-only, but the more interesting finding is a tension between benchmarks:
- A generic MiniLM cross-encoder wins on the synthetic ranking metrics.
- MedCPT, a biomedical reranker, produces answers that LLM judges and clinicians prefer.
The reason: MedCPT tends to elevate passages containing danger signs and escalation language, even when phrasing diverges from the query. Optimizing for retrieval accuracy alone would have picked the wrong component.
Evaluation as the actual contribution
The methodological punch of the paper is the layered evaluation strategy. Rather than asking whether LLM-as-judge scores can replace clinicians, the team treats them as complements with different failure modes. Early judge iterations achieved only 68.3% expert agreement due to two failure modes: penalizing uncertainty ("I don't know") while rewarding fluent but unsupported claims, and flagging India-specific guidelines as incorrect. Feeding retrieved context to the judge and prompting it to assess claim support against that evidence, rather than its own knowledge, fixed the alignment issue.
End-to-end results on 781 real user queries show that adding safety triage on top of RAG improves grounding substantially (2.48 to 1.89), cuts unnecessary medical spillage, and increases willingness to say "I don't know" under uncertainty. The one regression: language match drops for non-English queries because emergency templates are currently authored in English, a fix the team flagged for deployment.
What is useful, what is missing
For anyone building high-stakes chatbots in domains where you cannot fine-tune on labeled data, the useful takeaways are concrete:
- Deterministic pre-RAG routing for safety-critical modes gives interpretability and low latency without an LLM call.
- Retrieval benchmarks should measure evidence sufficiency (DIRECT vs. RELATED), not just topical similarity.
- Domain-specific rerankers can beat generic ones on downstream quality even when they lose on IR metrics.
- LLM judges need retrieved evidence in-context to avoid penalizing localized guidelines.
The paper is candid about limits. Completeness scores are actually higher for the naive no-RAG baseline, because unconstrained generation produces smoother, more expansive answers. Same-day urgent cases are the weakest point of triage. And the entire evaluation is pre-deployment on historical questions, meaning live users may ask entirely different things once the pilot launches on WhatsApp. Code and models are not released in the paper, though the appendices include pseudocode, hyperparameters, and prompt schemas detailed enough to reproduce the architecture.