---
title: "GPT-6.2 Astra 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/gpt-6.2-astra/structured_output/
---

# GPT-6.2 Astra 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/gpt-6.2-astra/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/gpt-6.2-astra/pydantic_ai.md

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

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

9 of 10 cases passed, all in tool-calling mode; the benchmark has no code-mode runs here. Every case was a single request: the model read the accounts text and made one `accounts` call, with no retries and no validation errors. Cost was $0.17–$0.25 per case, about $2.03 in total. The one failure was a single field in `tier1-11022760`.

#### Where it does well

- **Scaling.** Accounts presented in £000 were multiplied by 1,000 every time (`tier1-07054261`, `tier1-11022760`, `tier2-SC121467`).
- **Signs.** Deficits were negative only on net figures, profits and reserves, while costs, creditors and interest payable stayed positive. Tax credits were signed correctly: `tax` -138000, -571000 and -51830.
- **Group versus parent.** All six group cases (tiers 3–5) kept the two sets apart, down to small differences such as `other` creditors 103090 (group) against 102990 (parent) in `tier5-NI037684`.
- **Notes.** Creditor lines were mapped to categories and due dates with both current and prior amounts, including rows where the current amount is 0 (`bank_loans_and_overdrafts` 0 / 5836 in `tier4-NI626135`).
- **Whole-set extraction.** Both tier 5 cases passed in one call, with directors, `accounts_type` (`medium` for NI037684) and audit status correct.

#### Mistakes it makes

- **Note over statement (1 case).** In `tier1-11022760` the balance sheet shows `Called up share capital | 20 | - | -` in £'000. The model went to note 20 (`0.10 | 0.10` in £'000) and returned `called_up_share_capital` as 100 for both periods; 0 was expected. The figure is defensible from the note, but the benchmark wants the balance sheet line as shown. Nothing told the model it was wrong, since the result was accepted.
- **0 instead of `null` (6 cases).** It often returned 0 for lines such as group `investments` or `intangible_assets`. These fields are not checked, and I did not verify them against the accounts, so this is a caution, not a confirmed error.
- **Extra row (1 case).** `tier5-12026946` included a group `amounts_owed_to_group` row of 0 / 0 that is not in the expected set; it did not affect the result.

With one request per case and no reasoning recorded, there is no evidence of how the model would handle a failed check.

## Runs

### tier1-07054261

**Tool calling: passed.** One request: read the Cube Logic accounts and made a single `accounts` call with company details, both balance sheets and both profit and loss accounts. Passed. ($0.23, 1 requests, 9 s)
- Right: Scaled £000 figures by 1,000 (e.g. `turnover` 16382000).
- Right: Signed the deficits correctly: `net_current_assets` -8967000, `profit_and_loss_reserve` -8457000, `operating_profit` -940000.
- Right: Returned the prior-year tax credit as `tax` -138000 and the 2025 nil tax as 0, per the handbook's tax-credit rule.
- Right: Kept costs positive (`cost_of_sales` 9908000, `interest_payable` 3000).

### tier1-11022760

**Tool calling: failed.** One request and a single `accounts` call for TaskUs Limited. Every checked field matched except `called_up_share_capital`, returned as 100 in both periods where 0 was expected, so the case failed. ($0.17, 1 requests, 9 s)
- Right: All other balance sheet and profit and loss figures matched, scaled from £000, with correct signs (`net_assets` -20029000, prior `profit_before_tax` -1230000).
- Right: Read the bracketed `(312)` and `(632)` on the `Tax (charge)/credit` line as charges: `tax` 312000 and 632000.
- Right: Returned prior `other_operating_income` as 0 for the dash shown.
- Mistake: In the only `accounts` call, `balance_sheet.called_up_share_capital` and `prior_balance_sheet.called_up_share_capital` were set to 100. The balance sheet line reads `Called up share capital | 20 | - | -` in £'000; the model went instead to note 20 (`100 Ordinary shares ... | 0.10 | 0.10` in £'000) and converted 0.10 to £100. The expected value follows the balance sheet face: 0. The model's figure is defensible from the note, but it should have used the balance sheet line as shown.
- Mistake: No validation error was returned (`Final result processed.`), so it had no chance to correct.

### tier2-11600506

**Tool calling: passed.** One request and a single `accounts` call with the group's consolidated balance sheet and profit and loss account for both periods. Passed. ($0.19, 1 requests, 7 s)
- Right: Group figures in whole pounds matched, including deficits (`net_current_assets` -6090208, `net_assets` -2896388, `profit_and_loss_reserve` -2896788).
- Right: Prior `total_assets_less_current_liabilities` kept positive at 1430307 while net assets were negative.
- Mistake: Returned `investments` as 0 in both periods rather than `null`; the field is not checked, so I could not confirm whether the accounts show the line.

### tier2-SC121467

**Tool calling: passed.** One request and a single `accounts` call with the group balance sheet and profit and loss account for both periods, from accounts in £000. Passed. ($0.19, 1 requests, 8 s)
- Right: Multiplied £000 figures by 1,000 throughout (`current_assets` 13197000).
- Right: Prior-year loss and tax credit signed correctly: `profit_before_tax` -1678000, `tax` -571000, `profit_after_tax` -1107000.
- Right: `profit_and_loss_reserve` negative (-1296000) while `shareholders_funds` positive (8263000).
- Mistake: Returned `investments` 0 and current `creditors_after_one_year` 0 rather than `null`; unchecked fields, not verified against the accounts.

### tier3-05959188

**Tool calling: passed.** One request and a single `accounts` call with the group and parent company balance sheets for both periods. Passed. ($0.25, 1 requests, 11 s)
- Right: Kept group and parent figures apart: group `tangible_assets` 379315 against parent 9602; group `creditors_within_one_year` 2483825 against parent 3852856.
- Right: Parent-only `investments` 2467 and 2446 returned for the parent.
- Right: Large deficits signed correctly (`profit_and_loss_reserve` -25824630 group, -27745666 parent).
- Mistake: Group `investments` returned as 0 rather than `null`; unchecked.

### tier3-09727592

**Tool calling: passed.** One request and a single `accounts` call with the group and parent company balance sheets for both periods. Passed. ($0.18, 1 requests, 9 s)
- Right: Separated group from parent correctly, including the parent's swing from prior `net_assets` 783514 to -1632236.
- Right: Parent `investments` 40275 current and 0 prior, matching expected.
- Right: Small share capital in whole pounds read exactly (252 and 250).
- Mistake: Returned `intangible_assets` 0 and group `investments` 0 instead of `null`; unchecked fields.

### tier4-05840865

**Tool calling: passed.** One request and a single `accounts` call with staff costs and creditors notes for the group and the parent company. Passed. ($0.19, 1 requests, 9 s)
- Right: Mapped creditor note lines to categories with both `amount` and `prior_amount`, e.g. group `bank_loans_and_overdrafts` 0 / 10251 and `finance_leases` 59134 / 31018.
- Right: Split parent finance leases by due date: 11658 within one year, 28174 after.
- Right: Staff cost totals matched (group 5370606, parent 174680).

### tier4-NI626135

**Tool calling: passed.** One request and a single `accounts` call with staff costs and creditors notes for the group and the parent company. Passed. ($0.21, 1 requests, 10 s)
- Right: Ten group creditor rows across both due dates matched, including the `bank_loans_and_overdrafts` after-one-year row with 0 current and 5836 prior.
- Right: Group and parent `amounts_owed_to_group` kept distinct (3668476 against 10067741).
- Right: Totals matched: group `creditors_within_one_year` 15752489, parent 17897307.

### tier5-12026946

**Tool calling: passed.** One request and a single `accounts` call returning the whole set (company details, directors, group and parent balance sheets, group profit and loss, staff costs, creditors) for Cambium Group UK Holdings. Passed. ($0.25, 1 requests, 18 s)
- Right: All four directors returned.
- Right: Group and parent statements separated (group `net_assets` 1427969, parent 39954968).
- Right: Tax signed per period: `tax` 72816 charge in 2025, -51830 credit in 2024.
- Right: Parent creditors after one year given as 0 current, 157084 prior.
- Mistake: Added a group `amounts_owed_to_group` within-one-year row with `amount` 0 and `prior_amount` 0 that is not in the expected set; harmless here.

### tier5-NI037684

**Tool calling: passed.** One request and a single `accounts` call returning the whole set for John Mulholland Motors. Passed; cheapest of the two whole-set cases at $0.1782. ($0.18, 1 requests, 16 s)
- Right: `accounts_type` identified as `medium` and `consolidated` true.
- Right: Used the `amounts_owed_to_directors` category (18372 / 5938) for both group and parent.
- Right: Caught small group-versus-parent differences in creditors: `other` prior 103090 group against 102990 parent; `other_tax_and_social_security` 152260 against 151765.
- Mistake: Group `intangible_assets` and `investments` returned as 0 rather than `null`; unchecked fields.
