---
title: "Claude Haiku 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 60%; rank 35 of 44."
canonical: https://pydantic.dev/models/list/claude-haiku-5.5/structured_output/
---

# Claude Haiku 5.5 on Pydantic AI - Structured output

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

| Mode         | Score | Tasks passed | Cost   | Requests | Tool calls | Time    |
| ------------ | ----- | ------------ | ------ | -------- | ---------- | ------- |
| Tool calling | 60%   | 6 of 10      | $0.048 | 10       | 10         | 1.7 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

6 of 10 cases passed, all in tool-calling mode. Every run was a single request: the model read the accounts and made one `accounts` call, at $0.004–$0.006 per case. It never received a validation error, so it never had a chance to correct anything. All four failures are rule slips; no figure was misread from the document.

#### Where it does well

- **Transcription accuracy.** In all 10 cases, every figure it placed in a correctly named field matches the accounts, apart from scale in three cases. That includes the 130-field `tier5-NI037684`.
- **Group against parent.** All four tier 3 and tier 4 cases passed. It kept consolidated and company-only columns apart, even where they differ by small amounts (`other` creditors 103090 against 102990).
- **Signs.** Deficits, losses and tax credits are negative, while costs, creditors and interest payable stay positive, in every case.
- **Creditor notes.** Categories and due periods were mapped correctly in all four cases that asked for them.

#### Mistakes it makes

- **Ignores the £000 rule (3 of 4 failures).** In `tier1-07054261`, `tier1-11022760` and `tier2-SC121467` the statements are headed `£000` or `£'000`, and the model returned the printed numbers unscaled (`cash: 1687` instead of `1687000`). It failed every case presented in thousands and passed all but one presented in whole pounds.
- **Invents a field name (1 failure).** In `tier5-12026946` it wrote the group figure under `net_current_liabilities`, copying the label in the accounts, instead of `net_current_assets`. The key was dropped and the field came out `null` for both periods, although the values were right. The parent balance sheet in the same call used the correct key.
- **Zeros and nulls for blanks.** It sometimes returns `0` where the accounts show nothing (`creditors_after_one_year: 0` in `tier2-SC121467` and `tier5-12026946`, prior `investments: 0` in `tier5-NI037684`). Once it did the reverse, returning `null` for a dash where `0` was expected (`tier1-11022760`). Whether these are scored is not visible; none changed a result on its own.
- **No self-checking.** With one request per case and no recorded reasoning, there is no sign that it checked units or field names before answering.

## Runs

### tier1-07054261

**Tool calling: failed.** One request: a single `accounts` call with every figure copied as printed in the £000 statements (e.g. `turnover: 16382`, `net_assets: -6187`). Failed because nothing was multiplied by 1,000. ($0.0051, 1 requests, 9 s)
- Right: Company details, dates, `audited` and `consolidated` all correct
- Right: Every figure matches the expected value apart from scale, and signs are right (`operating_profit: -940`, `tax: -138` as a prior-year credit, `profit_and_loss_reserve: -8457`)
- Mistake: In the only assistant turn, the `accounts` call returned figures in thousands (`cash: 1687` instead of `1687000`) although the statements are headed `£000 | £000` and the handbook says to multiply by 1,000. It should have scaled every money field.

### tier1-11022760

**Tool calling: failed.** One request: a single `accounts` call with figures copied as printed from statements headed `£'000`. Failed because the amounts were left in thousands. ($0.0042, 1 requests, 9 s)
- Right: Company details and periods correct
- Right: Signs handled correctly: `net_current_assets: -36631`, `profit_before_tax: -1230` prior, and tax kept positive as a charge in both years (`312`, `632`)
- Mistake: In the only assistant turn, every money field was left in thousands (`investments: 16705` instead of `16705000`, `tangible_assets: 1` instead of `1000`) despite the `£'000` column headers; it should have multiplied by 1,000.
- Mistake: Prior `other_operating_income` returned as `null` where the accounts show a dash and the expected value is `0`.

### tier2-11600506

**Tool calling: passed.** One request: a single `accounts` call with the group balance sheet and profit and loss for both periods, in whole pounds. Passed. ($0.0042, 1 requests, 7 s)
- Right: All 40 expected fields match, including negative `net_current_assets: -6090208`, `total_assets_less_current_liabilities: -857995` and `profit_and_loss_reserve: -2896788`
- Right: Costs and interest payable returned positive, as the handbook requires

### tier2-SC121467

**Tool calling: failed.** One request: a single `accounts` call with the group figures copied as printed from statements headed `£000`. Failed because nothing was multiplied by 1,000. ($0.0047, 1 requests, 8 s)
- Right: All figures match expected apart from scale, including the prior-year loss (`operating_profit: -1818`, `profit_before_tax: -1678`) and the prior tax credit `tax: -571`
- Right: Negative `profit_and_loss_reserve` (`-1296`, `-1176`) correct
- Mistake: In the only assistant turn, figures were left in thousands (`turnover: 34021`, `called_up_share_capital: 9559` instead of `9559000`) although the group statement of comprehensive income is headed `£000 | £000`; it should have multiplied by 1,000.
- Mistake: Returned `creditors_after_one_year: 0` for the current year rather than `null`; not among the expected fields.

### tier3-05959188

**Tool calling: passed.** One request: a single `accounts` call with group and parent company balance sheets for both periods. Passed. ($0.0052, 1 requests, 8 s)
- Right: Group and parent figures kept apart correctly (e.g. `tangible_assets` 379315 group against 9602 parent; prior `intangible_assets` 14896135 against 14896091)
- Right: Large deficits signed correctly (`net_assets: -13564855` group, `-15485891` parent)

### tier3-09727592

**Tool calling: passed.** One request: a single `accounts` call with group and parent company balance sheets for both periods. Passed. ($0.0044, 1 requests, 9 s)
- Right: Group and parent separated correctly, including parent-only `investments: 40275` and the parent's prior positive `net_assets: 783514` against the group's `-1437569`
- Right: Share capital change picked up (`252` against prior `250`)

### tier4-05840865

**Tool calling: passed.** One request: a single `accounts` call with staff costs and the creditor notes for group and parent. Passed. ($0.0043, 1 requests, 9 s)
- Right: All creditor lines mapped to the expected categories for both entities, with a zero current amount kept for the group bank loan row (`amount: 0`, `prior_amount: 10251`)
- Right: Staff cost totals agree with their parts for both entities and both years

### tier4-NI626135

**Tool calling: passed.** One request: a single `accounts` call with staff costs and creditors for group and parent across both due periods. Passed. ($0.0048, 1 requests, 10 s)
- Right: Ten creditor rows each for group and parent, all matching expected, including the after-one-year bank loan row with `amount: 0`, `prior_amount: 5836`
- Right: Group and parent totals distinguished (`creditors_within_one_year` 15752489 against 17897307)

### tier5-12026946

**Tool calling: failed.** One request: a single `accounts` call with the whole set of accounts for group and parent. Failed because group `net_current_assets` came out `null` for both periods. ($0.0064, 1 requests, 20 s)
- Right: Every other group and parent figure matches expected, including directors, staff costs and the creditor notes
- Right: The parent balance sheets used the correct key (`net_current_assets: 21443697`, `18907064`)
- Mistake: In the only assistant turn, the group `balance_sheet` and `prior_balance_sheet` used an invented key `net_current_liabilities` (`-14613956`, `-15203694`) instead of the schema field `net_current_assets`. The key was dropped and the output has `net_current_assets: null`. The values were right; the handbook says a line under a different label still counts, so they belonged in `net_current_assets`.
- Mistake: Filled blanks with zeros in the parent: `creditors_after_one_year: 0`, a `trade_creditors` `prior_amount: 0` and a `finance_leases` after-one-year `amount: 0`, where expected has no value.

### tier5-NI037684

**Tool calling: passed.** One request: a single `accounts` call with the whole set of accounts for group and parent. Passed. ($0.0050, 1 requests, 14 s)
- Right: About 130 expected fields all match, including near-identical group and parent creditor rows that differ by small amounts (`other` prior 103090 against 102990; `other_tax_and_social_security` 152260 against 151765)
- Right: `accounts_type: medium` and both directors identified
- Mistake: Returned parent prior `investments: 0` where expected has no value; it did not affect the result.
