---
title: "GPT-6.1 Terra on Pydantic AI - Structured output"
description: "Extracting UK company accounts into a nested Pydantic model, checked against the filer's tags. Tool calling 100%; rank 1 of 44."
canonical: https://pydantic.dev/models/list/gpt-6.1-terra/structured_output/
---

# GPT-6.1 Terra on Pydantic AI - Structured output

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

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time    |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | ------- |
| Tool calling | 100%  | 10 of 10     | $0.26 | 10       | 10         | 1.8 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

`gpt-6.1-terra` passed all 10 cases (tiers 1 to 5) in tool-calling mode. Every case took exactly 1 request: one `accounts` call with the full answer, accepted first time. Cost ran from $0.0226 to $0.0311 per case, about $0.26 in total. No validation check ever fired, so the retry path was never exercised.

#### Where it does well

- **Scale.** The three cases in £000 (`tier1-07054261`, `tier1-11022760`, `tier2-SC121467`) were all multiplied by 1,000 correctly.
- **Signs.** Deficits were negative and costs positive throughout, for example `net_assets` -20029000 with `interest_payable` 1307000 in `tier1-11022760`. Tax credits were negative (-138000, -571000, -51830), while a tax charge on a loss stayed positive (632000).
- **Group against parent.** In the six cases asking for both, the columns were never mixed, even where figures were close (prior `intangible_assets` 14896135 against 14896091 in `tier3-05959188`; `other` 103090 against 102990 in `tier5-NI037684`).
- **Creditors notes.** Every scored `category` and `due` pair matched in the four cases with notes, including `amounts_owed_to_directors` and rows with a current 0 and a non-zero prior.

#### Mistakes it makes

None cost a point. All are in fields the benchmark did not score.

- **0 instead of `null`.** In 6 of 10 cases it filled lines the expected answer omits with 0 (`investments`, `intangible_assets`, `stocks`, `creditors_after_one_year`). The handbook asks for `null` for a line not shown.
- **Zero-padded creditor rows.** `tier5-12026946` has three all-zero rows and a `prior_amount` of 0 where no prior figure is expected.
- **One missed line.** `tier1-07054261` returned `balance_sheet.debtors` as `null` and the prior year as 10162000, although note 15 shows 9,658 beside 10,162.
- **Inconsistent empties.** Both tier 5 cases sent parent `staff_costs` as `{}` and `prior_staff_costs` as `null`.
- **Unchecked extras.** `tier1-11022760` returned `turnover`, `cost_of_sales`, `gross_profit` and `operating_profit`, which the expected answer does not list; I did not verify them.

If the scorer were stricter about 0 against `null`, the first two habits would matter.

#### Tool calling compared with code mode

Only tool-calling runs were supplied, so there is no comparison to make.

## Runs

### tier1-07054261

**Tool calling: passed.** Read the Cube Logic accounts and returned everything in a single `accounts` call; all scored fields matched and it passed in 1 request. ($0.029, 1 requests, 10 s)
- Right: Scaled every £000 figure by 1,000 (e.g. `intangible_assets` 2640000)
- 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 current `tax` 0
- Mistake: In the one `accounts` call it gave `balance_sheet.debtors` as `null` but `prior_balance_sheet.debtors` as 10162000. Note 15 shows 9,658 for 2025 beside 10,162 for 2024 (plus 134 due after one year), so the current figure was available. The field is not scored for this case, so it cost nothing.

### tier1-11022760

**Tool calling: passed.** Extracted TaskUs Limited's company details, balance sheet and profit and loss in one `accounts` call; passed in 1 request. ($0.023, 1 requests, 9 s)
- Right: Returned `called_up_share_capital` as 0, not `null`, in both years
- Right: Kept `interest_payable` positive (1307000) and signed the losses: `prior_profit_and_loss.profit_before_tax` -1230000, `profit_after_tax` -1862000
- Right: Treated the prior tax charge on a loss as a positive `tax` of 632000 rather than a credit
- Mistake: Also returned `turnover` 32402000, `cost_of_sales` 26177000, `gross_profit` 6225000 and `operating_profit` 2351000, which the expected answer does not list. They were not scored and I did not check them against the accounts.

### tier2-11600506

**Tool calling: passed.** Returned the Furat Acquisitions group balance sheet and profit and loss for both years in one `accounts` call; passed in 1 request. ($0.023, 1 requests, 7 s)
- Right: All 40 scored group figures matched, including `net_assets` -2896388 and `total_assets_less_current_liabilities` -857995
- Right: Carried `other_operating_income` (50000 and 16667) and the small `interest_receivable` of 91 exactly
- Mistake: Returned `investments` as 0 in both years for a line the expected answer leaves out; the handbook asks for `null` when a line is not shown. Not scored.

### tier2-SC121467

**Tool calling: passed.** Returned the Franke UK Holding group balance sheet and profit and loss in one `accounts` call, with the £000 figures scaled; passed in 1 request. ($0.024, 1 requests, 7 s)
- Right: Multiplied by 1,000 throughout (e.g. `called_up_share_capital` 9559000)
- Right: Signed the prior-year loss and tax credit correctly: `profit_before_tax` -1678000, `tax` -571000, `profit_after_tax` -1107000
- Right: Kept `distribution_costs` and `interest_payable` positive
- Mistake: Returned `investments` 0 and current `creditors_after_one_year` 0 where the expected answer has no such lines; unscored, but `null` is what the handbook asks for when a line is absent.

### tier3-05959188

**Tool calling: passed.** Returned both the group and the parent company balance sheets for the Tribe Payments accounts in one `accounts` call; all 56 scored fields matched in 1 request. ($0.031, 1 requests, 10 s)
- Right: Kept the group and parent columns apart: `tangible_assets` 379315 for the group against 9602 for the parent, and `creditors_within_one_year` 2483825 against 3852856
- Right: Picked up the parent-only `investments` (2467, prior 2446)
- Right: Got the near-identical prior intangibles right: 14896135 for the group, 14896091 for the parent
- Mistake: Returned group `investments` as 0 in both years rather than `null`; not scored.

### tier3-09727592

**Tool calling: passed.** Returned the group and parent balance sheets for Tyk Technologies in one `accounts` call; passed in 1 request. ($0.023, 1 requests, 9 s)
- Right: Handled the parent's sign change between years: `net_assets` -1632236 in the current year, 783514 in the prior year
- Right: Separated the reserves: `profit_and_loss_reserve` -32613535 for the group, -30571508 for the parent
- Right: Caught the share capital change from 250 to 252
- Mistake: Filled `intangible_assets` and group `investments` with 0 in all four balance sheets, and parent prior `investments` with 0, instead of `null`. Only the parent prior `investments` 0 is in the expected answer; the rest were unscored.

### tier4-05840865

**Tool calling: passed.** Returned the staff costs and creditors notes for the Drishaun Holdings group and parent in one `accounts` call; passed in 1 request. ($0.025, 1 requests, 13 s)
- Right: Classified every creditors line into the right `category` and `due`, for example parent `amounts_owed_to_group` 1538825 and `finance_leases` split 11658 within and 28174 after one year
- Right: Staff cost totals matched for both entities and both years (group `total` 5370606, parent 174680)
- Right: Reported the group bank loan as `amount` 0 with `prior_amount` 10251, keeping the comparative
- Mistake: None found. It added group after-one-year rows (`finance_leases` 130386, `other` 133857) and `creditors_after_one_year` 264243, which the expected answer does not score.

### tier4-NI626135

**Tool calling: passed.** Returned the staff costs and creditors notes for the Diamond Trucks group and parent in one `accounts` call; passed in 1 request. ($0.026, 1 requests, 10 s)
- Right: All 20 group and 20 parent creditor amounts matched, including `bank_loans_and_overdrafts` after one year with `amount` 0 and `prior_amount` 5836
- Right: Kept the two columns apart: `amounts_owed_to_group` 3668476 for the group, 10067741 for the parent
- Right: Totals matched: `creditors_within_one_year` 15752489 and 17897307
- Mistake: None found.

### tier5-12026946

**Tool calling: passed.** Returned the whole Cambium Group set (company details, directors, group and parent statements, staff costs, creditors) in one large `accounts` call; passed in 1 request. ($0.031, 1 requests, 18 s)
- Right: All four directors listed
- Right: Group loss figures signed correctly (`operating_profit` -4462968, `profit_and_loss_reserve` -43056856) with the prior `tax` credit as -51830
- Right: Parent `net_assets` 39954968 and its creditors rows (e.g. `amounts_owed_to_group` 6050000) kept separate from the group's
- Mistake: Padded the creditors lists with all-zero rows: group `amounts_owed_to_group` 0/0, parent `other_tax_and_social_security` 0/0 and parent `other` 0/0. Not scored.
- Mistake: Gave parent `trade_creditors.prior_amount` as 0 where the expected answer has no prior figure, and parent `stocks` and current `creditors_after_one_year` as 0 rather than `null`. Not scored.
- Mistake: Sent parent `staff_costs` as an empty object `{}` and `prior_staff_costs` as `null`, an inconsistent way to say the same thing.

### tier5-NI037684

**Tool calling: passed.** Returned the whole John Mulholland Motors set for group and parent in one `accounts` call; passed in 1 request. ($0.023, 1 requests, 16 s)
- Right: Identified `accounts_type` as `medium` and `consolidated` as true
- Right: Left group `fixed_assets` and `investments` unset, matching the expected answer, while giving the parent `investments` 300 and `fixed_assets` 3599359
- Right: Mapped the director loan line to `amounts_owed_to_directors` (18372, prior 5938) for both entities
- Right: Caught the small group/parent differences, e.g. `other` prior 103090 against 102990
- Mistake: Returned `intangible_assets` 0 in all four balance sheets and parent prior `investments` 0 instead of `null`; not scored.
- Mistake: Parent `staff_costs` sent as `{}` and `prior_staff_costs` as `null`, the same inconsistency as in tier5-12026946.
