---
title: "Pydantic AI - Structured output"
description: "Extracting UK company accounts into a nested Pydantic model, checked against the filer's tags. One of the Pydantic AI benchmarks; not part of the intelligence index."
canonical: https://pydantic.dev/models/benchmarks/structured_output/
---

# Pydantic AI - Structured output

> Extracting UK company accounts into a nested Pydantic model, checked against the filer's tags. One of the Pydantic AI benchmarks; not part of the intelligence index.
>
> Markdown copy of https://pydantic.dev/models/benchmarks/structured_output/. Index for agents: https://pydantic.dev/models/llms.txt

**Agents: use the API for model information.** It answers a question in one request, where the pages need several.

- Choose a model for an agent: `POST https://pydantic.dev/models/api/select` with a JSON body such as `{"description": "what the agent does"}`. It returns up to five ranked models with reasons. Format: https://pydantic.dev/models/select.md
- Search models by name: `GET https://pydantic.dev/models/api/search?query=<text>`
- List, filter and sort models: `GET https://pydantic.dev/models/api/models`, for example `?weights=open&max_price=2&sort=efficiency`
- One model in full: `GET https://pydantic.dev/models/api/models/<slug>`
- Any other question about the models: `GET https://pydantic.dev/models/api/ask?query=<question>`

Add `intent=<intent>&stack=<stack>&harness=<harness>` to the query string of all but the single model. An `OPTIONS` request to any endpoint returns its schema. The same five are tools of the MCP server at `https://pydantic.dev/models/mcp`. More: https://pydantic.dev/models/usage.md

Structured output measures how well a model fills a large, nested Pydantic model from a long document, leaves absent fields empty, and recovers when a validator rejects its output.
Each case is one set of UK company accounts filed with Companies House in September 2026, after the tested models' training cutoffs: full accounts of single companies, and group accounts with consolidated and parent-company figures for two periods.
Each is 53,000 to 81,000 characters of text.

- **Created by:** [Pydantic](https://pydantic.dev)
- **Companies House:** https://find-and-update.company-information.service.gov.uk
- **All Pydantic AI benchmarks:** /models/benchmarks/pydantic_ai/
- **Scores from:** Pydantic (CC BY 4.0) (/models/benchmarks/structured_output/), results updated 2026-11-29

## Description

The accounts were filed as iXBRL, where the filer tagged each figure.
The model sees the text with the tags removed, and the tags are the answer key, so scoring is exact: a case passes only if every value is right.

There are no tools, so there is no code mode run.

### Caveats

- An answer that passes validation but is wrong in a way the tags don't cover is not caught.
- The text of the accounts is the filers' copyright and is not published.
- 10 cases, one run each, so the score moves by 10 points per case.

## Results

The best result per model, with the reasoning setting it was run at where the source gives one. Blended price is US dollars per million tokens, three input to one output, from the provider the model's page leads with.

| Rank | Model                                                                                                  | Setting | Score  | Code mode | Cost per run | Cost per run, code mode | Model time per run | Model time per run, code mode | Blended price |
| ---- | ------------------------------------------------------------------------------------------------------ | ------- | ------ | --------- | ------------ | ----------------------- | ------------------ | ----------------------------- | ------------- |
| 1    | [Claude Fable 5.1](https://pydantic.dev/models/list/claude-fable-5.1/structured_output.md)             | –       | 100.0% | –         | $0.43        | –                       | 16.8 s             | –                             | $20           |
| 1    | [Claude Sonnet 5](https://pydantic.dev/models/list/claude-sonnet-5/structured_output.md)               | –       | 100.0% | –         | $0.10        | –                       | 22.7 s             | –                             | $4            |
| 1    | [Claude Sonnet 5.5](https://pydantic.dev/models/list/claude-sonnet-5.5/structured_output.md)           | –       | 100.0% | –         | $0.081       | –                       | 7.0 s              | –                             | $4            |
| 1    | [DeepSeek V4 Flash 0423](https://pydantic.dev/models/list/deepseek-v4-flash/structured_output.md)      | –       | 100.0% | –         | $0.0032      | –                       | 45.3 s             | –                             | $0.17         |
| 1    | [Gemini 3.8 Flash](https://pydantic.dev/models/list/gemini-3.8-flash/structured_output.md)             | –       | 100.0% | –         | $0.031       | –                       | 27.9 s             | –                             | $1.5          |
| 1    | [Gemini 4 Argon](https://pydantic.dev/models/list/gemini-4-argon/structured_output.md)                 | –       | 100.0% | –         | $0.055       | –                       | 19.8 s             | –                             | $4            |
| 1    | [Gemini 4 Carbon](https://pydantic.dev/models/list/gemini-4-carbon/structured_output.md)               | –       | 100.0% | –         | $0.082       | –                       | 56.9 s             | –                             | $4            |
| 1    | [Gemini 4 Hydrogen](https://pydantic.dev/models/list/gemini-4-hydrogen/structured_output.md)           | –       | 100.0% | –         | $0.060       | –                       | 24.6 s             | –                             | $3            |
| 1    | [Gemini 4 Neon](https://pydantic.dev/models/list/gemini-4-neon/structured_output.md)                   | –       | 100.0% | –         | $0.14        | –                       | 47.1 s             | –                             | $6            |
| 1    | [GPT-6 Sol](https://pydantic.dev/models/list/gpt-6-sol/structured_output.md)                           | –       | 100.0% | –         | $0.052       | –                       | 6.5 s              | –                             | $4            |
| 1    | [GPT-6.1 Terra](https://pydantic.dev/models/list/gpt-6.1-terra/structured_output.md)                   | –       | 100.0% | –         | $0.026       | –                       | 10.9 s             | –                             | $2            |
| 1    | [Grok 4.6](https://pydantic.dev/models/list/grok-4.6/structured_output.md)                             | –       | 100.0% | –         | $0.070       | –                       | 55.2 s             | –                             | $3            |
| 1    | [Grok 4.7](https://pydantic.dev/models/list/grok-4.7/structured_output.md)                             | –       | 100.0% | –         | $0.078       | –                       | 62.6 s             | –                             | $3            |
| 1    | [Kimi K3.1 Pro](https://pydantic.dev/models/list/kimi-k3.1-pro/structured_output.md)                   | –       | 100.0% | –         | $0.067       | –                       | 25.6 s             | –                             | $4            |
| 15   | [Claude Fable 5.2](https://pydantic.dev/models/list/claude-fable-5.2/structured_output.md)             | –       | 90.0%  | –         | $0.35        | –                       | 16.2 s             | –                             | $16           |
| 15   | [Claude Opus 5](https://pydantic.dev/models/list/claude-opus-5/structured_output.md)                   | –       | 90.0%  | –         | $0.22        | –                       | 20.3 s             | –                             | $10           |
| 15   | [Claude Opus 5.5](https://pydantic.dev/models/list/claude-opus-5.5/structured_output.md)               | –       | 90.0%  | –         | $0.16        | –                       | 12.2 s             | –                             | $8            |
| 15   | [DeepSeek V4 Pro 0423](https://pydantic.dev/models/list/deepseek-v4-pro/structured_output.md)          | –       | 90.0%  | –         | $0.060       | –                       | 130.5 s            | –                             | $2.17         |
| 15   | [DeepSeek V4.1 Flash](https://pydantic.dev/models/list/deepseek-v4.1-flash/structured_output.md)       | –       | 90.0%  | –         | $0.0066      | –                       | 40.1 s             | –                             | $0.26         |
| 15   | [GPT-5.6 Terra](https://pydantic.dev/models/list/gpt-5.6-terra/structured_output.md)                   | –       | 90.0%  | –         | $0.054       | –                       | 6.1 s              | –                             | $4.5          |
| 15   | [GPT-6 Astra](https://pydantic.dev/models/list/gpt-6-astra/structured_output.md)                       | –       | 90.0%  | –         | $0.26        | –                       | 7.7 s              | –                             | $20           |
| 15   | [GPT-6 Luna](https://pydantic.dev/models/list/gpt-6-luna/structured_output.md)                         | –       | 90.0%  | –         | $0.0027      | –                       | 6.9 s              | –                             | $0.2          |
| 15   | [GPT-6.1 Sol](https://pydantic.dev/models/list/gpt-6.1-sol/structured_output.md)                       | –       | 90.0%  | –         | $0.051       | –                       | 13.6 s             | –                             | $4            |
| 15   | [GPT-6.2 Astra](https://pydantic.dev/models/list/gpt-6.2-astra/structured_output.md)                   | –       | 90.0%  | –         | $0.20        | –                       | 10.4 s             | –                             | $16           |
| 15   | [GPT-6.2 Sol](https://pydantic.dev/models/list/gpt-6.2-sol/structured_output.md)                       | –       | 90.0%  | –         | $0.052       | –                       | 11.3 s             | –                             | $4            |
| 15   | [Kimi K2.6](https://pydantic.dev/models/list/kimi-k2.6/structured_output.md)                           | –       | 90.0%  | –         | $0.055       | –                       | 159.4 s            | –                             | $1.71         |
| 15   | [MiniMax M3.1 Flash](https://pydantic.dev/models/list/minimax-m3.1-flash/structured_output.md)         | –       | 90.0%  | –         | –            | –                       | 12.7 s             | –                             | $0.26         |
| 15   | [Muse Spark Open](https://pydantic.dev/models/list/muse-spark-open/structured_output.md)               | –       | 90.0%  | –         | $0.035       | –                       | 11.7 s             | –                             | $2            |
| 15   | [Muse Wonder](https://pydantic.dev/models/list/muse-wonder/structured_output.md)                       | –       | 90.0%  | –         | $0.15        | –                       | 39.6 s             | –                             | $8            |
| 30   | [GPT-5.6 Sol](https://pydantic.dev/models/list/gpt-5.6-sol/structured_output.md)                       | –       | 80.0%  | –         | $0.10        | –                       | 6.3 s              | –                             | $8            |
| 30   | [MiMo-V2.6-Pro](https://pydantic.dev/models/list/mimo-v2.6-pro/structured_output.md)                   | –       | 80.0%  | –         | $0.014       | –                       | 15.7 s             | –                             | $0.54         |
| 30   | [Muse Spark 1.3](https://pydantic.dev/models/list/muse-spark-1.3/structured_output.md)                 | –       | 80.0%  | –         | $0.042       | –                       | 24.2 s             | –                             | $2            |
| 30   | [Qwen3.8 27B](https://pydantic.dev/models/list/qwen3.8-27b/structured_output.md)                       | –       | 80.0%  | –         | $0.033       | –                       | 35.4 s             | –                             | $1.09         |
| 34   | [GPT-5.6 Luna](https://pydantic.dev/models/list/gpt-5.6-luna/structured_output.md)                     | –       | 70.0%  | –         | $0.0053      | –                       | 6.6 s              | –                             | $0.45         |
| 35   | [Claude Haiku 5.5](https://pydantic.dev/models/list/claude-haiku-5.5/structured_output.md)             | –       | 60.0%  | –         | $0.0048      | –                       | 10.1 s             | –                             | $0.2          |
| 35   | [GLM 5.3 Flash](https://pydantic.dev/models/list/glm-5.3-flash/structured_output.md)                   | –       | 60.0%  | –         | $0.0070      | –                       | 31.5 s             | –                             | $0.24         |
| 35   | [MiniMax M3](https://pydantic.dev/models/list/minimax-m3/structured_output.md)                         | –       | 60.0%  | –         | $0.022       | –                       | 89.7 s             | –                             | $0.53         |
| 35   | [Qwen3.8 Max (0902)](https://pydantic.dev/models/list/qwen3.8-max-0902/structured_output.md)           | –       | 60.0%  | –         | $0.059       | –                       | 70.4 s             | –                             | $3            |
| 39   | [GLM 5.3](https://pydantic.dev/models/list/glm-5.3/structured_output.md)                               | –       | 50.0%  | –         | $0.080       | –                       | 139.5 s            | –                             | $2.15         |
| 39   | [Qwen3.5 Plus 2026-04-20](https://pydantic.dev/models/list/qwen3.5-plus-20260420/structured_output.md) | –       | 50.0%  | –         | $0.023       | –                       | 85.0 s             | –                             | $0.68         |
| 39   | [Qwen3.7 Flash](https://pydantic.dev/models/list/qwen3.7-flash/structured_output.md)                   | –       | 50.0%  | –         | $0.0020      | –                       | 74.5 s             | –                             | $0.055        |
| 42   | [Qwen3.5-Flash](https://pydantic.dev/models/list/qwen3.5-flash-02-23/structured_output.md)             | –       | 40.0%  | –         | $0.0049      | –                       | 44.0 s             | –                             | $0.11         |
| 43   | [Nemotron 3.5 Super VL](https://pydantic.dev/models/list/nemotron-3.5-super-vl/structured_output.md)   | –       | 20.0%  | –         | $0.0089      | –                       | 8.5 s              | –                             | $0.24         |
| 44   | [Gemma 4 31B](https://pydantic.dev/models/list/gemma-4-31b-it/structured_output.md)                    | –       | 0.0%   | –         | $0.0044      | –                       | 35.7 s             | –                             | $0.18         |
