DocVQA: A Dataset for VQA on Document Images
DocVQA is a Visual Question Answering benchmark that consists of 50,000 questions covering 12,000+ document images. This implementation solves and scores the “validation” split.
Overview
DocVQA is a Visual Question Answering benchmark that consists of 50,000 questions covering 12,000+ document images. This implementation solves and scores the “validation” split.
Usage
Installation
There are two ways of using Inspect Evals, from pypi as a dependency of your own project and as a standalone checked out GitHub repository.
If you are using it from pypi, install the package and its dependencies via:
pip install inspect-evalsIf you are using Inspect Evals in its repository, start by installing the necessary dependencies with:
uv syncRunning evaluations
Now you can start evaluating models. For simplicity’s sake, this section assumes you are using Inspect Evals from the standalone repo. If that’s not the case and you are not using uv to manage dependencies in your own project, you can use the same commands with uv run dropped.
uv run inspect eval inspect_evals/docvqa --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.docvqa import docvqa
eval(docvqa)After running evaluations, you can view their logs using the inspect view command:
uv run inspect viewFor VS Code, you can also download Inspect AI extension for viewing logs.
If you don’t want to specify the --model each time you run an evaluation, create a .env configuration file in your working directory that defines the INSPECT_EVAL_MODEL environment variable along with your API key. For example:
INSPECT_EVAL_MODEL=anthropic/claude-opus-4-1-20250805
ANTHROPIC_API_KEY=<anthropic-api-key>Options
You can control a variety of options from the command line. For example:
uv run inspect eval inspect_evals/docvqa --limit 10
uv run inspect eval inspect_evals/docvqa --max-connections 10
uv run inspect eval inspect_evals/docvqa --temperature 0.5See uv run inspect eval --help for all available options.
Parameters
docvqa
shuffle(bool): (default:True)
Dataset
The DocVQA dataset contains a “validation” split and a “test” split. To prevent leakage into training data, the authors of DocVQA have chosen to hold back the answers to the “test” split. Scoring on the “test” split requires coordinating with the DocVQA authors.
Each split contains several questions about each image. Here is an example image:

And associated example questions:
- How many females are affected by diabetes?
- What percentage of cases can be prevented?
- What could lead to blindness or stroke diabetes?
The model is tasked to answer each question by referring to the image. The prompts are based on OpenAI’s simple-evals.
Scoring
DocVQA computes the Average Normalized Levenstein Similarity: