---
title: "GPT-5.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 70%; rank 34 of 44."
canonical: https://pydantic.dev/models/list/gpt-5.6-luna/structured_output/
---

# GPT-5.6 Luna on Pydantic AI - Structured output

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

| Mode         | Score | Tasks passed | Cost   | Requests | Tool calls | Time |
| ------------ | ----- | ------------ | ------ | -------- | ---------- | ---- |
| Tool calling | 70%   | 7 of 10      | $0.053 | 10       | 10         | 67 s |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

gpt-5.6-luna passed 7 of the 10 cases. All of them ran in tool-calling mode, and every case took a single request (one `accounts` call) costing about $0.004–0.006. There were no retries and no provider errors. All the passes were clean and needed no self-correction. All 3 failures come down to one habit: how the model handles lines the accounts show as '-' or explain only in narrative text.

#### Where it does well

- **Units and signs:** it converted £000 to pounds correctly in every £000 case (07054261, 11022760, SC121467). It gave negative signs to deficits, net liabilities and tax credits (for example -138000 and -571000).
- **Group vs parent:** all 4 tier-3/tier-5 cases kept the consolidated and parent company figures apart, including parent-only reserves and investments.
- **Company details:** it got the company type (including `medium`) and every director in both tier-5 cases.

#### Mistakes it makes

- **Dashes treated as missing (3 cases):**

  - 11022760: returned `called_up_share_capital` as 100 where the balance sheet shows `-`, and prior `other_operating_income` as `null` instead of 0.
  - 05840865: dropped the '-' rows for group `amounts_owed_to_group` and parent `bank_loans_and_overdrafts`.
  - NI626135: dropped the after-one-year bank loans row (current year '-', prior year 5,836) for both the group and the parent, which also lost a real prior-year figure.

  A line that the accounts show with a dash should be returned as 0.

- **Computed figures (1 case):** in 05840865 it subtracted a directors' amount mentioned in narrative text from 'Other creditors' (1,278,154 → 1,229,337) and reported it as a separate `amounts_owed_to_directors` category. That breaks the handbook rule against computing figures the accounts do not show.

The creditors-note tasks (tier 4) were the weakest: both cases failed. Every case in tiers 2, 3 and 5 passed.

## Runs

### tier1-07054261

**Tool calling: passed.** Took the £000 figures for Cube Logic's single-company accounts, multiplied them by 1,000, and returned everything in one `accounts` call. Passed. ($0.0061, 1 requests, 6 s)
- Right: Converted £000 to pounds correctly throughout
- Right: Gave negative signs to net liabilities and to the P&L deficit (`profit_and_loss_reserve` -8457000)
- Right: Gave the prior-year tax credit as -138000

### tier1-11022760

**Tool calling: failed.** Read the TaskUs £000 accounts in one call and got nearly every figure right. It failed on two lines that the accounts show as '-': it returned `called_up_share_capital` as 100 instead of 0, and prior `other_operating_income` as null instead of 0. ($0.0042, 1 requests, 6 s)
- Right: Took all balance sheet totals and P&L figures correctly from the £000 statements, including the prior year's `total_assets_less_current_liabilities` 26107000
- Right: Got the signs right on the net liabilities and the reserves
- Mistake: Balance sheet: the accounts show `Called up share capital | 20 | - | -`, but the model returned 100 for both years. The 100 seems to come from elsewhere in the accounts, perhaps the share capital note. In £000 accounts the '-' means 0, which is what it should have returned.
- Mistake: P&L: prior `Other operating income` is shown as '-', but the model returned `null` instead of 0, treating a dash for a line that is shown as if the line were missing

### tier2-11600506

**Tool calling: passed.** Returned the consolidated balance sheet and P&L for both years in one call. Passed. ($0.0050, 1 requests, 5 s)
- Right: Kept the group figures and their signs exactly as shown in pounds
- Right: Returned null for lines the accounts do not show (investments, share premium)

### tier2-SC121467

**Tool calling: passed.** Returned the £000 group figures for both years in one call. Passed. ($0.0051, 1 requests, 5 s)
- Right: Converted £000 to pounds correctly
- Right: Gave the prior-year loss and tax credit as negatives (-1678000, -571000)
- Right: Kept distribution costs separate from administrative expenses

### tier3-05959188

**Tool calling: passed.** Returned the group and parent company balance sheets for both years in one call. Passed. ($0.0064, 1 requests, 6 s)
- Right: Kept the group and parent company statements apart, including the parent's own intangible assets and investments
- Right: Kept negative signs on the deficits for both entities

### tier3-09727592

**Tool calling: passed.** Returned the group and parent balance sheets for both years in one call. Passed. ($0.0047, 1 requests, 5 s)
- Right: Kept the parent's investments (40275) and creditors after one year apart from the group's
- Right: Kept the small change in share capital (252 vs 250)

### tier4-05840865

**Tool calling: failed.** Extracted staff costs correctly, but split the group's 'Other creditors' line into its own `amounts_owed_to_directors` category and dropped rows that the creditors note shows as '-'. Failed. ($0.0053, 1 requests, 8 s)
- Right: Got staff costs right for both the group and the parent, in both years
- Right: Got the creditors totals right (group 4229724, parent 1808163)
- Mistake: The note shows `Other creditors | 1,278,154 | 820,961`. The model instead returned `other` 1229337 / 795554 plus a separate `amounts_owed_to_directors` 48817 / 25407, subtracting a figure it found in the narrative below the note. That breaks the rule against computing figures the accounts do not show. It should have reported `other` as 1278154 / 820961.
- Mistake: It left out the rows the note shows as '-': group `amounts_owed_to_group` 0/0 and parent `bank_loans_and_overdrafts` 0/0. Lines that are shown should be reported as 0.

### tier4-NI626135

**Tool calling: failed.** Returned all within-one-year creditors and staff costs correctly, but left out the after-one-year bank loans row (current year '-', prior year 5,836) for both the group and the parent. Failed. ($0.0053, 1 requests, 5 s)
- Right: Got every within-one-year creditor category right for both entities
- Right: Got the staff costs and both creditors totals right
- Mistake: Note 17 shows `Bank loans and overdrafts | 18 | - | 5,836 | - | 5,836`, but the model returned only the finance lease row for after one year. It should have included a `bank_loans_and_overdrafts` / `after_one_year` entry with amount 0 and prior_amount 5836 for both the group and the parent. It seems to have skipped the row because the current year is '-', which also lost a non-zero prior-year figure.

### tier5-12026946

**Tool calling: passed.** Returned all the sections for Cambium (company details, directors, group and parent statements, staff costs, creditors) in one call. Passed. ($0.0057, 1 requests, 10 s)
- Right: Listed all four directors
- Right: Kept the group and parent balance sheets apart, including the parent's own reserves (-4529857)
- Right: Gave the prior-year tax credit as -51830

### tier5-NI037684

**Tool calling: passed.** Returned everything for the John Mulholland Motors medium-sized group accounts in one call. Passed. ($0.0057, 1 requests, 10 s)
- Right: Classified the accounts as `medium`, consolidated
- Right: Kept the separate `amounts_owed_to_directors` creditor line that this note itself shows
- Right: Got the parent company creditor figures right where they differ slightly from the group's
