| --- |
| pretty_name: MamaRetrieval |
| language: |
| - en |
| license: other |
| license_name: mamaretrieval-research-only-v1 |
| license_link: LICENSE |
| task_categories: |
| - text-retrieval |
| - question-answering |
| tags: |
| - medical |
| - clinical-guidelines |
| - midwifery |
| - obstetrics |
| - retrieval-benchmark |
| - evaluation |
| - llm-as-judge |
| - rag |
| size_categories: |
| - 1K<n<10K |
| configs: |
| - config_name: queries |
| data_files: |
| - split: test |
| path: "data/queries.parquet" |
| - config_name: rankings |
| data_files: |
| - split: test |
| path: "data/rankings.parquet" |
| - config_name: judgments |
| data_files: |
| - split: test |
| path: "data/judgments.parquet" |
| - config_name: chunks |
| data_files: |
| - split: test |
| path: "data/chunks.parquet" |
| - config_name: judgments_with_reasoning |
| data_files: |
| - split: test |
| path: "audit/judgments_with_reasoning.parquet" |
| --- |
| |
| # MamaRetrieval — v0.1.0 |
|
|
| A retrieval evaluation benchmark for medical RAG systems serving midwives and |
| doctors. 3,185 clinical queries on midwifery / OBGYN topics, evaluated against |
| the top-3 results of 6 retrievers, with per `(query, chunk)` pair labels graded |
| by an LLM judge under a four-dimension rubric. |
|
|
| This release is the **Tier 2** split (top-3 union of 6 retrievers, 36,418 |
| labelled `(q, c)` pairs). The Tier 3 split (top-20 union) will land as v0.2.0. |
|
|
| ## Quick start |
|
|
| ```python |
| from datasets import load_dataset |
| |
| queries = load_dataset("nmrenyi/mamaretrieval", "queries", split="test") |
| rankings = load_dataset("nmrenyi/mamaretrieval", "rankings", split="test") |
| judgments = load_dataset("nmrenyi/mamaretrieval", "judgments", split="test") |
| chunks = load_dataset("nmrenyi/mamaretrieval", "chunks", split="test") |
| |
| # Optional — the same judgments + the judge's per-row reasoning trace (~117 MB) |
| judgments_full = load_dataset("nmrenyi/mamaretrieval", |
| "judgments_with_reasoning", split="test") |
| ``` |
|
|
| ## Configs |
|
|
| | Config | Rows | Columns | What it is | |
| |---|---:|---|---| |
| | `queries` | 3,185 | `query_id`, `query_text`, `seed_chunk_id` | The benchmark queries, each generated by an LLM from a single chunk of the corpus. | |
| | `rankings` | 57,330 | `query_id`, `retriever`, `rank`, `chunk_id`, `score` | For every query × retriever combination, the top-3 `chunk_id`s with the retriever's similarity score. 6 retrievers × 3,185 queries × 3 = 57,330. | |
| | `judgments` | 36,418 | `query_id`, `chunk_id`, `d1_topic`, `d2_meaningful`, `d3_actionable`, `d4_density`, `score` | One label per unique `(query, chunk)` pair in the pooled top-3 union. `score = d1 × (d2 + d3 + d4) ∈ [0..6]`. | |
| | `judgments_with_reasoning` | 36,418 | (same as `judgments`) + `thinking` | The same labels with the judge model's reasoning trace per row. Ships in `audit/` because it's ~117 MB and not needed to use the benchmark. | |
| | `chunks` | 17,827 | `chunk_id`, `text` | The chunk text for every `chunk_id` referenced by `queries.seed_chunk_id` or any retriever's top-3 result. Drawn from the producer corpus (see Provenance). | |
|
|
| ### Schema notes |
|
|
| - **`chunk_id`** is the 16-character hexadecimal identifier from the |
| producer corpus. Every `chunk_id` that appears in `rankings`, `judgments`, |
| `judgments_with_reasoning`, or `queries.seed_chunk_id` is guaranteed to be |
| resolvable in `chunks`. |
| - **`score`** in `judgments` is computed downstream from the four dimensions |
| via `score = d1 × (d2 + d3 + d4)`. The judge emits only `d1..d4`. |
| - **`seed_chunk_id`** records which chunk an LLM was given when it |
| synthesised the query. It's provenance, **not** a gold label — seed |
| chunks may not appear in any retriever's top-3, and when they do they |
| are not always the highest-rated chunk for that query. |
|
|
| ## Rubric |
|
|
| The judge scores each `(query, chunk)` pair on four dimensions: |
|
|
| - **D1 — Topic** (bool): does the chunk address the same clinical problem as |
| the query (same condition, intervention, *and* clinical-timing context)? |
| If `D1 = false`, `D2 = D3 = D4 = 0` automatically. |
| - **D2 — Meaningful clinical content** (0–2): how rich is the chunk's |
| clinical content, independent of whether it specifically answers the query? |
| - **D3 — Actionable guidance** (0–2): how specific is the actionable |
| guidance — vague advice (0), general direction (1), exact |
| doses/thresholds/steps (2)? |
| - **D4 — Density** (0–2): what fraction of the chunk is directly useful for |
| answering *this specific* query? |
|
|
| `score = d1 × (d2 + d3 + d4) ∈ [0..6]`. |
|
|
| The full prompt — including four worked examples that anchor the |
| calibration — is shipped verbatim at |
| [`audit/judge_relevance_prompt.txt`](audit/judge_relevance_prompt.txt). Its |
| `prompt_hash` is recorded in [`manifest.json`](manifest.json). |
|
|
| ## Retrievers |
|
|
| | `name` | `model` | |
| |---|---| |
| | `bm25` | BM25 (lexical baseline) | |
| | `medcpt` | `ncbi/MedCPT` (Query + Article encoders) | |
| | `octen` | `Octen/Octen-Embedding-8B` | |
| | `voyage` | `voyage-4-large` | |
| | `lateon` | `lightonai/GTE-ModernColBERT-v1` (late-interaction ColBERT) | |
| | `gecko` | `gecko-1024-quant-v0.2.0` (on-device TFLite, deployed retriever) | |
|
|
| All retrievers were run on the producer corpus (see Provenance) and their |
| top-20 results stored. This release exposes the **top-3** of each — the |
| deployment-honest depth for the RAG system this benchmark was built for. |
|
|
| ## How the dataset was made |
|
|
| 1. **Query generation.** For each clinically-relevant chunk in the producer |
| corpus, an LLM (`Qwen/Qwen3.6-27B-FP8`) was prompted to produce one |
| ≤20-word clinical question the chunk could answer. Chunks judged |
| non-clinical (e.g. course outlines, references, learning objectives) |
| were skipped. The full prompt is shipped at |
| [`audit/query_generation_prompt.txt`](audit/query_generation_prompt.txt). |
| 2. **Retrieval.** Each query was run against the producer corpus by every |
| retriever. Top-20 candidates per retriever were stored. |
| 3. **Pooling.** For each query, the union of every retriever's top-3 was |
| deduped (~11.4 unique chunks per query at this scale). |
| 4. **Judging.** Every `(query, chunk)` pair in the pool was scored by |
| `Qwen/Qwen3.5-397B-A17B-FP8` against the four-dimension rubric. The |
| judge's reasoning was captured separately and is shipped in |
| `judgments_with_reasoning`. |
|
|
| Validation: the judge model was calibrated against Claude Opus 4.7 |
| reference labels on a 62-pair pilot, with 95% threshold agreement at score ≥ |
| 3 and 85% at score ≥ 5. |
|
|
| ## Provenance |
|
|
| - **Producer corpus**: `rag-bundle-v0.2.0`, produced at commit |
| [`a1abe003`](https://github.com/nmrenyi/mamai-medical-guidelines/tree/a1abe003cce742b46954375d17abb28a3e27110f) |
| of [`nmrenyi/mamai-medical-guidelines`](https://github.com/nmrenyi/mamai-medical-guidelines). |
| The 63,650-chunk corpus the retrievers were run against. Built from a mix |
| of WHO guidelines, Tanzania / Zanzibar MOH documents, and a small set of |
| midwifery references. |
| - **Versioning**: `v0.1.0` = Tier 2 (top-3 union). `v0.2.0` will add Tier 3 |
| (top-20 union) on the same query set when judging finishes. |
| - **Audit trail**: [`manifest.json`](manifest.json) pins exact judge and |
| generator model IDs, prompt hashes, and schema versions. |
|
|
| ## License — **Research use only** |
|
|
| This dataset is released for **non-commercial academic research and |
| retrieval-evaluation benchmarking only**. By downloading or using it, you |
| agree to all of the following: |
|
|
| **Permitted** |
|
|
| - Academic research, including publication of aggregate metrics, qualitative |
| analysis, ablations, and methodology comparisons. |
| - Use as an *evaluation* benchmark for retrieval systems. |
| - Re-running the rubric or running new judges against the included |
| `(query, chunk)` pairs for methodology research. |
|
|
| **Not permitted without explicit written permission** |
|
|
| - Any commercial use, including evaluation as part of internal product |
| decisions at for-profit organisations. |
| - Use of the chunk text as **training data** for any model — generative, |
| embedding, retrieval, or otherwise. |
| - Redistribution of the chunk text, in whole or in part, outside the form |
| shipped here (i.e. do not extract `chunks.parquet`, repackage, mirror, or |
| re-host the chunk content). |
| - Production deployment of any system whose retrieval or judging behaviour |
| has been tuned on this data. |
| - Clinical use of the chunk text. **None of the chunk content has been |
| reviewed for clinical accuracy in the form presented here**; do not surface |
| it to patients or clinicians. |
|
|
| Full terms — including upstream-licensing constraints, attribution, and |
| warranty disclaimers — are in [LICENSE](LICENSE). |
|
|
| ## Citation |
|
|
| Ren, Yi. *MamaRetrieval* v0.1.0. 2026. <https://huggingface.co/datasets/nmrenyi/mamaretrieval> |
|
|
| ## Limitations |
|
|
| - **Scope**: midwifery / OBGYN / neonatal care, framed for guidelines deployed |
| in Zanzibar. Performance numbers do not transfer cleanly to general |
| medical retrieval. |
| - **Depth-3 ceiling**: ~25% of queries have no `score ≥ 5` chunk in any |
| retriever's top-3, even from the strongest retriever. This is an inherent |
| depth-3 pool limit, not a retriever failure. |
| - **Single relevance judge**: every `(query, chunk)` relevance label in |
| this dataset is produced by one LLM (`Qwen/Qwen3.5-397B-A17B-FP8`) under |
| the four-dimension rubric. That judge was calibrated against Claude Opus |
| 4.7 on a 62-pair pilot — 95% threshold agreement at score ≥ 3, 85% at |
| ≥ 5 — but that's a small LLM-vs-LLM sanity check, not a human-annotated |
| gold standard. Practical consequences: retriever-vs-retriever rankings |
| tend to be stable across reasonable relevance judges, but absolute |
| score distributions and per-row labels will shift if you re-grade the |
| same `(query, chunk)` pairs with a different judge. Treat each label as |
| one judge's calibrated opinion, not ground truth. |
|
|