---
title: "GPT-5.6 Terra 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-5.6-terra/structured_output/
---

# GPT-5.6 Terra 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-5.6-terra/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-5.6-terra/pydantic_ai.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | ---- |
| Tool calling | 90%   | 9 of 10      | $0.54 | 10       | 10         | 62 s |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

gpt-5.6-terra passed 9 of 10 cases, all in normal tool calling. Every case took one request and cost $0.043–$0.067. There were no retries and no provider errors. The one failure, tier4-05840865, came from re-classifying a figure instead of copying it.

#### Where it does well

- **Scaling and signs.** Every £000 filing (tier1-07054261, tier1-11022760, tier2-SC121467) was multiplied by 1,000 correctly. Deficits, losses and tax credits came out negative, e.g. prior `tax` -571000 and -138000. Creditors and costs stayed positive.
- **Group vs parent.** All four cases with a separate parent (tier3 ×2, tier5 ×2) kept the two sets of figures apart. That includes small differences such as parent prior `other` creditors 102990 vs group 103090 (NI037684), and a parent whose net assets flipped from positive to negative (tier3-09727592).
- **Zeros vs nulls.** It used 0 where the accounts print a dash or zero (`called_up_share_capital` 0, after-one-year bank loans 0) and `null` for lines that are absent.
- **Metadata.** It got the company metadata and the directors right in both tier5 cases, including `accounts_type` `medium`.

#### Mistakes it makes

- **Computing a figure instead of copying it (1 case).** In tier4-05840865, note 16 prints group `Other creditors` 1,278,154 (2024: 820,961). A sentence below the note says director loans of £48,817 (2024: £25,407) are included in that figure. The model made a separate `amounts_owed_to_directors` line and returned `other` as 1229337 / 795554. That breaks the rule "do not compute a figure the accounts do not show". The same category was right in NI037684, where the accounts list directors as their own line. So the model reads narrative notes closely but does not hold back from turning them into new lines.
- **Small unscored extras.** It filled in some fields the scorer does not check, such as `intangible_assets` 0 in tier3-09727592 and group `creditors_after_one_year` in tier3-05959188. These did no harm, but they show a lean towards filling every field.

## Runs

### tier1-07054261

**Tool calling: passed.** Single-company full accounts in £000. It returned all balance sheet and P&L figures for both years, scaled by 1,000 with the deficits signed correctly, in one request. Passed. ($0.060, 1 requests, 5 s)
- Right: Multiplied every £000 figure by 1,000, e.g. `creditors_within_one_year` 20446000
- Right: Signed the deficits negative (`net_assets` -6187000, `profit_and_loss_reserve` -8457000) and the prior tax credit as `tax` -138000
- Right: Left unshown lines such as `stocks` and `provisions` as `null`

### tier1-11022760

**Tool calling: passed.** Full accounts in £000 with net liabilities. It extracted both years in one request. Passed. ($0.043, 1 requests, 6 s)
- Right: Returned `called_up_share_capital` as 0, not null
- Right: Got prior `total_assets_less_current_liabilities` 26107000 positive while `net_assets` was -20588000
- Right: Recorded `other_operating_income` with a prior value of 0

### tier2-11600506

**Tool calling: passed.** Group balance sheet and P&L in whole pounds. All scored fields matched in one request. Passed. ($0.049, 1 requests, 4 s)
- Right: Kept group figures exact to the pound, e.g. `interest_receivable` 91
- Right: Extracted the extra lines `provisions` and `creditors_after_one_year` as well

### tier2-SC121467

**Tool calling: passed.** Group accounts in £000 with a prior-year loss and a tax credit. Correct in one request. Passed. ($0.051, 1 requests, 5 s)
- Right: Returned the prior `tax` as -571000 (a credit) and `profit_before_tax` as -1678000
- Right: Captured `distribution_costs` in both years

### tier3-05959188

**Tool calling: passed.** Group and parent balance sheets for both years. It kept the two entities' figures apart. Passed. ($0.059, 1 requests, 4 s)
- Right: Separated the parent figures (`creditors_after_one_year` 34780864, `investments` 2467) from the group figures (34844638, null)
- Right: Signed both sets of reserves negative
- Mistake: Gave group `creditors_after_one_year`, which the scorer does not check. Harmless extra data.

### tier3-09727592

**Tool calling: passed.** Group and parent balance sheets where the parent's net assets went from positive to negative. All matched. Passed. ($0.054, 1 requests, 6 s)
- Right: Got parent prior `net_assets` 783514 positive and current -1632236
- Right: Returned parent prior `investments` as 0
- Mistake: Filled `intangible_assets` with 0 where the scorer expects nothing. It was not scored, so no harm.

### tier4-05840865

**Tool calling: failed.** Staff costs and creditors notes for the group and the parent. Note 16 shows group `Other creditors` of 1,278,154 (2024: 820,961). The model split the £48,817 (2024: £25,407) of director loans, mentioned only in the narrative under the note, into its own `amounts_owed_to_directors` line and returned `other` as 1229337 / 795554. Failed. ($0.051, 1 requests, 7 s)
- Right: Staff costs for the group and the parent were correct, including the totals
- Right: The other group creditor lines (trade 2215873, corporation tax 219246, accruals 329617, finance leases 59134) matched
- Right: Group `creditors_within_one_year` 4229724 matched
- Mistake: In its only response, it derived `other` within one year as 1,278,154 − 48,817 = 1229337 (prior 820,961 − 25,407 = 795554) instead of using the `Other creditors` line as printed. The handbook says to take each figure from the accounts and not compute one they do not show. It should have reported `other` as 1278154 / 820961 and left out the directors line, which the table does not show.

### tier4-NI626135

**Tool calling: passed.** Group and parent staff costs and creditors, including after-one-year bank loans of 0. All lines matched. Passed. ($0.054, 1 requests, 5 s)
- Right: Kept the zero current-year bank loans after one year with prior 5836
- Right: Got the parent's `amounts_owed_to_group` 10067741 separate from the group's 3668476

### tier5-12026946

**Tool calling: passed.** Full extraction: company metadata, directors, group and parent balance sheets, P&L, staff costs and creditors. Done in one request. Passed. ($0.067, 1 requests, 10 s)
- Right: Listed all four directors
- Right: Got the group P&L right, including the prior tax credit of -51830
- Right: Got parent prior `creditors_after_one_year` 157084, which the group-only figures do not show

### tier5-NI037684

**Tool calling: passed.** Full extraction for a medium-sized group in Northern Ireland. Done in one request. Passed. ($0.050, 1 requests, 9 s)
- Right: Classified `accounts_type` as `medium`
- Right: Kept `amounts_owed_to_directors` as a separate line, which matched here because the accounts show it as its own line
- Right: Got small parent/group differences right, e.g. prior `other` 102990 vs 103090
