Skip to content
Back to skills

Squad Eval

ASecurity

Measures a model's ability to extract precise answer spans from a given context paragraph in response to a natural language question, testing reading comprehension and span prediction. Use when the user wants to benchmark on SQuAD 1.1/2.0, or asks about evaluating this task. Reports F1.

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

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill squad-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Squad Eval?

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

Security grade badge for Squad Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-squad-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-squad-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: squad-eval
description: Measures a model's ability to extract precise answer spans from a given context paragraph in response to a natural language question, testing reading comprehension and span prediction. Use when the user wants to benchmark on SQuAD 1.1/2.0, or asks about evaluating this task. Reports F1.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2504.06037
  bibtex_key: [REDACTED]
  confidence: high
---

# squad-eval

> Confidence Regularized Masked Language Modeling using Text Length — Ji et al. (2025) (arXiv:2504.06037, 2025)

## What this evaluates

Measures a model's ability to extract precise answer spans from a given context paragraph in response to a natural language question, testing reading comprehension and span prediction.

## Datasets

- **SQuAD 1.1/2.0** — total ?; splits: test (-1); HF `squad`

## Metrics

- `F1` **(primary)** — range: [0, 1]
  - Token-level F1 score between predicted answer span and ground truth answer span, calculated as the harmonic mean of precision and recall across all examples.

## Input / output format

**Input**: Question and context paragraph tokenized together, truncated to 512 tokens.

**Output**: Predicted start and end token indices for the answer span.

## Scoring recipe

```python
def compute_f1(pred_spans, gold_spans):
    precisions, recalls = [], []
    for pred, gold in zip(pred_spans, gold_spans):
        p = len(set(pred) & set(gold)) / max(len(pred), 1)
        r = len(set(pred) & set(gold)) / max(len(gold), 1)
        f1 = 2 * p * r / (p + r) if (p + r) > 0 else 0
        precisions.append(p)
        recalls.append(r)
    return sum(precisions) / len(precisions), sum(recalls) / len(recalls)
```

## Common pitfalls

- SQuAD 2.0 includes unanswerable questions, requiring a null prediction strategy that affects F1 calculation.
- Not averaging results over multiple random seeds as the paper reports averages of 7 trials.

## Evidence (verbatim from paper)

> We evaluated methods on the GLUE benchmark (Wang et al., 2019) and SQuAD 1.1/2.0 datasets (Rajpurkar et al., 2016, 2018). Following Devlin et al. (2019), we excluded WNLI from tasks of GLUE benchmark. We reported Matthew's correlation score for CoLA, Pearson correlations for STS-b, F1 score for SQuAD 1.1/2.0, and accuracy scores for the other tasks.

## Citation

```bibtex
@misc{ji2025confidenceregularized,
  title={Confidence Regularized Masked Language Modeling using Text Length},
  author={Ji et al. (2025)},
  year={2025},
  note={arXiv:2504.06037}
}
```

- arXiv: 2504.06037

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.