PAWS: Paraphrase Adversaries from Word Scrambling
Evaluating models on the task of paraphrase detection by providing pairs of sentences that are either paraphrases or not.
Overview
PAWS is a dataset designed for evaluating models on the task of paraphrase detection by providing pairs of sentences that are either paraphrases or not, facilitating the training and benchmarking of natural language understanding systems.
Usage
Installation
Install with pip install inspect-evals, or uv sync from a checkout of this repository.
Running evaluations
uv run inspect eval inspect_evals/paws --model openai/gpt-5-nanoYou can also import tasks as normal Python objects and run them from python:
from inspect_ai import eval
from inspect_evals.paws import paws
eval(paws)Drop uv run if you manage dependencies yourself. Log viewing (inspect view) and default-model setup are documented in the Inspect Evals README.
Options
You can control a variety of options from the command line. For example:
uv run inspect eval inspect_evals/paws --limit 10 --sample-shuffle
uv run inspect eval inspect_evals/paws --max-connections 10
uv run inspect eval inspect_evals/paws --temperature 0.5See uv run inspect eval --help for all available options.
Parameters
paws
shuffle(bool): (default:True)
Dataset
Here is an example from the dataset (after processing by Inspect):
Answer Yes if the following two sentences are paraphrases. If they are not, answer No.
Do not give any other answer other than Yes or No in your response.
Sentence1: These geographically correspond to the traditional Glasgow District , South , Edinburgh District , and North and Midlands districts .
Sentence2: These geographically roughly correspond to the traditional districts of Glasgow District , South , Edinburgh District and North and Midlands .
Scoring
A simple accuracy is calculated over the datapoints. The scorer accepts only a single Yes or No (case-insensitive), optionally surrounded by whitespace or punctuation, such as No. or **Yes**. A completion that puts any other words around the answer, such as The answer is: No, is scored as not matching, regardless of which label it contains.
Changelog
[4-A] - 2026-09-16
- A completion that does not match the answer pattern now scores
INCORRECTwithreason="invalid_response_format"rather thanNOANSWER, followingpattern()upstream in inspect_ai#4629, which attributes an unmatched completion to the model under test. Headline metrics are unaffected:value_to_floatmaps bothNOANSWERandINCORRECTto0.0, so accuracy and stderr are unchanged. The non-answer moves from the score value toScore.reason; log analysis that countsNOANSWERvalues should readreasoninstead. See #2314.
[3-A] - 2026-08-31
- Replace the
includes()scorer with apattern()that accepts only a bareYesorNo(surrounding whitespace and punctuation allowed). Previously any completion containing “yes” or “no” as a substring was scored correct: hedging text such as “I don’t know”, and answers wrapped in prose such as “The answer is: No”. Both now score 0. Results are not comparable with2-A. See #2331.
[2-A] - 2026-02-16
- Migrate version to new scheme. See #907.
[1.0.1] - 2025-12-18
- Adds backoff policy for functions that connect to huggingface servers.
Static checks
Results of inspect-evals-lint at the commit this documentation was built from. Rule names link to their documentation; findings link to the file at that commit. These checks describe structure and conventions, not whether the evaluation measures what it claims.
Loading lint results…