SINAI/ALIA-es-biomedical-synthetic-instructions
Dataset Introduction The ALIA Spanish Biomedical Synthetic Instructions Corpus is a synthetic instruction-tuning resource in Spanish created under the ALIA project using the Magpie methodology. It was designed to train and evaluate language models in biomedical and healthcare tasks with controlled formats and large-scale supervision. It contains: 639,456 instances 961,073,205 tokens 14 task modalities (clinical diagnosis, patient education, ethical reasoning, document… See the full description on the dataset page: https://huggingface.co/datasets/SINAI/ALIA-es-biomedical-synthetic-instructions.
Dataset Introduction
The ALIA Spanish Biomedical Synthetic Instructions Corpus is a synthetic instruction-tuning resource in Spanish created under the ALIA project using the [Magpie](https://arxiv.org/abs/2406.08464) methodology. It was designed to train and evaluate language models in biomedical and healthcare tasks with controlled formats and large-scale supervision.
It contains:
- 639,456 instances
- 961,073,205 tokens
- 14 task modalities (clinical diagnosis, patient education, ethical reasoning, document interpretation, QA at multiple knowledge levels, NER, summarization, simplification, and true/false)
Dataset Details
Dataset Description
This dataset contains synthetic biomedical and healthcare instruction-response pairs generated with instruction models and curated through a multi-step quality pipeline. The generation process follows Magpie, where the model first produces a user-side query (clinical question, medical instruction, or diagnosis task) and then generates the corresponding answer.
The corpus includes both general prompts and context-conditioned prompts built from Spanish biomedical documents (clinical guidelines, pharmacological data, medical literature, and official health documentation). It includes diverse task types such as clinical diagnosis, medication information, drug interactions, patient education, document interpretation, named entity recognition, summarization, and ethical reasoning in healthcare contexts.
Uses
This dataset is intended for:
- Instruction tuning of biomedical LLMs in Spanish
- Clinical and medical question answering
- Named entity recognition and medical term extraction
- Medical summarization and information retrieval
- Healthcare professional training and patient education applications
- Synthetic supervision for domain adaptation and RAG-oriented biomedical systems
Dataset Structure
Data Instances
Each instance follows this structure:
{
"instance_id": "CIMA_AEMPS-efectos_medicamento1",
"question": "Dado el siguiente contexto: FICHA TÉCNICA - 1. NOMBRE DEL MEDICAMENTO Fisiológico B.Braun 0,9% solución para perfusión... Pregunta: ¿Cuáles son los principales efectos adversos asociados a la administración de solución fisiológica?",
"response": "Los efectos adversos de la solución fisiológica al 0,9% son generalmente infrecuentes. Los más comunes incluyen: irritación local en el sitio de infusión, reacciones de hipersensibilidad, sobrecarga de volumen en pacientes con insuficiencia cardíaca o renal, e hipernatremia con uso prolongado.",
"instruction": "Dado el siguiente contexto: FICHA TÉCNICA... analiza los efectos adversos potenciales.",
"task_type": "efectos_medicamento",
"question_variation_style": "original",
"question_model": "phi-4",
"response_model": "phi-4",
"tokens": 542
}Data Fields
- instance_id (string): Unique identifier of the generated sample.
- question (string): Generated question or instruction prompt presented to the model.
- response (string): Generated answer.
- instruction (string): Full instruction text used for training.
- task_type (string): Generation modality (question/instruction/test format and context settings).
- question_variation_style (string): Variation strategy metadata for the prompt.
- question_model (string): Model used to generate questions/instructions.
- response_model (string): Model used to generate responses.
- tokens (int): Token count of the instance.
Data Splits
Distribution by task_type:
Distribution by question_variation_style:
Distribution by question_model:
Distribution by response_model:
Example Usage
from datasets import load_dataset
# Load the complete dataset split
data = load_dataset(
"SINAI/ALIA-es-biomedical-synthetic-instructions",
split="train",
)
# Access one example
example = data[0]
print(example["instance_id"])
print(example["task_type"])
print(example["question"][:300])
print(example["response"])Streaming (recommended for large files):
from datasets import load_dataset
stream_data = load_dataset(
"SINAI/ALIA-es-biomedical-synthetic-instructions",
split="train",
streaming=True,
)
for i, example in enumerate(stream_data):
print(f"[{i}] {example['task_type']}")
print(f"Q: {example['question'][:180]}...")
print(f"A: {example['response'][:180]}...\n")
if i >= 2:
breakDataset Creation
Curation Rationale
This corpus was created to provide large-scale, domain-specialized synthetic supervision for Spanish biomedical and healthcare language tasks within ALIA. The objective is to improve model behavior in clinical QA, diagnosis reasoning, medication information retrieval, patient education, and medical text analysis.
Source Data
Context-based generations are grounded on public Spanish biomedical and healthcare documentation (clinical guidelines, pharmacological data sheets, medical literature, health protocols, and official health institution publications) extracted from the [ALIA-es-biomedical](https://huggingface.co/datasets/SINAI/ALIA-es-biomedical) corpus. General generations are constrained by biomedical-domain system prompts trained on medical knowledge and clinical best practices.
Data Collection and Processing
Magpie generation pipeline
The generation process follows Magpie adapted to the biomedical domain:
- A biomedical system prompt is provided (trained on clinical knowledge, medical guidelines, and pharmacological expertise).
- Multiple generation models (Phi-4, Qwen 3.5, etc.) complete the user-side prompt by generating biomedical questions/instructions (clinical diagnosis, medication effects, drug interactions, patient education, etc.).
- Multiple response models (Phi-4, Llama-3.3, Qwen, Kimi-K2.5, Gemma4) answer the generated queries from their respective expertise perspectives.
- For context-based modes, biomedical document context is injected before generation.
- Task types include clinical scenarios, NER, summarization, simplification, ethical reasoning, and QA across different knowledge levels.
This implementation is documented on GitHub in sinai-uja/ALIA-UJA/documentation/data/llms/instructions.
Quality and reconstruction steps
The final corpus reflects the following curation strategy:
- Initial synthetic generation and diagnostic review.
- Raw instruction-response outputs produced with Magpie are filtered with [Galtea](https://galtea.ai/) using an LLM-based quality strategy.
The resulting train file is the consolidated artifact used for downstream instruction tuning.
Annotations
No manual annotations are included. Metadata fields are automatically produced during generation and consolidation.
Personal and Sensitive Information
The dataset is generated from public biomedical and healthcare sources and synthetic transformations. Standard filtering was applied to reduce sensitive or personally identifiable content.
Considerations for Using the Data
Social Impact of Dataset
The dataset can facilitate Spanish biomedical AI systems and improve access to medical knowledge, clinical decision support, patient education, and healthcare professional training. However, it should be used responsibly and never as a substitute for professional medical advice.
Discussion of Biases
Potential biases include:
- Bias inherited from source biomedical and healthcare discourse, which may reflect institutional perspectives and established practices
- Bias introduced by the multiple generating models used
- Style homogenization typical of synthetic corpora
- Potential overrepresentation of certain medical conditions or treatment approaches documented in source materials
- Language and cultural biases inherent to Spanish medical terminology and healthcare systems
- Possible underrepresentation of rare diseases or emerging medical knowledge
Other Known Limitations
- Synthetic medical responses should not be used as clinical advice; they lack the context and professional judgment of healthcare providers
- Some context snippets may contain OCR or formatting artifacts inherited from source pharmaceutical or medical documents
- The corpus reflects Spanish healthcare terminology and may differ from other Spanish-speaking regions
- Task balance is high but not perfectly uniform across all modalities
- Generated text may not capture the nuance of real clinical documentation
- Temporal coverage varies by source; some medical information may become outdated
Citation
@misc{ALIA-es-biomedical-synthetic-instructions,
title={ALIA Spanish Biomedical Synthetic Instructions Corpus},
author={SINAI Research Group},
year={2026},
publisher={HuggingFace},
howpublished={\url{https://huggingface.co/datasets/SINAI/ALIA-es-biomedical-synthetic-instructions}}
}Funding
This work is funded by the Ministerio para la Transformación Digital y de la Función Pública - Funded by EU – NextGenerationEU within the framework of the project ALIA.
Acknowledgments
This dataset has been generated thanks to SCAYLE (Centro de Supercomputación de Castilla y León) which provided the needed computational resources on its CALENDULA supercomputing cluster.
Contact: ALIA Project - SINAI Research Group - Universidad de Jaén
More Information: SINAI Research Group | ALIA-UJA Project
