CoolFace
Datasetpublic

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.

sourceHugging Facecc-by-sa-4.0updated 4mo agoView on Hugging Face
0likes84downloads
Dataset Card

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:

json
{
  "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:

Task TypeNum InstancesPercentage
interpretacion_documento65,83210.30%
qa_factual65,08710.18%
etica_profesional57,7129.03%
diagnostico_clinico55,8288.73%
qa_conocimiento55,1508.62%
ner53,6178.38%
educacion_paciente53,4418.36%
multirespuesta50,6287.92%
verdadero_falso50,4557.89%
simplificacion47,7757.47%
Verdadero_falso31,8934.99%
qa_def29,1544.56%
resumen22,7713.56%
qa_procedimiento1130.02%
TOTAL639,456100.00%

Distribution by question_variation_style:

Variation StyleNum InstancesPercentage
original489,61276.57%
coloquial_dubitativo12,1961.91%
chat_exclamativo12,1611.90%
dubitativoconfaltas12,1271.90%
informal_chat12,0241.88%
dubitativo11,9801.87%
exclamativoconfaltas11,8611.85%
telegrafico_exclamativo11,8381.85%
coloquial_exclamativo11,7031.83%
telegrafico11,6951.83%
coloquialconfaltas11,2301.76%
coloquial10,7071.67%
faltas_ortografia10,3771.62%
exclamativo9,9451.56%

Distribution by question_model:

ModelNum InstancesPercentage
phi-4489,61276.57%
Qwen3.5-35B-A3B149,84423.43%

Distribution by response_model:

ModelNum InstancesPercentage
phi-4313,04848.96%
qwen3.5109,00017.05%
kimi-k2.572,40011.32%
gemma462,9009.84%
qwen357,4048.98%
llama-3.324,7043.86%

Example Usage

python
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):

python
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:
        break

Dataset 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:

  1. 1.A biomedical system prompt is provided (trained on clinical knowledge, medical guidelines, and pharmacological expertise).
  2. 2.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.).
  3. 3.Multiple response models (Phi-4, Llama-3.3, Qwen, Kimi-K2.5, Gemma4) answer the generated queries from their respective expertise perspectives.
  4. 4.For context-based modes, biomedical document context is injected before generation.
  5. 5.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:

  1. 1.Initial synthetic generation and diagnostic review.
  2. 2.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

bibtex
@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