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-nano

You 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.5

See 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 INCORRECT with reason="invalid_response_format" rather than NOANSWER, following pattern() upstream in inspect_ai#4629, which attributes an unmatched completion to the model under test. Headline metrics are unaffected: value_to_float maps both NOANSWER and INCORRECT to 0.0, so accuracy and stderr are unchanged. The non-answer moves from the score value to Score.reason; log analysis that counts NOANSWER values should read reason instead. See #2314.

[3-A] - 2026-08-31

  • Replace the includes() scorer with a pattern() that accepts only a bare Yes or No (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 with 2-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…