---
title: "Claude Opus 5.5 on Pydantic AI - Structured output"
description: "Extracting UK company accounts into a nested Pydantic model, checked against the filer's tags. Tool calling 90%; rank 15 of 44."
canonical: https://pydantic.dev/models/list/claude-opus-5.5/structured_output/
---

# Claude Opus 5.5 on Pydantic AI - Structured output

> Extracting UK company accounts into a nested Pydantic model, checked against the filer's tags. Tool calling 90%; rank 15 of 44.
>
> Markdown copy of https://pydantic.dev/models/list/claude-opus-5.5/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

About the benchmark: https://pydantic.dev/models/benchmarks/structured_output.md. The model on every Pydantic AI benchmark: https://pydantic.dev/models/list/claude-opus-5.5/pydantic_ai.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time    |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | ------- |
| Tool calling | 90%   | 9 of 10      | $1.64 | 10       | 10         | 2.0 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

Claude Opus 5.5 passed 9 of the 10 cases, all in tool-calling mode. Every case took a single request: the model read the accounts and made one `accounts` call. It never needed a retry. Each case cost $0.13–$0.20, about $1.64 in total. The one failure (tier1-11022760, TaskUs) came from how it read dash entries, not from any of the large figures.

#### Where it does well

- **Signs:** it applied the bracket rules consistently in all 10 cases. Net liabilities, deficit reserves and losses came out negative. Tax credits came out negative (-138000, -571000, -51830). Costs and positive tax charges stayed positive, even when shown in brackets.
- **£000 scaling:** it multiplied by 1,000 correctly in all four cases presented in £000.
- **Group against parent (6 cases):** it kept the consolidated and parent figures apart, even where they differ by tens of pounds (14896135 against 14896091; 103090 against 102990).
- **Creditor notes (tiers 4–5):** it mapped note lines to categories and returned explicit 0 amounts where only the prior year had a value.
- **Company details (tier 5):** it listed every director and set accounts_type correctly.

#### Mistakes it makes

There was only one failing case, with two errors in it. Both come from not treating a dash (`-`) as zero:

- The balance sheet line `Called up share capital | 20 | - | -` carries a note reference (20) and a dash meaning nil for both years. The model returned 100 for both years. That number seems to come from note 20, which shows 100 shares as `0.10` £'000. The handbook says to take the figure from the accounts, which here is the dash, i.e. 0.
- For the prior year it left out `other_operating_income`, which the statement shows as `-`. The expected value is 0.

It didn't misread any large or structural figure, and wasting effort was not an issue: every case was answered in one shot.

## Runs

### tier1-07054261

**Tool calling: passed.** Single-company full accounts in £000. It returned everything in one `accounts` call, including the negative net assets and reserves and the prior-year tax credit of -138000, and passed. ($0.18, 1 requests, 10 s)
- Right: Multiplied every £000 figure by 1,000
- Right: Returned the bracketed net current liabilities, net assets and P&L reserve as negative
- Right: Signed the prior tax credit as -138000

### tier1-11022760

**Tool calling: failed.** TaskUs Ltd, £000 accounts. It got all the large figures right in one `accounts` call but failed on two small ones: share capital, and the prior-year other operating income. ($0.13, 1 requests, 9 s)
- Right: Correct balance sheet and P&L totals for both years, including the negative total assets less current liabilities of -19925000
- Right: Read the `(632)` tax charge on a loss as a positive tax of 632000
- Mistake: The balance sheet shows `Called up share capital | 20 | - | -`, where 20 is the note number and `-` means nil. The model returned `called_up_share_capital: 100` for both years, apparently taking the 100 £1 shares in note 20 (shown there as `0.10` £'000), not the balance sheet's dash. The expected value is 0.
- Mistake: It left `other_operating_income` out of `prior_profit_and_loss` even though the statement shows `Other operating income | 7,592 | -`. The expected value is 0. The prior dash should have been returned as 0, not as a missing line.

### tier2-11600506

**Tool calling: passed.** Group accounts in whole pounds. It returned the consolidated balance sheet and P&L for both years in one call and passed. ($0.16, 1 requests, 11 s)
- Right: Used the consolidated figures, not the parent's
- Right: Returned net current liabilities and net liabilities as negative, and the large positive tax charges as positive

### tier2-SC121467

**Tool calling: passed.** Scottish group in £000. It returned both years of group figures in one call, including the prior-year loss and tax credit (-571000), and passed. ($0.16, 1 requests, 11 s)
- Right: Signed the prior loss before tax (-1678000) and tax credit (-571000) correctly
- Right: Picked up distribution costs as a separate line

### tier3-05959188

**Tool calling: passed.** Group and parent balance sheets for both years in one call. All 64 checked fields were right and the case passed. ($0.19, 1 requests, 12 s)
- Right: Kept group and parent figures apart even where they nearly match (intangibles of 14896135 for the group against 14896091 for the parent in the prior year)
- Right: Returned negative net assets for both the group and the parent

### tier3-09727592

**Tool calling: passed.** Group and parent balance sheets. It returned both for both years in one call and passed, including the parent's prior-year positive net assets against the group's negative ones. ($0.16, 1 requests, 11 s)
- Right: Returned the parent's investments of 40275, while the group has none
- Right: Got the sign right when the parent's prior net assets (783514) were positive and the group's negative

### tier4-05840865

**Tool calling: passed.** Staff costs and creditor breakdowns for the group and the parent. It mapped the note lines to categories, including zero current-year amounts where the prior year had a figure, and passed. ($0.15, 1 requests, 11 s)
- Right: Returned `bank_loans_and_overdrafts` as 0 where the prior year was 10251
- Right: Split finance leases into within and after one year for both the group and the parent

### tier4-NI626135

**Tool calling: passed.** Northern Ireland group: staff costs and creditor notes for the group and the parent. It got all the categories right, including after-one-year bank loans of 0 against a prior 5836, and passed. ($0.16, 1 requests, 11 s)
- Right: Recorded zero current-year amounts where only the prior year had a value
- Right: Kept the group and parent amounts owed to group undertakings apart

### tier5-12026946

**Tool calling: passed.** The largest task: company details, directors, group and parent statements, staff costs and creditors. It finished in one call and passed (cost $0.203). ($0.20, 1 requests, 21 s)
- Right: Listed all 4 directors
- Right: Got the large share premium, the deficit reserves and the separate parent balance sheet right
- Right: Signed the prior tax credit (-51830) correctly

### tier5-NI037684

**Tool calling: passed.** Medium-sized group with a parent: full extraction in one call. It passed, including the creditor lines owed to directors. ($0.14, 1 requests, 17 s)
- Right: Set accounts_type to `medium` and consolidated to true
- Right: Kept the small group-versus-parent differences in the creditor notes apart (other creditors prior: 103090 for the group against 102990 for the parent)
