BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questions
Reading comprehension dataset that queries for complex, non-factoid information, and require difficult entailment-like inference to solve.
Overview
BoolQ is a benchmark containing natural questions that have simple yes/no answers.
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/boolq --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.boolq import boolq
eval(boolq)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/boolq --limit 10 --sample-shuffle
uv run inspect eval inspect_evals/boolq --max-connections 10
uv run inspect eval inspect_evals/boolq --temperature 0.5See uv run inspect eval --help for all available options.
Parameters
boolq
shuffle(bool): (default:True)
Dataset
BoolQ is a question answering dataset for yes/no questions containing 3,270 samples. Each sample is a triplet of question, passage, answer.
Here is an example from the dataset (after processing by Inspect):
question: is harry potter and the escape from gringotts a roller coaster ride
passage: Harry Potter and the Escape from Gringotts is an indoor steel roller coaster at Universal Studios Florida, a theme park located within the Universal Orlando Resort. Similar to dark rides, the roller coaster utilizes special effects in a controlled-lighting environment and also employs motion-based 3-D projection of both animation and live-action sequences to enhance the experience. The ride, which is themed to the Gringotts Wizarding Bank, became the flagship attraction for the expanded Wizarding World of Harry Potter when it opened on July 8, 2014
Scoring
A simple accuracy is calculated over the datapoints. The scorer accepts only a single Yes or No (case-insensitive), optionally surrounded by whitespace, punctuation, or underscores, such as No., **Yes**, or _No_. 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 answer pattern with one that accepts only a bare
YesorNo, optionally surrounded by whitespace, punctuation, or underscores. This is not a strict tightening. Previously any completion whose last word ended in “yes” or “no” (plus at most one trailing character) was scored against the target: words such as “know”, and answers wrapped in prose such as “The answer is No.” Both now score 0. In the other direction, answers with more than one wrapping character or a trailing newline, such as**Yes!!**or a label followed by a newline, were previously rejected and are now accepted. 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…