Skip to content
Back to skills

Nllp 2024 Legal Nli Eval

ASecurity

Probes an LLM's ability to perform Natural Language Inference (NLI) within the legal domain. Specifically, it tests whether the model can correctly classify the logical relationship (entailment, neutral, or contradiction) between a formal legal case summary and an informal social media review. Use when the user wants to benchmark on NLLP 2024 Legal NLI, or asks about evaluating this task. Reports F1.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 11, 2026
researchpythongogitperformance

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill nllp-2024-legal-nli-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nllp 2024 Legal Nli Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nllp 2024 Legal Nli Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-nllp-2024-legal-nli-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-nllp-2024-legal-nli-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nllp-2024-legal-nli-eval
description: Probes an LLM's ability to perform Natural Language Inference (NLI) within the legal domain. Specifically, it tests whether the model can correctly classify the logical relationship (entailment, neutral, or contradiction) between a formal legal case summary and an informal social media review. Use when the user wants to benchmark on NLLP 2024 Legal NLI, or asks about evaluating this task. Reports F1.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2410.15990
  bibtex_key: [REDACTED]
  confidence: high
---

# nllp-2024-legal-nli-eval

> Augmenting Legal Decision Support Systems with LLM-based NLI for Analyzing Social Media Evidence — Kadiyala et al. (2024) (arXiv:2410.15990, 2024)

## What this evaluates

Probes an LLM's ability to perform Natural Language Inference (NLI) within the legal domain. Specifically, it tests whether the model can correctly classify the logical relationship (entailment, neutral, or contradiction) between a formal legal case summary and an informal social media review.

## Datasets

- **NLLP 2024 Legal NLI** — total 396; splits: train (312), test (84); repo https://github.com/1-800-SHARED-TASKS/EMNLP-2024-NLLP

## Metrics

- `F1` **(primary)** — range: [0, 1]
  - Macro-averaged F1 score across the three NLI classes (entailment, neutral, contradiction). Computed as the harmonic mean of precision and recall for each class, then averaged.

## Input / output format

**Input**: A legal premise (summary of a resolved class-action case) paired with a hypothesis (an online media text or social media review).

**Output**: A single class label: 'entailment', 'neutral', or 'contradiction'.

## Scoring recipe

```python
def compute_f1(predictions, gold):
    classes = ['entailment', 'neutral', 'contradiction']
    f1s = []
    for c in classes:
        tp = sum(1 for p, g in zip(predictions, gold) if p == c and g == c)
        fp = sum(1 for p, g in zip(predictions, gold) if p == c and g != c)
        fn = sum(1 for p, g in zip(predictions, gold) if p != c and g == c)
        prec = tp / (tp + fp) if (tp + fp) > 0 else 0
        rec = tp / (tp + fn) if (tp + fn) > 0 else 0
        f1 = 2 * prec * rec / (prec + rec) if (prec + rec) > 0 else 0
        f1s.append(f1)
    return sum(f1s) / len(f1s)
```

## Common pitfalls

- The test set is very small (84 samples), making reported F1 scores highly sensitive to random initialization and data shuffling.
- Social media hypotheses contain informal language and semantic ambiguity, which disproportionately hurts contradiction detection compared to standard NLI benchmarks.
- Class distribution in the test set is skewed toward entailment (47.6%) and neutral (34.5%), so accuracy alone can be misleading; macro-F1 is required to evaluate minority class performance.

## Evidence (verbatim from paper)

> The paper presents a winning entry in the NLLP 2024 Legal NLI shared task, achieving state-of-the-art performance by fine-tuning large language models (LLMs) on legal premise-hypothesis pairs from class-action cases and social media reviews. A key innovation is the use of multi-stage training and ORPO-based alignment strategies, with GEMMA-2-27B and Mistral-8x7B outperforming others via preferred alignment (ORPO Preferred), achieving up to 0.887 F1.

## Citation

```bibtex
@misc{kadiyala2024augmenting,
  title={Augmenting Legal Decision Support Systems with LLM-based NLI for Analyzing Social Media Evidence},
  author={Kadiyala et al. (2024)},
  year={2024},
  note={arXiv:2410.15990}
}
```

- arXiv: 2410.15990

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.