Datasets:
JurisEC
JurisEC is a Spanish-language benchmark for legal information retrieval, comprising 5,536 real legal consultations and their corresponding official responses, collected from publicly available documents issued by Ecuadorian public institutions. Spanning 28 legal areas, the dataset provides a realistic evaluation setting for retrieving authoritative institutional responses to legal questions within the Ecuadorian legal system. JurisEC is designed primarily for evaluation rather than training.
Authors: W. I. Martel Socola and C. R. Salamea Palacios.
Dataset: https://huggingface.co/datasets/wilfredomartel/JurisEC
Paper: JurisEC: A Benchmark of Real Legal Consultations and Official Institutional Responses for Spanish Legal Information Retrieval.
Retrieval task
The benchmark asks a retrieval system to identify the appropriate institutional response (resolucion_consulta) for a given legal consultation (consulta). Its evaluation split contains 5,536 queries, each ranked against 5,489 unique candidate responses. Identical responses are consolidated into single candidate documents, while highly similar but distinct consultations are retained and their corresponding responses are included in reciprocal relevance judgments. Consequently, a query may have more than one relevant document.
When the source provides a separate legal analysis, the reference response combines analisis and conclusion; otherwise, it consists of conclusion alone. The base_legal field preserves cited legal provisions as supplementary context, rather than serving as the retrieval target in the reported experiments.
Dataset structure
JurisEC is released in Parquet format with a single evaluation split containing 5,536 records and 11 fields. The two fields central to retrieval are consulta and resolucion_consulta, while the remaining attributes support legal analysis, source traceability, and further research.
| Field | Description |
|---|---|
consulta |
Original legal consultation used as the retrieval query |
resolucion_consulta |
Institutional response used as the retrieval target |
base_legal |
Legal provisions cited in the source document |
analisis |
Legal reasoning provided by the institution, when available |
conclusion |
Institution's final conclusion or determination |
fuente |
Issuing institution (SRI, PGE, or CNJ) |
materia |
Legal area |
tema |
Topic assigned to the consultation |
id |
Dataset record identifier |
id_registro |
Identifier associated with the original source record |
num_preguntas |
Number of questions in the consultation |
from datasets import load_dataset
dataset = load_dataset("wilfredomartel/JurisEC", split="evaluation")
query = dataset[0]["consulta"]
response = dataset[0]["resolucion_consulta"]
For exact reproduction of the paper's retrieval protocol, the unique candidate collection and duplicate-aware relevance judgments must also be constructed or obtained; the paired evaluation table alone is not a complete BEIR evaluation package.
Construction and evaluation
JurisEC was assembled by extracting legal consultations and their official responses directly from publicly available institutional documents. The extracted records were organized into a consistent schema and cleaned to address formatting artifacts, while the substantive content of the original responses was preserved without alteration. To assess extraction fidelity, a random sample comprising 10% of the consultations was manually checked against the original documents.
The study evaluates BM25 alongside three multilingual bi-encoders in a zero-shot setting, with neural models kept frozen and no fine-tuning or legal-domain adaptation performed on JurisEC. Each of the 5,536 queries is evaluated against the full collection of 5,489 candidate responses, providing a common basis for comparing lexical and dense retrieval approaches.
| Retriever | nDCG@10 | Acc@1 |
|---|---|---|
| BM25 | 0.767 | 0.657 |
| Multilingual-E5-large | 0.753 | 0.648 |
| EmbeddingGemma-300M | 0.782 | 0.681 |
| BGE-M3 | 0.774 | 0.667 |
The results show that dense retrieval tends to perform better when queries and responses share little vocabulary, whereas BM25 remains highly competitive when lexical overlap is greater. Nevertheless, 999 queries (18.0%) have no relevant response at rank one under any of the evaluated systems, indicating that the benchmark leaves meaningful room for improvement. The accompanying paper reports the full evaluation protocol, additional metrics, and analyses of retrieval difficulty.
Limitations and license
JurisEC reflects Ecuadorian institutional legal practice and should not be assumed to represent other jurisdictions or Spanish-language legal contexts more broadly. Its distribution across institutions and legal areas is uneven, and official interpretations may change over time. Moreover, the relevance judgments reflect documented consultation–response relationships rather than an exhaustive assessment of all legally plausible responses; the reported experiments evaluate retrieval performance, not the quality of generated legal advice or reasoning.
The dataset is intended for research and evaluation, not as a substitute for professional legal advice. CC BY 4.0 applies to the dataset's organization, metadata, and evaluation materials, while the original institutional texts remain subject to the legal status and reuse conditions of their respective sources.
Citation
@misc{jurisec2026,
title = {JurisEC: A Benchmark of Real Legal Consultations and Official Institutional Responses for Spanish Legal Information Retrieval},
author = {Martel Socola, W. I. and Salamea Palacios, C. R.},
year = {2026},
note = {SmartTech 2026 manuscript; publication details pending},
url = {https://huggingface.co/datasets/wilfredomartel/JurisEC}
}
- Downloads last month
- 119