esnlir-test / README.md
jd-rodriguezp1234's picture
Soften citation wording
32a09f9 verified
|
Raw
History Blame Contribute Delete
4.88 kB
metadata
license: cc-by-4.0
language:
  - es
task_categories:
  - text-classification
task_ids:
  - natural-language-inference
pretty_name: ESNLIR  test split
size_categories:
  - 10K<n<100K
tags:
  - nli
  - spanish
  - causal
  - esnlir
configs:
  - config_name: default
    data_files:
      - split: test
        path: test.json

ESNLIR — test split

The full test split of ESNLIR, a Spanish multi-genre NLI dataset with a reasoning (causal) label: 80,213 sentence pairs, label-balanced by construction.

This is the exact test split used to evaluate GPT-4o, GPT-4o-Mini, Qwen2.5-7B-Instruct and Llama-3.1-8B-Instruct in An Analysis of the Performance of Large Language Models in Spanish NLI Datasets with Causal Relationships (IBERAMIA 2026, to appear); code in Pacolas/NLI-via-LLM. The data itself comes from ESNLIR, a separate contribution with its own code and paper. Part of the ESNLIR-LLM collection.

Format

Despite the .json extension, the file is JSON Lines — one object per line, no enclosing brackets.

{"sentence_1": "...", "sentence_2": "...", "connector": "por eso",
 "connector_type": "reasoning", "extraction_strategy": "linking_phrase", "distance": 1.0,
 "sentence_1_paragraph": 46, "sentence_1_position": 25,
 "sentence_2_paragraph": 46, "sentence_2_position": 26,
 "id": "esnews__spanish_pd_news__365259", "dataset": "esnews__spanish_pd_news",
 "genre": "news", "domain": "spanish_public_domain_news"}

The gold label is connector_type, derived from the discourse connector linking the two sentences — it is not human-validated. For the human-validated subset see Flaglab/esnlir-human-validated.

Label distribution

label n
entailment 20,054
contrasting 20,054
reasoning 20,053
neutral 20,052

Genre distribution

genre n
theses 28,348
books 17,540
comments 11,137
news 10,248
articles 6,568
legal 5,628
talks 548
clinical 196

Usage

from huggingface_hub import hf_hub_download
import json

p = hf_hub_download("Flaglab/esnlir-test", "test.json", repo_type="dataset")
rows = [json.loads(l) for l in open(p) if l.strip()]

Reported results on this split

From the IBERAMIA 2026 paper (accuracy / macro F1), all LLMs using prompt_0004 with Few-Shot and shared context, no fine-tuning:

model setting accuracy macro F1
XLM-RoBERTa fine-tuned 0.676 0.676
BERTIN fine-tuned 0.663 0.664
Qwen2.5-7B-Instruct few-shot 0.411 0.370
GPT-4o-Mini few-shot 0.390 0.386
XGBoost fine-tuned 0.350 0.348
Llama-3.1-8B-Instruct few-shot 0.326 0.296
Majority class 0.250 0.250

A fine-tuned encoder beats every prompted 7–8B model by more than 25 points. Note also that both open models nearly abandon Entailment (≈0.08 recall), effectively collapsing the four-way task into a three-way one.

Caveat when comparing runs

vLLM applies no content filtering, so open models served locally return a label for all 80,213 pairs. The GPT-4o / GPT-4o-Mini runs went through Azure, whose NSFW filter rejected 44 pairs (40 of them Neutral). The two bases are therefore not exactly identical, and the missing pairs concentrate in the sensitive-content source datasets — worth keeping in mind when comparing proprietary and open-weight numbers pair for pair.

Citation

These splits were packaged for the following paper:

@InProceedings{perez2026llmspanishnlicausal,
  author    = {P{\'e}rez, Nicol{\'a}s and Portela, Johan R. and Manrique, Ruben},
  title     = {An Analysis of the Performance of Large Language Models in Spanish
               NLI Datasets with Causal Relationships},
  booktitle = {Advances in Artificial Intelligence -- IBERAMIA 2026},
  year      = {2026},
  publisher = {Springer Nature Switzerland},
  address   = {Cham},
  note      = {To appear},
}

The data itself is ESNLIR, released here under CC BY 4.0 — attribution to the source corpus is a condition of that licence:

@InProceedings{portela2025esnlirspanishmultigenredataset,
  author    = {Portela, Johan R. and P{\'e}rez-Ter{\'a}n, Nicol{\'a}s and Manrique, Rub{\'e}n},
  editor    = {Florez, Hector and Peluffo-Ordo{\~{n}}ez, Diego},
  title     = {{ESNLIR}: Expanding Spanish {NLI} Benchmarks with Multi-genre and Causal Annotation},
  booktitle = {Applied Informatics},
  year      = {2026},
  publisher = {Springer Nature Switzerland},
  address   = {Cham},
  pages     = {345--361},
  isbn      = {978-3-032-07175-0},
  doi       = {10.1007/978-3-032-07175-0_23},
}