MaternaQA-es is a public Spanish-language question-and-answer dataset purpose-built for clinical natural language processing research in the maternal health domain. Covering pregnancy, childbirth, postpartum recovery, and perinatal care, it consists of 5,727 synthetic Q&A pairs derived from 63 curated clinical PDFs — including clinical practice guidelines, care protocols, academic textbooks, and scientific articles in Spanish. Every pair is traceable to its source document, page range, and chunk, making the dataset equally suited to NLP researchers benchmarking language models, machine learning practitioners fine-tuning domain-specific assistants, and clinical AI developers building and evaluating retrieval-augmented generation (RAG) systems for Spanish-speaking communities.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/NicolasHoyosDevss/MaternaQA-es/llms.txt
Use this file to discover all available pages before exploring further.
What MaternaQA-es provides
Q&A Dataset
5,727 synthetic question-answer pairs in Spanish, split into train (5,093), validation (306), and test (328) sets. Every pair carries full traceability metadata linking it back to its source PDF, pages, and text chunk.
LM Corpus
2,223 audited clinical text chunks derived from 63 obstetric PDFs across 5,176 clean pages. Each chunk includes topic annotations, clinical score, token estimate, and document-level split assignment to prevent data leakage.
Fine-tuning Scripts
QLoRA training scripts using TRL and PEFT, ready to fine-tune both Gemma 4 E2B and MedGemma 1.5 4B on the
sft_grounded or sft_closed_book dataset variants. Includes smoke-test and full training commands.Reproducible Pipeline
An 8-step documented pipeline covering source curation, PDF extraction, text cleaning, chunking, topic enrichment, synthetic Q&A generation, quality control with Ragas, and publication-ready export.
Dataset at a glance
| Split | Q&A Pairs | Source Chunks | Source PDFs |
|---|---|---|---|
| Train | 5,093 | 1,744 | 52 |
| Validation | 306 | 101 | 2 |
| Test | 328 | 108 | 3 |
| Total | 5,727 | 1,953 | 57 |
Clinical topic coverage
The dataset annotates each chunk and Q&A pair with one or more of 18 clinical topics drawn directly from the source literature:prenatal_carepostpartumpreterm_laborlabor_inductionvaginal_birthcesareanhemorrhagepreeclampsiadiabetes_gestationalinfectionfetal_monitoringnewborn_careultrasoundgeneticscontraceptioninfertilitymenopausegynecologic_oncology
topics field, enabling stratified sampling, topic-level evaluation, and targeted dataset subsets for specialized fine-tuning.
Question types
MaternaQA-es contains questions across six cognitive types to ensure broad coverage of clinical reasoning complexity, from direct fact recall to open-ended hypothetical reasoning:| Type | Intent |
|---|---|
factual | Retrieve specific clinical information from the source material. |
definicion | Explain a concept, condition, or clinical procedure. |
comparacion | Differentiate between clinical entities or management decisions. |
razonamiento | Justify causal relationships, risks, or evidence-based recommendations. |
aplicacion | Apply domain knowledge to a described clinical situation. |
hipotetico | Explore conditional scenarios or case variants. |
Ethical considerations
Where to go next
Quickstart
Install dependencies, load a dataset split, and run a QLoRA fine-tuning smoke test in under 10 minutes.
Dataset Overview
Explore the dataset schema, field descriptions, metadata fields, and all three publication variants in detail.
Pipeline Overview
Walk through the full 8-step reproducible construction pipeline from raw PDFs to publication-ready Q&A pairs.
