---
title: "GPT-6 Luna 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-luna/structured_output/
---

# GPT-6 Luna 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-luna/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-luna/pydantic_ai.md

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

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. Every case was a single request: the model read the accounts and made one `accounts` call, with no retries and no check errors returned. Cost was $0.0022–$0.0036 per case, about $0.027 in total. The one failure (`tier4-05840865`) was a rule violation, not a misreading of the document.

#### Where it does well

- **Scale and signs.** All three £000 filings (`tier1-07054261`, `tier1-11022760`, `tier2-SC121467`) were multiplied by 1,000 correctly. Bracketed costs, creditors and interest stayed positive; net figures, reserves and tax credits went negative (e.g. prior `tax` -138000, -571000, -51830). In `tier1-11022760` it read `Tax (charge)/credit | (632)` as a charge, not a credit.
- **Group versus parent.** In the four tier 3–5 passes with both entities, it kept the columns apart, including near-identical figures (`tier3-05959188` prior intangibles 14896135 vs 14896091; `tier5-NI037684` prior `other` 103090 vs 102990).
- **Large outputs in one shot.** The two tier 5 cases returned roughly 150 fields each, all matching.
- **Not inventing sections.** Parent `staff_costs` was left empty in both tier 5 cases where no parent note exists.

#### Mistakes it makes

- **Computing a figure from narrative text (1 failure).** In `tier4-05840865`, note 16 shows group `Other creditors | 1,278,154 | 820,961`. A sentence under the table says director loan accounts of £48,817 (2024: £25,407) are included. The model added an `amounts_owed_to_directors` row and returned `other` as 1229337 / 795554, a subtraction the accounts do not show. It should have returned the line as printed. It was also inconsistent: the £835,491 of invoice discounting mentioned in the same paragraph stayed in `other`.
- **Zero versus `null` (no failures).** It was loose in four passing cases: `null` or omitted for a dash where 0 was expected (`tier1-07054261`, `tier1-11022760`), and 0 for lines not expected at all (`tier2-SC121467`, `tier5-12026946`). The scorer accepted all of these.
- **No self-check.** With one request per case and no validation error fed back, the failing case had no second pass.

#### Tool calling compared with code mode

Only tool-calling mode was run for this benchmark; there are no code-mode cases to compare.

## Runs

### tier1-07054261

**Tool calling: passed.** One request: read the Cube Logic accounts (presented in £000) and returned company details, balance sheet and P&L for both periods in a single `accounts` call. Passed. ($0.0028, 1 requests, 4 s)
- Right: Scaled every £000 figure by 1,000 (e.g. `intangible_assets` 2640000, `creditors_within_one_year` 20446000).
- Right: Signs handled per the handbook: `net_current_assets` -8967000, `profit_and_loss_reserve` -8457000, `operating_profit` -940000, prior `tax` -138000 as a credit, while costs stayed positive.
- Right: Company metadata (`accounts_type` full, `consolidated` false, `audited` true, both periods) all correct.
- Mistake: Returned prior `interest_receivable` as `null` where the expected value is 0; the scorer accepted it, so this did not cost the case.

### tier1-11022760

**Tool calling: passed.** One request: returned TaskUs Limited's company details, balance sheet and P&L for both periods (£000 scaled) in a single `accounts` call. Passed. ($0.0022, 1 requests, 4 s)
- Right: All £'000 figures multiplied by 1,000; `called_up_share_capital` returned as 0 and `share_premium` as `null`.
- Right: Bracketed creditors and interest kept positive (`interest_payable` 1307000) while net figures went negative (`net_current_assets` -36631000, prior `profit_before_tax` -1230000).
- Right: Prior-year line `Tax (charge)/credit on loss | (632)` correctly read as a 632000 charge, not a credit, consistent with profit after tax of -1862000.
- Right: Also returned `turnover` 32402000, `cost_of_sales` 26177000, `gross_profit` 6225000 and `operating_profit` 2351000; these match the statement of comprehensive income but are not in the expected set.
- Mistake: Omitted prior `other_operating_income` (shown as `-`, expected 0); accepted by the scorer.

### tier2-11600506

**Tool calling: passed.** One request: returned the group's consolidated balance sheet and P&L for both periods in a single `accounts` call. Passed. ($0.0025, 1 requests, 5 s)
- Right: All 40 expected group fields matched, including negative `net_current_assets` -6090208, `total_assets_less_current_liabilities` -857995 and `profit_and_loss_reserve` -2896788.
- Right: Kept figures in whole pounds (no wrong £000 scaling).
- Right: Filled extra lines beyond the expected set (`stocks`, `debtors`, `creditors_after_one_year` 1691461, `provisions` 346932, `turnover`, `gross_profit`, `operating_profit`).

### tier2-SC121467

**Tool calling: passed.** One request: returned Franke UK Holding's consolidated balance sheet and P&L for both periods (£000 scaled) in a single `accounts` call. Passed. ($0.0025, 1 requests, 5 s)
- Right: Scaled £000 figures correctly (e.g. `called_up_share_capital` 9559000).
- Right: Prior-year loss handled correctly: `operating_profit` -1818000, `profit_before_tax` -1678000, `tax` -571000 as a credit, `profit_after_tax` -1107000.
- Right: `distribution_costs` and `administrative_expenses` kept positive.
- Mistake: Gave current `creditors_after_one_year` as 0 rather than `null`; not in the expected set, so unscored.

### tier3-05959188

**Tool calling: passed.** One request: returned both the group and the parent company balance sheets for both periods in a single `accounts` call. Passed. ($0.0031, 1 requests, 6 s)
- Right: Kept group and parent columns apart: group `tangible_assets` 379315 vs parent 9602; group `creditors_within_one_year` 2483825 vs parent 3852856.
- Right: Caught the small prior-year difference in intangibles between group (14896135) and parent (14896091).
- Right: Deficits signed correctly (`net_assets` -13564855 group, -15485891 parent).

### tier3-09727592

**Tool calling: passed.** One request: returned Tyk Technologies' group and parent balance sheets for both periods in a single `accounts` call. Passed. ($0.0024, 1 requests, 7 s)
- Right: All 54 expected fields matched, including the sign change in parent `net_assets` (-1632236 current, 783514 prior).
- Right: Parent prior `investments` returned as 0, matching expected.
- Right: Group and parent share capital/premium movements (250→252, 28153530→28167129) read correctly.

### tier4-05840865

**Tool calling: failed.** One request: returned Drishaun Holdings' staff costs and creditors notes for group and parent. Failed because it split the group's `Other creditors` line using a figure from narrative text. ($0.0026, 1 requests, 7 s)
- Right: All staff cost figures for group and parent, both periods, matched.
- Right: Parent creditors rows and totals (`creditors_within_one_year` 1808163, `creditors_after_one_year` 28174) matched.
- Right: Group totals and the other seven within-one-year rows were correct.
- Mistake: In the single `accounts` call, note 16 shows `Other creditors | 1,278,154 | 820,961` for the group, but the model returned `other` as 1229337 / 795554 plus an invented `amounts_owed_to_directors` row of 48817 / 25407. The 48,817 comes from the sentence under the table ("Included in other creditors due within one year are director loan accounts totalling £48,817 (2024: £25,407)"), and 1229337 is 1278154 − 48817, a figure the accounts do not show. It should have returned `other` as 1278154 / 820961 with no directors row, per "Do not compute a figure the accounts do not show".
- Mistake: It was inconsistent: the same paragraph says £835,491 of other creditors is invoice discounting, and it left that inside `other`.
- Mistake: No check error came back (`Final result processed.`), so with one request it had no chance to correct.

### tier4-NI626135

**Tool calling: passed.** One request: returned Diamond Trucks' staff costs and creditors notes for group and parent in a single `accounts` call. Passed. ($0.0027, 1 requests, 6 s)
- Right: All ten creditors rows per entity matched, including the zero-current / 5836-prior `bank_loans_and_overdrafts` after-one-year row.
- Right: Group and parent columns kept apart (e.g. `amounts_owed_to_group` 3668476 group vs 10067741 parent).
- Right: Left `other` as the note shows it (781030 group, 750000 parent) without splitting it.

### tier5-12026946

**Tool calling: passed.** One request: returned the whole Cambium Group set (company, directors, group and parent balance sheets, group P&L, staff costs, creditors) in a single `accounts` call. Passed. ($0.0036, 1 requests, 15 s)
- Right: About 150 expected fields matched in one call, the largest output in the set ($0.0036).
- Right: All four directors listed.
- Right: Group loss signed correctly (`operating_profit` -4462968, prior `tax` -51830 as a credit) and parent vs group creditors kept apart.
- Right: Returned parent `staff_costs` as `{}` / `null` rather than inventing a parent staff note.
- Mistake: Parent `creditors_after_one_year` given as 0 and parent prior `trade_creditors` as 0 where the expected set has no value; both accepted by the scorer.

### tier5-NI037684

**Tool calling: passed.** One request: returned the whole John Mulholland Motors set for group and parent in a single `accounts` call. Passed. ($0.0024, 1 requests, 10 s)
- Right: `accounts_type` correctly identified as `medium`, with both directors listed.
- Right: Used `amounts_owed_to_directors` (18372 / 5938) here, where the expected set also has it as its own row, alongside `other` 95665.
- Right: Picked up small group/parent differences in the creditors note (e.g. prior `other` 103090 vs 102990, prior `other_tax_and_social_security` 273134 vs 277314).
- Right: Parent prior `investments` left out where the accounts show none.
