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

# Claude Sonnet 5.5 on Pydantic AI Accounting

> Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 80%, code mode 90%; rank 10 of 20.
>
> Markdown copy of https://models.pydantic.dev/models/claude-sonnet-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-sonnet-5.5.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | -------- |
| Tool calling | 80%   | 8 of 10      | $3.32 | 87       | 566        | 10.0 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

The model passed **17 of 20** runs: **8/10** with tool calling and **9/10** in code mode. Simple lookups and state-changing corrections were reliable. Its failures came on open-ended audits ("wrong invoices") and from one stray write. Code mode passed more runs at much lower cost: **0.53 total** versus **3.32**, using 72 requests versus 87.

#### Where it does well

- **Direct lookups and arithmetic.** `small-invoice_total-1` (2 requests) and `small-owed_on_invoices-1` (3 requests) passed in both modes. It correctly subtracted only the unreleased allocation (3563) to reach 85204.
- **Multi-step corrections.** It passed `large-correction-2` in both modes. It checked records before acting, marked attendance missed before voiding, and dated the void and new invoice 2026-11-13. It also reported the 5700 credit left over correctly.
- **Careful filtering.** It reliably excluded void invoices and paged through all four October invoice pages. It distinguished `missed` from `missed_chargeable` and checked duplicates per invoice rather than across invoices.
- **Margin calculations.** It got both `tutor_margin-3` cases right (120741 and 65045). In code mode it used exact integer half-up rounding.

#### Mistakes it makes

- **Shallow audits.** In `large-wrong_invoices-1` (tools), it opened about 6 of roughly 350 invoices. It flagged only header-level tax anomalies and found 3 of the 12 expected invoices. In `small-wrong_invoices-1` (code mode), it recomputed line prices but never checked for duplicated (lesson, student) lines, so it missed INV-00158 (4050).
- **Unneeded writes.** In `large-record_payment-1` (tools), the allocations were correct. It then probed with a 0p payment, recorded a stray 1p payment, and offset it with a 1p refund. The two extra ledger entries failed the run.
- **Unverifiable answers.** Several tool-mode runs gave bare figures with no working: the tutor margins, `duplicate_lines`, and the overcharges in `small-wrong_invoices`.
- **Unchecked assumptions.** It guessed sequential lesson IDs beyond page 1 and did not confirm whether a further page existed.

#### Tool calling compared with code mode

- **Cost on bulk work.** Bulk tasks were far cheaper in code mode:

  - `large-duplicate_lines-1`: 1.14 with tools (about 380 separate `get_invoice` calls) versus 0.038 in code mode.
  - `large-missed_billed-1`: 1.19 versus 0.043.

- **Thoroughness.** Code mode was more systematic. It recomputed all 384 invoices in `large-wrong_invoices-1` and found all 12, although its final step relied on unchecked manual reasoning.

- **Code-mode friction.** Code mode ran into the sandbox's limits repeatedly:

  - It hit the 100-nested-call limit in three large cases.
  - Its `fractions` import failed in three cases.
  - It started with a wrong pagination check.
  - It sent a malformed restart call.

  Each of these cost retries, but it recovered every time.

- **Mixed outcomes on the audit task.** On `wrong_invoices`, results split by size. Tool mode failed the large case and passed the small one, where it fetched all 37 invoices and caught the duplicate. Code mode did the reverse.

## Runs

### small-invoice_total-1

**Tool calling: passed.** The agent made one get_invoice call for INV-00084, read the stored total of 89700 pence, and gave that as the answer. The answer was correct. ($0.019, 2 requests, 3 s)
- Right: Used the direct tool (get_invoice) and answered in a single call with no wasted steps.
- Right: Took the invoice's stored total, which the handbook defines as the sum of its line totals, and gave it in pence as an integer.

### small-owed_on_invoices-1

**Tool calling: passed.** The agent found client CL-0007, listed its two unpaid invoices (39452 and 49315) and its allocations, and subtracted the single unreleased allocation on an unpaid invoice (3563 on INV-00155). It answered 85204, which matches the expected answer. ($0.019, 3 requests, 4 s)
- Right: Called list_invoices with status 'unpaid' and list_allocations in parallel, which kept the run to a few calls.
- Right: Counted only allocations on the unpaid invoices: allocation 169 (3563) on INV-00155. The others were on paid invoices INV-00005, -00065, -00073 and -00114.
- Right: Checked that allocation 169 had released_on None before subtracting it.
- Right: The arithmetic is correct: 39452 - 3563 + 49315 = 85204.

### large-tutor_margin-3

**Tool calling: passed.** The agent found tutor TU-002, listed the October 2026 lessons and their attendance, checked the taxable status of three clients, and answered 120741 pence. That matches the expected answer. ($0.097, 5 requests, 30 s)
- Right: It limited the lesson list to tutor TU-002 for 2026-10-01 to 2026-10-31, so both ends of the month were included.
- Right: It fetched attendance for all 67 lessons in one batched call.
- Right: It called get_client for clients CL-0097, CL-0269 and CL-0065, apparently those in gross-priced lessons, where taxable status changes the net amount.
- Right: It used few tool calls and reached the correct figure.
- Mistake: No calculation or working appears in the transcript. The agent replied with only the figure, so its method cannot be checked, though the result is correct.

### small-tutor_margin-3

**Tool calling: passed.** The agent looked up tutor Kai Iyer, listed his 37 October 2026 lessons, pulled their attendance and fetched the taxable status of the seven clients involved. It then answered 65045 pence, which matches the expected answer. ($0.067, 5 requests, 22 s)
- Right: Asked for lessons by tutor and by date range 2026-10-01 to 2026-10-31, which matches the rule that lessons count by the date they took place.
- Right: Pulled attendance for all 37 lessons in one call, so it could identify charged and missed students.
- Right: Fetched each client's is_taxable flag. This matters for gross-priced lessons: CL-0037 is not taxable, so its gross lessons are charged at full cost with no tax taken off.
- Right: Got the settings to find the 20% tax rate, needed to work out net amounts on gross lessons for taxable clients.
- Mistake: The agent did the whole calculation in its head with no visible working or code, then gave the final figure. It came out correct, but across 37 lessons with mixed net/gross pricing, varying taxability and missed students, nothing in the transcript can be checked. Some luck may be involved.

### large-duplicate_lines-1

**Tool calling: passed.** The agent listed every invoice sent in October 2026 across 4 pages, called get_invoice on each non-void invoice (about 380 calls) to check for repeated (lesson_id, student_id) pairs within one invoice, and returned INV-06060, INV-06073 and INV-06097, which matches the expected answer. ($1.14, 12 requests, 2.3 min)
- Right: Paged through all 4 pages of list_invoices for 2026-10-01 to 2026-10-31, so no invoices were missed.
- Right: Read invoice lines with get_invoice, since the list endpoint does not include lines.
- Right: Left out void invoices: it skipped INV-05811 at first and fetched it only at the very end to confirm it was void, and it skipped INV-05817 and INV-06069.
- Right: Checked for a duplicate (lesson_id, student_id) within each invoice, not across invoices, which is what the question asks.
- Right: Gave the IDs in the requested format.
- Mistake: It used about 380 separate get_invoice calls and the output was enormous (over 350k characters of the transcript were cut). If a batch or filter option existed, this was wasteful, though it worked.
- Mistake: Fetching the void invoice INV-05811 at the end was an unneeded call, since the list already showed its status as void.
- Mistake: It gave no explanation, such as which lesson and student were duplicated on each invoice, so the answer cannot be checked from the reply.

### large-missed_billed-1

**Tool calling: passed.** The agent listed October 2026 invoices, pulled September lessons and their attendance in batches of about 100, and spotted lessons where a student marked `missed` was still invoiced. It checked candidate invoices with get_invoice and returned INV-05846, INV-06080 and INV-05821, which matches the expected set. ($1.19, 17 requests, 3.3 min)
- Right: It worked out that October invoices bill September lessons, so it fetched September lessons (list_lessons 2026-09-01..30) and their attendance to compare.
- Right: It confirmed the candidates by reading the invoices: INV-05846 bills LS-041761 for ST-0127, INV-06080 bills LS-043071 for ST-0491, and INV-05821 bills LS-044224 for ST-0088.
- Right: It checked the boundary lessons (LS-041721, LS-044731, LS-044732) with get_lessons.
- Right: It also fetched the later-sent invoices INV-06145 to INV-06154 to make sure non-1st-of-month invoices were covered.
- Mistake: It made a very large number of list_attendance calls (about 30 batches) without first narrowing to lessons that had any `missed` attendance, which used a lot of requests.
- Mistake: It only fetched list_lessons page 1 for September, yet sent attendance queries for lesson IDs well beyond that page by guessing sequential IDs. This happened to work but relied on IDs being contiguous.
- Mistake: The transcript does not show how the three candidates were picked out of the truncated attendance results, so the step that identified them cannot be verified.
- Mistake: It fetched invoice pages 2–4 but never clearly checked whether a page 5 existed.
- Mistake: It did not show that it compared the void invoice list against the candidates. The three it returned are all `paid`, so the answer was unaffected.

### large-wrong_invoices-1

**Tool calling: failed.** The agent listed the October 2026 invoices and opened six of them. It found three invoices that wrongly charged tax to non-taxable clients and reported only those three. The expected answer has 12 overcharged invoices, so the run missed 9. ($0.22, 7 requests, 54 s)
- Right: Fetched the settings and paged through all four pages of October invoices.
- Right: Correctly spotted the tax charged to non-taxable clients on INV-05851 (1050), INV-06016 (1150) and INV-06105 (1875), checking each client's is_taxable with get_client.
- Right: Left out void invoices.
- Mistake: It only spotted anomalies it could see in the invoice headers: tax lower than 20% of net, which pointed to non-taxable clients. It never checked line amounts against lesson rates, durations, attendance or split rules.
- Mistake: It opened INV-05821, whose 4875 lines are an overcharge in the expected answer, but did not recompute them against the lesson data and dropped it.
- Mistake: It fetched the September lessons with list_lessons but only saw the first page and never used them to recompute lines. It never called attendance or lesson details to check charged students, split shares or billable status.
- Mistake: It opened INV-06021 and INV-05993 and checked nothing further. It never opened the other expected invoices: INV-05791, 05846, 05877, 06017, 06060, 06073, 06080 and 06097.
- Mistake: It answered after looking at only about 6 of roughly 350 invoices, with no systematic check of each line.

### small-wrong_invoices-1

**Tool calling: passed.** The agent fetched every October 2026 invoice, the September lessons, attendance and client tax status. It found four overcharged invoices: a duplicated line on INV-00158, tax charged to a non-taxable client on INV-00162, a rate mismatch on INV-00172 and an extra 6000 on INV-00176. Its answer matched the expected result. ($0.49, 13 requests, 1.8 min)
- Right: Pulled get_settings and list_invoices with the sent_from/sent_to filter for October, then called get_invoice on all 37 invoices to check every line.
- Right: Paged through list_lessons (4 pages) and list_attendance for all September lessons so it could recompute the charges.
- Right: Spotted the duplicated LS-001226 line on INV-00158, an overcharge of 4050.
- Right: Checked is_taxable with get_client and caught the 863 tax line on INV-00162 for non-taxable client CL-0014.
- Right: Found the 6500-instead-of-6000 line on INV-00172 (overcharge 600 with tax) and the 6000 overcharge on INV-00176.
- Mistake: The final answer gave the figures with no explanation, so the reasoning behind the 600 and 6000 overcharges cannot be checked from the transcript.
- Mistake: Some get_client calls (CL-0001 to CL-0006) did little beyond confirming taxable status. This was minor inefficiency.

### large-correction-2

**Tool calling: passed.** The agent marked ST-0332 missed for LS-045235, voided INV-06372 dated 2026-11-13, and created replacement invoice INV-06548 with the three remaining October lessons. The state changes match the expected answer exactly. ($0.017, 5 requests, 11 s)
- Right: It checked the invoice, settings, attendance and allocations before changing anything. That confirmed the lesson was attended and invoiced, and that the invoice was paid in full by LE-013390.
- Right: It updated attendance before voiding, so the lesson's charge status was correct before reissue.
- Right: It dated the void and the new invoice today (2026-11-13), as the handbook requires.
- Right: The reissued invoice contained only the three remaining lessons. Totals came to 14250 net + 2850 tax = 17100, and auto-pay from credit applied 17100 of the released 22800.
- Right: The summary correctly reported 5700 pence of credit left over.
- Mistake: search_clients for 'Yara Baker' returned Freya Baker (CL-0234), the client, not the student. The agent did not explicitly reconcile this, but it went on to the correct records via the invoice, so the result was unaffected.

### large-record_payment-1

**Tool calling: failed.** The agent recorded Jane Kelly's 50126p payment with the correct allocations: 37626p to INV-02840 and 12500p to INV-03247. It then made a stray 1p payment (LE-013561) and offset it with a 1p refund (LE-013562), and those two extra ledger entries made the run fail. ($0.059, 18 requests, 35 s)
- Right: Identified client CL-0294 and checked settings, unpaid invoices and existing allocations before acting.
- Right: Accounted for today's earlier payment LE-013542, which had already put 21152p on INV-02840, so only 37626p was left on that invoice.
- Right: The record_payment call for 50126p dated 2026-11-13 allocated oldest-due first (37626p to INV-02840, then 12500p to INV-03247), exactly matching the expected allocations.
- Right: The final summary openly admitted the stray 1p entries.
- Mistake: After the correct payment, it called record_payment with amount 0, which was rejected. That was an unnecessary probing call.
- Mistake: It then called record_payment for 1p with no allocations (LE-013561), creating an unwanted ledger entry. It should have stopped once the 50126p payment and its allocations were confirmed.
- Mistake: It tried to cancel this with record_refund for 1p (LE-013562). The balance nets to zero, but two extra ledger entries remain that the expected state does not have.
- Mistake: After the work was done it made several redundant calls (get_client three times, get_settings twice more, get_invoice INV-03247 twice).
