---
title: "Claude Haiku 5.5 on Pydantic AI Accounting"
description: "Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 60%, code mode 70%; rank 18 of 20."
canonical: https://models.pydantic.dev/models/claude-haiku-5.5/accounting_platform/
---

# Claude Haiku 5.5 on Pydantic AI Accounting

> Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 60%, code mode 70%; rank 18 of 20.
>
> Markdown copy of https://models.pydantic.dev/models/claude-haiku-5.5/accounting_platform/. Index for agents: https://models.pydantic.dev/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://models.pydantic.dev/api/select` with a JSON body such as `{"description": "what the agent does"}`. It returns up to five ranked models with reasons. Format: https://models.pydantic.dev/select.md
- Search models by name: `GET https://models.pydantic.dev/api/search?query=<text>`
- List, filter and sort models: `GET https://models.pydantic.dev/api/models`, for example `?weights=open&max_price=2&sort=efficiency`
- One model in full: `GET https://models.pydantic.dev/api/models/<slug>`

Add `intent=<intent>&stack=<stack>&harness=<harness>` to the query string of the first three. An `OPTIONS` request to any endpoint returns its schema. The same four are tools of the MCP server at `https://models.pydantic.dev/mcp`. More: https://models.pydantic.dev/usage.md

About the benchmark: https://models.pydantic.dev/benchmarks/accounting_platform.md. The model on every Pydantic AI benchmark: https://models.pydantic.dev/models/claude-haiku-5.5.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time    |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | ------- |
| Tool calling | 60%   | 6 of 10      | $0.14 | 49       | 130        | 5.5 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

The model passed **6 of 10** cases with normal tool calling and **7 of 8** in code mode. Code mode had no `wrong_invoices` case. Small, targeted lookups and single-invoice corrections were reliable in both modes. Large audits that require scanning hundreds of invoices are where tool calling broke down.

#### Where it does well

- **Direct lookups and arithmetic.** `small-invoice_total-1` and `small-owed_on_invoices-1` passed in both modes, using 2–4 requests at about $0.001 each. It correctly subtracted only the unreleased allocation (3563) to reach 85204.
- **Multi-step corrections.** `large-correction-2` passed in both modes. It updated attendance, voided the invoice and reissued it, in the right order, and the new invoice (INV-06548, 17100) contained only the three remaining lessons.
- **Margin calculations.** `large-tutor_margin-3` (120741) passed in both modes. Code mode handled the billable statuses, split charges, gross/net tax stripping and half-up rounding explicitly.
- **Thorough audits when it does the work.** `small-wrong_invoices-1` (tools) fetched all 37 invoices with their lessons and attendance, then found all four overcharges.

#### Mistakes it makes

- **Concluding from partial data (tools).**
  - In `large-duplicate_lines-1` it opened only 10 of about 390 invoices and answered `[]`.
  - In `large-wrong_invoices-1` it opened 3 invoices, checked only for tax on non-taxable clients, and missed 9 of 12.
  - In `large-missed_billed-1` it never called an attendance tool and gave up with `[]`.
- **Redundant writes.** In `large-record_payment-1` (tools) it allocated the payment correctly, then called `record_payment` a second time with no allocations. This created a duplicate £501.26 entry (LE-013561).
- **Missed business rule.** In `small-tutor_margin-3` (code mode) it paid the tutor only when some student was charged. That overstated the margin by 11488 (76533 vs. 65045). It also read only `pages[0]` of the lesson list.
- **Little visible working.** Several passing runs give bare figures, so the reasoning cannot be audited from the transcript.

#### Tool calling compared with code mode

On the 8 cases run in both modes, code mode passed 7 and tool calling passed 5. Code mode cost **$0.022** in total against **$0.036** for tool calling. Request counts were similar: 49 for code mode and 36 for tool calling. Code mode used more requests on the big scans (10–12) because it hit the 100-nested-call limit, plus one missing `asyncio` import. It recovered each time by batching the calls in groups of 90–95, which let it check all 384 non-void invoices. Tool calling did not attempt that coverage.

The one exhaustive tool-calling audit (`small-wrong_invoices-1`) cost $0.0864, the most expensive run in the set. For large data sweeps, code mode is clearly the better choice. For small lookups the two modes perform about the same.

## Runs

### small-invoice_total-1

**Tool calling: passed.** The agent made a single get_invoice call for INV-00084, read the 'total' field of 89700, and returned it. The answer matches the expected one. ($0.0010, 2 requests, 3 s)
- Right: Used the most direct tool, get_invoice, and read the recorded total (net 74752 + tax 14948 = 89700), which is consistent.
- Right: Stopped after one call and answered in integer pence as the handbook requires.

### small-owed_on_invoices-1

**Tool calling: passed.** The agent found client CL-0007, listed the two unpaid invoices (39452 and 49315), and subtracted the one unreleased allocation on INV-00155 (3563). It answered 85204, which matches the expected answer. ($0.0012, 4 requests, 6 s)
- Right: Filtered list_invoices by status 'unpaid' and confirmed the result was a single page holding both invoices, INV-00155 and INV-00192.
- Right: Pulled the client's allocations and applied only those on the unpaid invoices: allocation 169 of 3563 on INV-00155, with released_on None.
- Right: Did the arithmetic correctly: 39452 + 49315 − 3563 = 85204.
- Right: Used only three tool calls, with no wasted lookups.

### large-tutor_margin-3

**Tool calling: passed.** The agent looked up tutor TU-002, listed the October 2026 lessons and their attendance, and fetched the taxable status of the 18 clients involved. It answered 120741 pence, which matches the expected answer. ($0.0092, 5 requests, 44 s)
- Right: Filtered lessons by tutor and the full October date range (2026-10-01 to 2026-10-31), so both ends were included.
- Right: Fetched attendance for all 67 lessons in a single list_attendance call.
- Right: Fetched get_settings to obtain the tax rate (20%), which is needed to strip tax from gross-priced lessons.
- Right: Reached the correct margin of 120741 pence.
- Mistake: It made 18 get_client calls to check is_taxable. For a margin net of tax, the taxable flag only matters for gross-priced lessons, so most of these lookups were probably unnecessary. This was wasteful but did no harm.
- Mistake: It showed no working: the computation was done privately and only the final figure was given, so the result cannot be checked from the transcript.

### small-tutor_margin-3

**Tool calling: passed.** The agent found tutor TU-001, listed the 37 October 2026 lessons and their attendance, and checked the taxable status of the 7 clients involved. It answered 65045 pence, which matches the expected answer. ($0.0050, 5 requests, 24 s)
- Right: Got the tax settings and each client's is_taxable flag, which are needed to net tax out of gross-priced lessons for taxable clients.
- Right: Pulled attendance for every lesson in one batched list_attendance call, so charged and missed students could be told apart.
- Right: Kept the lesson search to the October date range and counted lessons whether or not they had been invoiced, as the margin rule requires.
- Mistake: No arithmetic is shown in the transcript, so it can't be checked how statuses (missed, cancelled), gross-versus-net pricing and per-line rounding were applied. The final figure is correct.

### large-duplicate_lines-1

**Tool calling: failed.** The agent listed October 2026 invoices across four pages, then opened only the ten invoices INV-06145 to INV-06154. Finding no duplicate lines in those, it answered with an empty list. The expected answer was INV-06060, INV-06073 and INV-06097. ($0.0074, 4 requests, 19 s)
- Right: Paged through list_invoices with the sent_from/sent_to filter to see the whole set of October 2026 invoices.
- Right: Used get_invoice to look at line-level lesson_id/student_id pairs, which is the right way to spot a student charged twice for one lesson.
- Mistake: After listing roughly 390 October invoices (INV-05761 to INV-06154), it called get_invoice on only the last ten (INV-06145 to INV-06154). It never opened the invoices that held the duplicates (INV-06060, INV-06073, INV-06097).
- Mistake: It answered {"ids": []} without checking all non-void October invoices. Only about 10 of roughly 390 candidates had been inspected, so the evidence did not support the conclusion.
- Mistake: It should have fetched every non-void October invoice, skipping void ones such as INV-06069, and checked each for repeated (lesson_id, student_id) pairs. If the call budget was too tight for that, it should have said the check was incomplete rather than claiming there were none.
- Mistake: In several get_invoice results (INV-06148, INV-06149, INV-06154) the lines were cut off. The agent did not confirm those truncated lines held no duplicates.

### large-missed_billed-1

**Tool calling: failed.** The agent listed the October 2026 invoices, pulled one invoice (INV-05761) and two broad lesson lists, then answered with an empty list without checking any attendance. The expected answer was INV-05821, INV-05846 and INV-06080. ($0.0083, 5 requests, 33 s)
- Right: It correctly listed the invoices sent from 2026-10-01 to 2026-10-31 as the starting set.
- Right: It saw that the October invoices bill September lessons and fetched the September complete lessons.
- Mistake: It never checked attendance for any lesson. Finding students marked 'missed' needs attendance data, and no attendance tool was called.
- Mistake: It opened only one invoice (INV-05761) of the many October invoices and never cross-checked the other invoices' lines (lesson_id and student_id) against the attendance.
- Mistake: It filtered lessons by status 'complete' only. Lessons with status 'cancelled_chargeable' are also billable and could appear on invoices.
- Mistake: The first list_lessons call covered January to October, which was wasteful and did not help.
- Mistake: It gave the final answer {"ids":[]} with no evidence behind it, effectively giving up before doing the cross-check.

### large-wrong_invoices-1

**Tool calling: failed.** The agent listed the October invoices on 4 pages, pulled one page of September lessons, and opened only three invoices. These had tax on lines for non-taxable clients, which is easy to spot from the invoice header. It reported those 3 of the 12 expected overcharged invoices and missed the other 9. ($0.013, 6 requests, 46 s)
- Right: Paged through all October invoices and checked the settings.
- Right: Correctly found the three non-taxable clients charged tax (INV-05851, INV-06016, INV-06105) and gave the right overcharge amounts (1050, 1150, 1875).
- Mistake: The agent only looked for one kind of error: tax charged to non-taxable clients, which shows in the invoice header (tax>0 while net=total-tax). It never recomputed line amounts against lesson charge rates, durations, split rules, attendance or lesson status.
- Mistake: It fetched list_lessons for September only once (page 1, truncated) and did not page through or use it, and it never checked attendance (e.g. missed students who were charged, cancelled lessons that were billed, split lessons priced wrong).
- Mistake: It missed 9 overcharged invoices (e.g. INV-05791, INV-05821, INV-05846, INV-05877, INV-06017, INV-06060, INV-06073, INV-06080, INV-06097). Some of these, like INV-05846 at 11700 and INV-06097 at 9900, look like whole lines that should not have been billed.
- Mistake: It answered after opening only 3 invoices' lines, with no systematic check of every October invoice's lines.

### small-wrong_invoices-1

**Tool calling: passed.** The agent listed October 2026 invoices, fetched all 37 invoices' lines, pulled the lessons and attendance in batches, checked the taxable status of the zero-tax clients, and identified four overcharged invoices with amounts that match the expected answer. ($0.086, 7 requests, 2.2 min)
- Right: Fetched settings (20% tax) and every October invoice with its lines before judging any of them.
- Right: Batched get_lessons and list_attendance calls so lesson parameters and attendance could be checked line by line.
- Right: Called get_client for the six clients whose invoices showed zero tax and confirmed CL-0014 is non-taxable, which exposes the 863 tax wrongly charged on the LS-001133 line of INV-00162.
- Right: Spotted the duplicated LS-001226 line in INV-00158 (an overcharge of 4050), the 6500 line for LS-001295 in INV-00172 against a 6000 rate (600 including tax), and the 6000 overcharge in INV-00176.
- Right: Returned an answer in the requested pence/id format that matched the expected answer exactly.
- Mistake: No real mistakes. The run was somewhat heavy: 37 separate get_invoice calls plus several large lesson and attendance pulls. That was arguably needed to check every line, but the reasoning was never shown, so the answer cannot be audited from the transcript.
- Mistake: The final reply was a bare JSON object with no explanation of why each invoice is wrong (duplicate line, tax on a non-taxable client, wrong rate). A colleague asking the question would probably have wanted that context.

### large-correction-2

**Tool calling: passed.** The agent marked ST-0332 as missed on LS-045235, voided INV-06372 dated 2026-11-13, and reissued an invoice (INV-06548) for the three remaining October lessons totalling 17100. This matched the expected changes and the run passed. ($0.0017, 5 requests, 11 s)
- Right: Fetched INV-06372 first, so it knew the exact lesson and student IDs (LS-045235, ST-0332) and the other three lines.
- Right: Did the steps in the right order: update_attendance to missed, then void_invoice dated 2026-11-13, then create_invoice dated 2026-11-13.
- Right: Reissued only the three remaining lessons, LS-045914, LS-046583 and LS-047246. The resulting totals (14250 net, 2850 tax, 17100 total) match the expected answer.
- Right: Its summary correctly said the released credit of 22800 paid the new invoice in full.
- Mistake: search_clients('Yara Baker') returned the client Freya Baker (CL-0234), since Yara is a student. The agent did not resolve this explicitly and relied on the invoice's client_id. That worked, but it was not checked.
- Mistake: It did not check the client's ledger or credit before or after the changes. The 'paid' status was explained with 'appears to have', which is a hedge rather than a confirmed fact.

### large-record_payment-1

**Tool calling: failed.** The agent recorded the £501.26 payment for CL-0294 with correct oldest-first allocations: 37626 to INV-02840 and 12500 to INV-03247. It then called record_payment a second time with no allocations, which created a duplicate £501.26 payment (LE-013561), and the run failed. ($0.0022, 6 requests, 14 s)
- Right: Found the client (CL-0294) and listed her unpaid invoices and her existing allocations.
- Right: Worked out the remaining balance on INV-02840 (37626, given earlier part-payments) and allocated oldest due date first. The allocations matched the expected answer exactly.
- Right: Said plainly in its summary that it had made the duplicate payment, and did not issue an unrequested refund to cover it.
- Mistake: The second record_payment call (client CL-0294, amount 50126, allocations []) had no reason to exist. It created a duplicate payment ledger entry, LE-013561, of 50126 that sits as unallocated credit, so the ledger changes do not match the expected single entry.
- Mistake: It did not stop after the first record_payment succeeded and returned LE-013560.
