Developing and evaluating a chatbot to support maternal health care

Smriti Jha, Vidhi Jain, Jianyu Xu, Grace Liu, Sowmya Ramesh, Jitender Nagpal, Gretchen Chapman, Benjamin Bellows, Siddhartha Goyal, Aarti Singh, Bryan WilderarXiv 2026

Here is a blog-style summary of the paper, tailored for a technically literate audience.

TL;DR

This paper presents a defense-in-depth, retrieval-augmented generation (RAG) chatbot designed to provide trustworthy maternal health information in low-resource, multilingual settings in India. By combining stage-aware safety triage, hybrid document retrieval, and strict guardrails, the system safely routes high-risk emergencies while answering routine queries. Crucially, the authors introduce a multi-layered evaluation workflow combining synthetic benchmarks, LLM-as-a-judge, and expert clinician validation to bridge the gap between AI prototypes and safe, real-world deployment.

What Problem Does This Paper Address?

Deploying large language models (LLMs) in high-stakes medical settings like maternal healthcare is notoriously difficult. In low-resource environments, user queries are often short, noisy, underspecified, and "code-mixed" (e.g., blending Hindi and English). Missing symptom context makes safe routing decisions incredibly hard.

Furthermore, base LLMs lack regional, context-specific medical grounding and are prone to hallucinations or overconfident, unsafe prescriptions. Because expert medical validation is scarce and expensive, evaluating these systems prior to deployment represents a major bottleneck. The authors tackle this "last-mile" challenge: transforming a plausible base model into a grounded, safe, and thoroughly vetted digital health assistant.

Methods

The authors developed a four-step pipeline structured around a "defense-in-depth" architecture:

  1. Stage & Context Extraction: A deterministic module identifies explicit timing cues (e.g., gestational week, postpartum status).
  2. Stage-Aware Safety Triage: Before hitting the LLM, a low-latency triage layer checks queries against explicit crisis indicators using deterministic regex rules and semantic symptom matching (via an all-MiniLM-L6-v2 encoder). High-risk queries bypass free-form generation entirely and receive expert-written templates.
  3. Hybrid Retrieval: For safe queries, the system uses Reciprocal Rank Fusion (RRF) to combine dense retrieval (multilingual-e5-large-instruct) and sparse retrieval (BM25) over a curated corpus of Indian maternal/newborn guidelines. Crucially, they employ a domain-specific biomedical reranker (MedCPT) to elevate passages containing clinical risk factors.
  4. Evidence-Conditioned Generation: GPT-4-Turbo generates a response strictly constrained to the retrieved context, enforced by prompt guardrails (e.g., "answer ONLY using the provided context", no specific drug dosages, and explicit instructions to say "I don't know" if evidence is insufficient).
Figure 1: Overview of the stage-aware RAG architecture. A pre-generation safety triage layer routes high-risk queries to expert-written templates, while lower-risk queries proceed through hybrid retrieval, clinical reranking, and evidence-grounded generation with guardrails.

Datasets

The system was developed and evaluated using three distinct datasets:

  • Real User Queries ($N=781$): Anonymized, real-world questions collected from an existing digital health platform in India, spanning English, Hindi, and Assamese, often featuring code-mixed and noisy text.
  • Labeled Safety Triage Benchmark ($N=150$): Expert-authored patient profiles paired with natural-language queries mapping to gold-standard severity labels (EMERGENCY_NOW, SAME_DAY, PASS).
  • Synthetic Multi-Evidence Retrieval Benchmark ($N=100$): A newly introduced benchmark designed to evaluate multi-hop queries where answers are fragmented across the corpus. Chunks are explicitly labeled as DIRECT (answer-bearing), RELATED, or IRRELEVANT.

Key Insights and Ideas

  • Symptoms are Context-Dependent: Triage must be stage-aware. As shown in the authors' routing policy, a severe headache with visual changes is a critical emergency during pregnancy (indicating preeclampsia) but is classified as lower urgency postpartum.
Illustrative examples from the stage-aware safety triage policy
  • The Reranker Trade-off: While generic cross-encoders perform better on standard semantic retrieval benchmarks, domain-specific rerankers (MedCPT) excel at elevating clinical risk factors and danger signs, leading to safer downstream generations preferred by medical judges.
  • Contextualizing the Judge: Using an LLM-as-a-judge to evaluate medical accuracy fails if the judge relies on its own pre-trained weights. Providing the judge with the retrieved context chunks and prompting it to evaluate claim support drastically improved its alignment with human experts (achieving 81% closeness on correctness).

Key Results

The evaluation demonstrated that combining safety triage with RAG yields massive safety gains without degrading response quality:

  • Triage Performance: The triage layer achieved an 86.7% emergency recall and 89.7% precision on the safety benchmark.
  • End-to-End Quality: According to the LLM-as-judge evaluation ($N=781$), the full RAG + Safety Triage pipeline achieved the best (lowest) score for clinical correctness ($1.39$) and significantly reduced "spillage"—the inclusion of unnecessary medical info outside the query's scope ($1.03$).
Table 6: LLM-judged end-to-end response quality on 781 real user queries (lower is better), comparing generator-only vs. retrieval- augmented variants with/without safety triage.
  • Expert Validation: On real-world queries where the system triggered a template response, expert clinicians verified that the system achieved 100% precision on emergency escalations.

Limitations and Future Work

  • Template Localization: Currently, crisis templates are authored in English. When a user asks a question in Hindi or Assamese and triggers an emergency, the system responds in English, causing a language mismatch. Localizing these templates is a priority for deployment.
  • Handling Underspecification: In a few cases, the system provided reassurance by implicitly assuming missing information (e.g., assuming gestational age). Future work will focus on improving the model's ability to actively recognize missing information and ask clarifying questions rather than proceeding with generic advice.

Summary updated

BibTeX
@misc{jha2026developing,
  author = {Smriti Jha and Vidhi Jain and Jianyu Xu and Grace Liu and Sowmya Ramesh and Jitender Nagpal and Gretchen Chapman and Benjamin Bellows and Siddhartha Goyal and Aarti Singh and Bryan Wilder},
  title = {{Developing and evaluating a chatbot to support maternal health care}},
  year = {2026},
  eprint = {2603.13168},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.13168},
}
Figure