File size: 9,797 Bytes
8c20ecf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | ---
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.
|