---
title: "Qwen3.5-Flash on Pydantic AI - Structured output"
description: "Extracting UK company accounts into a nested Pydantic model, checked against the filer's tags. Tool calling 40%; rank 42 of 44."
canonical: https://pydantic.dev/models/list/qwen3.5-flash-02-23/structured_output/
---

# Qwen3.5-Flash on Pydantic AI - Structured output

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

| Mode         | Score | Tasks passed | Cost   | Requests | Tool calls | Time    |
| ------------ | ----- | ------------ | ------ | -------- | ---------- | ------- |
| Tool calling | 40%   | 4 of 10      | $0.049 | 20       | 19         | 7.3 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

`gateway/openrouter:qwen/qwen3.5-flash-02-23` passed **4/10 cases** on Structured output 0.3`: tier 1 `0/2`, tier 2 `1/2`, tier 3 `1/2`, tier 4 `0/2`, and tier 5 `2/2`. The supplied runs used 20 requests and cost $0.0488 total. There were no provider failures. All cases used normal tool calling.

The model often copied financial amounts accurately, but completeness and rule application were unreliable. Every final submission received `Final result processed.` from `accounts`, including all six benchmark failures.

#### Where it does well

It handled group-versus-parent separation well: the failures were not caused by swapping entities. It correctly scaled extracted `£000` amounts in Cube Logic, TaskUs and Franke, despite other errors in those cases.

Furat and John Mulholland passed on their first submissions. John Mulholland demonstrates broad extraction across company metadata, balance sheets, profit and loss, staff costs and comparative creditors. Both tier-4 cases also captured current and prior staff costs correctly.

Validation helped repair sign errors in four cases and a creditor transcription error in Drishaun.

#### Mistakes it makes

**Missing disclosed data affected five of six failed cases.** TaskUs lost three zero values; Franke omitted four cash/reserve figures; Tribe omitted eight printed subtotals; both tier-4 cases omitted every creditor comparative. These were available in the supplied accounts.

**Dates caused both tier-1 failures.** Cube Logic and TaskUs started their reporting periods too early, then changed comparative end dates to satisfy validation instead of correcting the underlying dates.

**Sign handling needed retries in four cases.** Franke required four submissions and reintroduced a previously corrected tax sign.

Passing results also deserve scrutiny. Tyk retained `null` for prior parent investments where the expected value was `0`. Cambium dropped a disclosed comparative lease row after an integer-type error; that row was outside the supplied expected checks. Engineers should independently check dates, disclosed zeros and comparative completeness rather than treating schema acceptance or a benchmark pass as proof of complete extraction.

## Runs

### tier1-07054261

**Tool calling: failed.** Submitted Cube Logic’s accounts through two `accounts` calls. The financial figures were correct after a tax-sign correction, but incorrect reporting dates caused the benchmark failure. ($0.0066, 2 requests, 73 s)
- Right: Correctly converted `£000` figures to pounds, including turnover `16382000`, fixed assets `2780000` and net liabilities `-6187000`.
- Right: After validation, corrected `prior_profit_and_loss.tax` from `138000` to the tax credit `-138000`, preserving profit after tax of `-10439000`.
- Mistake: The first `accounts` call set `company.period.start` to `2024-12-31` and `company.prior_period.start` to `2023-12-31`. The accounts’ equity statements show the correct starts as `2025-01-01` and `2024-01-01`.
- Mistake: On the second call, changed the correct comparative end date `2024-12-31` to `2024-12-30` to satisfy the adjacency check. It should have corrected the start dates from the accounts instead of changing the comparative year-end.
- Mistake: The first call treated the prior tax credit as a positive charge, requiring an avoidable retry.

### tier1-11022760

**Tool calling: failed.** Used three `accounts` calls for TaskUs, correcting liability and tax signs. The accepted submission still contained incorrect dates and omitted three disclosed zero values, so it failed. ($0.0062, 3 requests, 50 s)
- Right: Correctly scaled the financial statements, including investments `16705000`, current assets `13536000` and profit after tax `836000`.
- Right: The second call corrected current and prior creditors to positive amounts and changed prior tax from `-632000` to the disclosed charge `632000`.
- Mistake: The first call interpreted the current year as `2024-01-01` through `2025-12-31`, with a similarly overlapping comparative period. The second call repeated these dates despite validation feedback.
- Mistake: The third call changed only the comparative end to `2023-12-31`, attaching 2024 figures to 2023 metadata. It should have returned current dates `2025-01-01`–`2025-12-31` and comparative dates `2024-01-01`–`2024-12-31`.
- Mistake: Every submission used `null` for both periods’ `called_up_share_capital` and for `prior_profit_and_loss.other_operating_income`. Those rows are present with dashes and should be `0`.
- Mistake: The first call made all four creditor balances negative, including `-50167000`, and misclassified the prior tax charge as a credit. The handbook explicitly requires positive creditors and positive tax charges.

### tier2-11600506

**Tool calling: passed.** Extracted Furat Acquisitions’ consolidated statements in one successful `accounts` call. The benchmark passed without validation retries. ($0.0034, 1 requests, 54 s)
- Right: Selected the group statements rather than the separate company statements, returning cash `1320993` and net liabilities `-2896388`.
- Right: Captured the disclosed intangible-assets total `2828132`, fixed-assets subtotal `5232213` and current-assets subtotal `4665204`.
- Right: Handled signs correctly on the first submission: creditors `10755412`, tax charge `432692`, and profit after tax `520795`; also extracted the comparative figures correctly.

### tier2-SC121467

**Tool calling: failed.** Needed four `accounts` calls to resolve Franke’s tax signs. The final submission passed validation but failed the benchmark because both periods’ cash and profit-and-loss reserves were omitted. ($0.0085, 4 requests, 51 s)
- Right: Correctly converted `£000` amounts, including current fixed assets `4627000`, current assets `13197000` and net assets `8263000`.
- Right: Ultimately returned tax `299000` and comparative tax `-571000`, matching the tax note and reported profits.
- Mistake: All four calls omitted `cash` and `profit_and_loss_reserve` from both balance sheets, leaving them `null`. The group balance sheet explicitly shows cash `2855000`/`6958000` and reserves `-1296000`/`-1176000`; these should have been included.
- Mistake: The first call reversed both tax signs. The second fixed current tax but left prior tax wrong; the third fixed prior tax while reverting current tax to `-299000`. Only the fourth retained both corrections.
- Mistake: It should have consulted note 11’s charge/credit presentation and preserved verified corrections, instead of repeatedly switching signs.

### tier3-05959188

**Tool calling: failed.** Submitted Tribe Payments’ group and parent balance sheets once. It correctly separated the entities but omitted eight printed asset subtotals, causing failure despite tool acceptance. ($0.0022, 1 requests, 14 s)
- Right: Preserved entity-specific figures, including group tangible assets `379315` versus parent tangible assets `9602`, and parent investments `2467`.
- Right: Correctly reported group and parent net liabilities as `-13564855` and `-15485891`, with positive creditor balances.
- Mistake: The sole `accounts` call omitted `fixed_assets` and `current_assets` for both entities and both periods. The printed group totals are `15923313`/`15402922` and `7840295`/`3715968`; parent totals are `15556067`/`14956542` and `7591762`/`3513619`.
- Mistake: The extraction treated subtotals as something to avoid under the no-computation rule. These totals were already printed beneath the component rows, so it should have copied them directly.

### tier3-09727592

**Tool calling: passed.** Passed Tyk Technologies after a second `accounts` call corrected liability signs. The supplied pass result nevertheless includes one discrepancy against the expected values: prior parent investments remained `null` instead of `0`. ($0.0035, 2 requests, 21 s)
- Right: Kept group and parent figures separate, including current cash `2720339` versus `2017699` and fixed assets `1486` versus `41761`.
- Right: After validation identified four net-current-assets inconsistencies, corrected creditor and provision signs across all four balance sheets while preserving the disclosed net figures.
- Mistake: The first call made all eight creditor balances and all four provisions negative, including group current creditors `-4517103` and provisions `-5889`. Applying the handbook’s positive-liability convention initially would have avoided the retry.
- Mistake: Both calls returned `parent_company.prior_balance_sheet.investments: null`, although the investment row shows a dash and the expected value is `0`. The benchmark marked the run passed despite this discrepancy.

### tier4-05840865

**Tool calling: failed.** Extracted Drishaun’s staff costs correctly and repaired one creditor amount in a second `accounts` call. It failed because creditor comparatives and several zero-valued creditor rows were missing. ($0.0035, 2 requests, 21 s)
- Right: Correctly extracted all four staff-cost sets, including current group total `5370606` and current parent total `174680`.
- Right: Rechecked note 16 after validation reported creditor lines totaling `4543724` against `4229724`, and corrected group `other` creditors from `1592154` to `1278154`.
- Mistake: Both calls omitted `prior_amount` from every submitted creditor row. For example, group trade creditors should include `1818672`, parent amounts owed to group `1524980`, and parent long-term finance leases `39831`.
- Mistake: Both calls omitted the group’s bank-loan row (`amount: 0`, `prior_amount: 10251`), the group’s amounts-owed-to-group row (`0`/`0`), and the parent’s bank-loan row (`0`/`0`). It should have retained disclosed rows even when current amounts were zero.
- Mistake: The first call transcribed group `other` creditors incorrectly, adding `314000` to the creditor-line sum. This was repaired, but the retry did not address completeness.

### tier4-NI626135

**Tool calling: failed.** Submitted Diamond Trucks’ staff costs and current creditor amounts in one accepted `accounts` call. It failed because all 20 creditor comparatives were omitted. ($0.0018, 1 requests, 11 s)
- Right: Correctly extracted current and prior staff costs for both entities, including group totals `4404450`/`3687277` and parent totals `1952516`/`1712174`.
- Right: Correctly captured current creditor categories and totals: group `15752489` within one year and `689258` after one year; parent `17897307` and `686105`.
- Right: Included the disclosed zero current long-term bank balances for both entities.
- Mistake: The sole `accounts` call supplied no `prior_amount` on any of its 20 creditor rows, although notes 16 and 17 provide separate 2024 columns for group and company.
- Mistake: It should have paired each current amount with its comparative, including group bank loans `5382854`, parent bank loans `4270739`, and long-term bank balances `5836` for each entity. Successful validation did not establish that these comparatives were complete.

### tier5-12026946

**Tool calling: passed.** Passed Cambium’s full-accounts case after three requests and two `accounts` calls. The run wasted a request on a plain-text response and then resolved a schema error by dropping a disclosed comparative creditor row. ($0.011, 3 requests, 2.1 min)
- Right: Correctly returned company dates, all four listed directors, and distinct group and parent balance sheets, including net assets `1427969` versus `39954968`.
- Right: Extracted group profit-and-loss figures, staff costs and creditor comparatives, including tax credit `-51830` and current accruals `12234067`.
- Right: Preserved the disclosed profit-before-tax figure `-4801087` rather than forcing it to equal only the income and expense fields represented in the output.
- Mistake: The first response contained text and JSON without calling `accounts`, prompting the message `Please include your response in a tool call.`
- Mistake: The first `accounts` call supplied `amount: null` for parent finance leases due after one year, producing an integer-type error at `parent_company.creditors[5].amount`.
- Mistake: The final call deleted that row, losing its disclosed `prior_amount: 157084`. It should have retained the row with `amount: 0` and `prior_amount: 157084`. The supplied expected checks did not include this creditor row, so the benchmark pass does not establish complete extraction.

### tier5-NI037684

**Tool calling: passed.** Passed John Mulholland Motors’ full-accounts case in one `accounts` call. It returned company information, directors, both entities’ balance sheets, group results and staff costs, and creditor comparatives without retries. ($0.0019, 1 requests, 19 s)
- Right: Correctly identified `accounts_type: medium`, consolidated and audited status, calendar-year periods, and directors Mrs A Mulholland and Ms S Mulholland.
- Right: Distinguished group and parent figures, including current stocks `7357548` versus `5082704` and debtors `713051` versus `3616379`.
- Right: Captured group turnover `31045685`, profit after tax `427398`, staff-cost total `1303679`, and both entities’ comparative creditor amounts.
- Right: Left parent staff costs `null` where the staff-cost note disclosed group figures only. No validation retry or output-format correction was needed.
