MomDiary Clinical AI Lab

Research lab · Vietnam

MomDiary Clinical AI Lab

We build and evaluate AI systems for obstetrics and maternal–fetal medicine in Vietnam. Our software helps physicians find evidence in Vietnamese and English texts, teach residents, and review difficult cases. A physician signs off on every clinical decision.

  • Computer Science
  • AI / Machine Learning
  • Data Science & Informatics
  • Software, Computer & Electrical Engineering
266,593indexed passages from medical textbooks, guidelines and translated books
700source texts in Vietnamese and English, 100% embedded with BGE-M3
45,608figures extracted and indexed for retrieval
447automated tests across 70 suites guarding the pipelines

Counts taken from the lab's own systems on 11 November 2026

Research areas

Four fields, one clinical problem

Doctors in Vietnam work across Vietnamese protocols and English-language evidence, often under time pressure. Each line of work below attacks part of that problem.

Computer Science

Agent systems with a physician in the loop

  • A tool-using clinical agent ("An") that plans in a ReAct loop. Every tool carries a risk level: read, draft or approval.
  • Approval-level actions are only queued for a physician. The agent cannot execute them on its own.
  • A multidisciplinary-board simulator that runs specialist personas over one case; a named physician approves or rejects each result.
  • An event ledger that records every agent step and hand-off, so behaviour can be replayed and audited.

AI / Machine Learning

Cross-lingual retrieval and learning from feedback

  • Hybrid retrieval: BGE-M3 dense vectors plus SQLite FTS5 keyword search, fused by reciprocal rank fusion (k = 60). A Vietnamese question can find the matching passage in an English textbook.
  • An experience store: each run becomes an episode, lessons are merged and decay with a half-life, and physician feedback weighs 3× an automatic signal.
  • Generation safeguards: an attribution gate removes claims credited to an organisation when no retrieved passage supports them.

Data Science & Informatics

A bilingual obstetric knowledge base

  • Curating 700 sources: textbooks, international guidelines, Vietnamese protocols and Vietnamese translations of English books.
  • Data-quality metrics for Vietnamese OCR. Re-scanning one national protocol cut the vowel-less token rate from 11.51% to 1.64%.
  • A figure pipeline with a resolution gate (long side ≥ 600 px and ≥ 240,000 px) so low-quality thumbnails never reach teaching material.
  • Retrieval benchmarks with a blind held-out set, run without any LLM in the loop.

Software, Computer & Electrical Engineering

Production systems and signal pipelines

  • A physician web app on Cloudflare Pages Functions with D1 (SQLite at the edge), KV and Workers AI.
  • On-device processing on Apple Silicon: embedding inference on the GPU (Metal), Vietnamese OCR with Apple Vision.
  • A 24 kHz Vietnamese speech-synthesis pipeline for lecture video, with an acoustic quality gate on sample rate, peak level (dBFS) and duration.
  • A Python platform of 533 modules (about 175,000 lines) behind multi-stage test gates.

Systems

What we have built

Working software in daily use by the lab, not prototypes on slides.

Agent

An — clinical assistant agent

Answers clinical questions from the knowledge base, drafts case notes and teaching material, and consults the board simulator. Reachable through chat and a web dashboard.

  • ReAct
  • tool risk levels
  • experience store

Retrieval

Clinical knowledge index

266,593 passages and 45,608 figures from 700 sources, searchable in Vietnamese or English with a mean query time of 0.61 s.

  • BGE-M3
  • FTS5
  • RRF
  • SQLite

Translation

Minh — guideline translation

Translates international obstetric guidelines English → Vietnamese sentence by sentence, keeps only the original figures of each paper, and publishes to the physician app's library.

  • sentence alignment
  • glossary
  • figure gate

Education

Postgraduate teaching pipeline

Writes evidence-cited lecture monographs on a fixed 19-section framework with 10 board-style questions each, then scores every document with an automatic quality auditor.

  • long-form generation
  • citation check
  • DOCX / PDF / HTML

Decision support

Multidisciplinary board simulator

Runs a case past simulated specialists, collects their positions with a sanity checker and an anti-hallucination guard, and holds the report until a physician approves it.

  • multi-agent
  • human approval

Product

MomDiary apps

The physician app at app.momdiary.vn and the public site momdiary.vn, both served from Cloudflare's edge network.

  • Pages Functions
  • D1
  • Workers AI

Methods

From a scanned page to a reviewed answer

Every output passes through the same six stages. The last one is a person.

  1. IngestSourcesTextbooks, guidelines, protocols; PDF, EPUB and scans.
  2. ExtractOCR & parsingVietnamese-aware OCR, chunking, figure extraction.
  3. IndexHybrid indexDense BGE-M3 vectors and FTS5 keywords.
  4. ReasonAgentPlans, retrieves, drafts with cited passages.
  5. CheckSafety gatesAttribution, clinical sanity, drug safety.
  6. ReviewPhysicianApproves, corrects or rejects. Corrections feed back.

Evaluation

How we measure

We publish our own numbers, including the misses.

Retrieval recall, 40 clinical questions

Recall@330/40 · 75%
Recall@834/40 · 85%
Recall@1638/40 · 95%

25 development questions plus 15 held-out questions written before any results were seen; ground truth is a strict text match on the target passage. Run on 11 November 2026. Remaining misses include a CTG category III definition and the 3.5 mm nuchal translucency threshold, which rank below 16.

Quality gates in the pipeline

  • Attribution gateDrops guideline columns and claims that no retrieved passage supports.
  • Clinical sanityDeterministic rules, no LLM: catches impossible physiology, Doppler ratios and contradictory lab values.
  • PharmacovigilanceBlocks teratogenic drugs and dangerous interactions in pregnancy; rates lactation safety.
  • Figure qualityRejects images below 600 px or 240,000 px.
  • Document auditorScores structure, citation density and style of every lecture file.
  • Acoustic gateRejects speech audio with low sample rate, clipping or wrong length.

Principles

How we work

Physician in charge

Our systems are research and teaching tools, not medical devices. Any clinical output is reviewed by a physician before use.

Real sources only

Medical figures come from the original publication. We do not use generated images for anatomy or ultrasound.

Measure before claiming

A change counts as an improvement only when a benchmark shows it, and we report sample sizes alongside results.

People

Team

Dr. Pham Ngoc Ha

Lab lead · Physician (BS. Phạm Ngọc Hà)

Founder of MomDiary. Leads the clinical direction, system design and physician review of the lab's work.

MomDiary Medical Advisory Board

Clinical review (Ban Cố vấn Y khoa MomDiary)

Physicians who review teaching material and clinical content before publication.

Contact

Work with us

We welcome collaboration with clinicians, universities and engineers working on medical AI for Vietnamese and other low-resource languages.