license: apache-2.0
language:
- gl
size_categories:
- n<1K
configs:
- config_name: triplets
data_files:
- split: triplets
path: triplets.json
default: true
- config_name: dog
data_files:
- split: dog
path: dog.json
- config_name: dog_metadata
data_files:
- split: dog_metadata
path: dog_metadata.json
task_categories:
- question-answering
- text-generation
multilinguality:
- monolingual
tags:
- rag
DOG-RAG: A Galician Benchmark for Legal Retrieval-Augmented Generation
Table Of Contents
Click to expand
Dataset description
This dataset contains question–answer triplets derived from publications of the Diario Oficial de Galicia (DOG), the official gazette of the autonomous community of Galicia (Spain). Each example is grounded in real legal and administrative documents, covering a wide range of domains such as public employment, housing subsidies, cultural heritage, and institutional regulations.
The dataset is primarily intended for evaluating Retrieval-Augmented Generation (RAG) systems. Each example includes one or more context passages along with paraphrased questions and answers, which makes it useful for testing whether a system can retrieve the right information and use it correctly when generating a response. However, it can also be used for more standard question answering (QA) tasks, both extractive and generative. Since all data is in Galician, it may also be of interest for work on multilingual or lower-resource NLP settings.
In order to load this dataset:
import datasets
# By default, the triplets section of the dataset will be loaded
triplets = datasets.load("proxectonos/dog-rag")
# However, it can also be manually specified
triplets = datasets.load("proxectonos/dog-rag","triplets")
Dataset Structure
Each entry in the dataset is a JSON object with the following fields:
uid(int): Unique identifier for the example.file_name(string): Identifier of the source document.url(string): Link to the original DOG publication.question(list[string]): One or more paraphrased questions.answer(list[string]): One or more valid answers corresponding to the questions.context(list[string]): One or more text passages from which the answer can be derived.category(string): Type of QA instance.
Example
{
"uid": 0,
"file_name": "AnuncioO150-151025-0001_gl",
"url": "https://www.xunta.gal/dog/Publicados/2025/20251022/AnuncioO150-151025-0001_gl.html",
"question": [
"Cando se celebra a conferencia ...?",
"Cal é a data de realización ...?"
],
"answer": [
"A conferencia terá lugar o venres 31 de outubro de 2025.",
"A data sinalada ... é o 31 de outubro de 2025."
],
"context": [
"Convocar, no marco do Ciclo de conferencias ... Data: venres 31, de outubro de 2025."
],
"category": "data_extracted"
}
Entry categories
The dataset includes several categories reflecting the nature of the QA pairs:
data_extracted: Direct factual extraction from a single context span.general: Questions requiring understanding of broader context or reasoning.sparsed_context: Answers requiring aggregation across multiple context fragments.table: Information extracted from structured/tabular data.
Source Documents
In addition to the QA triplets, the dataset also includes the original documents from which the examples were created. These are full publications from the Diario Oficial de Galicia (DOG), provided with their associated metadata.
The triplets in the QA portion of the dataset are derived directly from these documents. This makes it possible to reconstruct a more realistic retrieval setup, where systems must search over complete documents rather than pre-selected context snippets.
Having access to the original texts also allows for more flexible use cases, such as:
- building custom retrieval indices
- experimenting with different chunking strategies
- evaluating end-to-end RAG pipelines under more realistic conditions
Dataset versions
There are two versions of this dataset included here:
dog, which contains a barebones and cleaner version of the datadog_metadata, containing the same fields as the previous version but with some additional metadata features
They can be loaded as follows:
import datasets
dog = datasets.load_dataset('proxectonos/dog-rag','dog')
dog_metadata = datasets.load_dataset('proxectonos/dog-rag','dog_metadata')
Each document entry in dog contains:
file_id: Identifier used to link the document with the corresponding tripletsdoga_idanddoga_date: Issue number and publication dateurl: Link to the official online versiontitle: Official title of the publicationcontent: Full text of the document
While the dog_metadata also contains:
sectionandsubsection: Document classification within the DOGentity: Issuing authority (e.g., government department)page_number: Page in the official bulletin
Examples
Barebones DOG
{
"file_id": "AnuncioO92-151025-0001_gl",
"doga_id": 203,
"doga_date": "2025-10-21",
"url": "https://www.xunta.gal/dog/Publicados/2025/20251021/AnuncioO92-151025-0001_gl.html",
"title": "RESOLUCIÓN do 14 de outubro de 2025 pola que...",
"content": "Mediante a Resolución do 16 de decembro..."
}
DOG with metadata
{
"file_id": "AnuncioO92-151025-0001_gl",
"doga_id": 203,
"doga_date": "2025-10-21",
"url": "https://www.xunta.gal/dog/Publicados/2025/20251021/AnuncioO92-151025-0001_gl.html",
"section": "Outras disposicións",
"subsection": null,
"title": "RESOLUCIÓN do 14 de outubro de 2025 pola que...",
"entity": "Instituto Galego de Promoción Económica",
"page_number": "54765",
"content": "Mediante a Resolución do 16 de decembro..."
}
Additional information
Acknowledgements
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 Desarrollo de Modelos ALIA. (Esta publicación del proyecto Desarrollo de Modelos ALIA está financiada por el Ministerio para la Transformación Digital y de la Función Pública y por el Plan de Recuperación, Transformación y Resiliencia – Financiado por la Unión Europea – NextGenerationEU)
Cite this dataset
@inproceedings{rodriguez2026dograg,
title={{DOG-RAG}: A Galician Benchmark for Legal Retrieval-Augmented Generation},
author={Rodríguez, Pablo and Vázquez García, Raquel and Paniagua Suárez, Silvia and Botana López, Alberto and Gamallo, Pablo},
booktitle={Proceedings of the 42nd International Conference of the Spanish Society for Natural Language Processing (SEPLN 2026)},
address={León, Spain},
month={September},
year={2026},
publisher={CEUR-WS.org}
}