CommonsenseQA is a dataset designed to evaluate commonsense reasoning capabilities in natural language processing models. It consists of 12,247 multiple-choice questions that require background knowledge and commonsense to answer correctly. The dataset was constructed using CONCEPTNET, a graph-based knowledge base, where crowd-workers authored questions with complex semantics to challenge existing AI models.
Contributed by @lauritowal
Install with pip install inspect-evals, or uv sync from a checkout of this repository.
uv run inspect eval inspect_evals/commonsense_qa --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.commonsense_qa import commonsense_qa
eval(commonsense_qa)Drop uv run if you manage dependencies yourself. Log viewing (inspect view) and default-model setup are documented in the Inspect Evals README.
You can control a variety of options from the command line. For example:
uv run inspect eval inspect_evals/commonsense_qa --limit 10 --sample-shuffle
uv run inspect eval inspect_evals/commonsense_qa --max-connections 10
uv run inspect eval inspect_evals/commonsense_qa --temperature 0.5See uv run inspect eval --help for all available options.
shuffle(bool): (default:True)
CommonsenseQA is a multiple-choice question answering dataset which requires different types of commonsense knowledge to predict the correct answers. This eval runs the 1,221-question validation split; the test split's labels are not public. Here is an example from the dataset:
Where can I stand on a river to see water falling without getting wet?
A) Waterfall
B) Bridge
C) Valley
D) Stream
E) Bottom
The model is required to choose the correct answer from the given options.
A simple accuracy is calculated over the datapoints.
- Migrate version to new scheme. See #907.
- Adds backoff policy for functions that connect to huggingface servers.