MamaCare was built in safety-first layers so accuracy and trust could be improved step by step. The guiding principle: in maternal health, a warm answer must still be safe, grounded, and able to escalate. Retrieval and safety are kept deliberately separate so each can be reviewed on its own.
KnowledgeCard JSON — structured cards with a title, trimester, topic tags, common mother-style questions, a plain-language answer, "when to seek care" guidance, and danger signs. Curated cards prevent the assistant from answering mothers with raw report fragments or invented detail.sentence-transformers/all-MiniLM-L6-v2 and retrieves the nearest cards from a persistent ChromaDB index. Semantic retrieval handles paraphrased and natural phrasing; lexical matching protects the critical questions. Running locally keeps the prototype usable without an external API.A single model that both retrieves and judges safety is hard to audit and easy to jailbreak. By making safety a deterministic, reviewable rule layer that sits in front of retrieval, MamaCare can be checked line-by-line with safety and clinical stakeholders, and emergencies are handled the same way every time regardless of phrasing. This is the design choice that makes the assistant appropriate for a sensitive domain.