Skip to main content

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.

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.

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

SplitQ&A PairsSource ChunksSource PDFs
Train5,0931,74452
Validation3061012
Test3281083
Total5,7271,95357
Splits are assigned at the document level, so no PDF contributes chunks to more than one split. This design eliminates cross-split contamination and ensures that evaluation metrics reflect true out-of-distribution generalization.

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_care
  • postpartum
  • preterm_labor
  • labor_induction
  • vaginal_birth
  • cesarean
  • hemorrhage
  • preeclampsia
  • diabetes_gestational
  • infection
  • fetal_monitoring
  • newborn_care
  • ultrasound
  • genetics
  • contraception
  • infertility
  • menopause
  • gynecologic_oncology
Topic annotations are stored in each record’s 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:
TypeIntent
factualRetrieve specific clinical information from the source material.
definicionExplain a concept, condition, or clinical procedure.
comparacionDifferentiate between clinical entities or management decisions.
razonamientoJustify causal relationships, risks, or evidence-based recommendations.
aplicacionApply domain knowledge to a described clinical situation.
hipoteticoExplore conditional scenarios or case variants.

Ethical considerations

MaternaQA-es is a research resource, not a clinical decision-making tool. All question-answer pairs are synthetically generated from clinical documents and must be interpreted as training and evaluation data — not as direct medical recommendations or validated clinical guidance.Before using any model fine-tuned on this dataset in a real-world healthcare setting, independent clinical validation by qualified professionals is required. The traceability metadata (source_pdf, pages, chunk_id) is provided to support auditing and review, but does not substitute for expert clinical judgment.

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.

Build docs developers (and LLMs) love