---
title: "Qwen3.8 27B on Pydantic AI Accounting"
description: "Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 70%, code mode 10%; rank 12 of 20."
canonical: https://models.pydantic.dev/models/qwen3.8-27b/accounting_platform/
---

# Qwen3.8 27B on Pydantic AI Accounting

> Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 70%, code mode 10%; rank 12 of 20.
>
> Markdown copy of https://models.pydantic.dev/models/qwen3.8-27b/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/qwen3.8-27b.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | -------- |
| Tool calling | 70%   | 7 of 10      | $1.62 | 99       | 967        | 40.3 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

The model passed **8 of 20** runs. With normal tool calling it passed **7/10** (99 requests, ~$1.62 total). In code mode it passed **1/10** (31 requests, ~$0.09). It can handle lookups, writes and medium-sized reconciliations through tool calls. In code mode it mostly fabricated answers instead of working. Neither mode solved the three large scans over ~394 October invoices: duplicate_lines, missed_billed and large wrong_invoices.

#### Where it does well

- **Write tasks (tools):** These were done correctly and checked first.
  - **large-correction-2:** It marked attendance missed before voiding INV-06372 and reissuing INV-06548 for 17100p.
  - **large-record_payment-1:** It read existing allocations and split 50126p oldest-due-first (37626 + 12500).
- **Simple lookups:** small-invoice_total-1 passed in both modes with 2 requests. small-owed_on_invoices-1 (tools) correctly subtracted an unreleased allocation to get 85204.
- **Multi-source reconciliation:**
  - **small-wrong_invoices-1 (tools):** It found all four overcharges (duplicate line, tax on a non-taxable client, wrong rate). It recovered from a 100-ID batch limit. This was the most expensive run at $0.52.
  - **Tutor margins (tools):** Both tutor-margin cases passed (120741, 65045).

#### Mistakes it makes

- **Heavy repetition:** The tutor-margin runs repeated whole call sequences up to three times. Other runs repeated calls such as list_ledger_entries and void_invoice.
- **Malformed or stray calls:**
  - get_invoice with ids `"string"` (dozens) and `'_'`
  - list_attendance with a placeholder string
  - update_attendance with empty IDs during a payment task
- **Brute-force scanning:** On large cases it fetched invoices one by one and never narrowed the work using lessons or attendance.
  - This overflowed context in missed_billed (HTTP 400, $0.36).
  - It stopped partway in duplicate_lines and submitted an empty list.
- **Fabrication:**
  - It invented answers: `{CL-0001:100, CL-0002:200}` in tools mode, and most code-mode finals.
  - It claimed actions that never happened, such as an invented "INV-06380" and an "unallocated credit" payment.
- **No visible working:** Correct numeric answers came with no breakdown to check them against.

#### Tool calling compared with code mode

Code mode was about 19× cheaper but much less reliable.

- **Gave up (6 of 9 failures):** The model called final_result without gathering data. In four of these the run used a single request. Answers were made up: 465617, 3250, 0/−1500, and invented invoice IDs.
- **Code errors (3 failures):** The three large scans failed on repeated errors that used up the retry budget:
  - typos and syntax errors
  - a missing asyncio import
  - a wrong response key (`invoices` vs `items`)
  - unsupported `yield`
  - trying 384 get_invoice calls despite the 100-nested-call limit

Its plans were sound (grouping lines by lesson and student, batching fetches), but it never carried them out.

**Recommendation:** Use tool-calling mode for this model, and add guards against repeated calls and fabricated final answers. Large aggregation tasks fail in both modes.

## Runs

### small-invoice_total-1

**Tool calling: passed.** The agent called get_invoice for INV-00084 and reported its stored total of 89700 pence, which matches the expected answer. ($0.0036, 2 requests, 3 s)
- Right: Answered with one get_invoice call and no wasted steps.
- Right: Used the invoice's recorded 'total' field (89700) directly, which the handbook defines as the sum of line totals including tax.
- Right: Gave the answer as an integer in pence, as the handbook requires.

### small-owed_on_invoices-1

**Tool calling: passed.** The agent found client CL-0007, listed their two unpaid invoices (39452 and 49315) and checked allocations on each. Only allocation 169 (3563, unreleased) applied to INV-00155. It answered 39452−3563+49315 = 85204, which is correct. ($0.0034, 4 requests, 5 s)
- Right: Filtered list_invoices by status 'unpaid' and got both invoices, INV-00155 and INV-00192.
- Right: Checked allocations per invoice and saw that allocation 169 (3563, released_on None) reduces what is still owed on INV-00155.
- Right: The arithmetic was correct: 35889 + 49315 = 85204.
- Mistake: The client-wide list_allocations call was redundant once the per-invoice calls were made, but this was only a small inefficiency.

### large-tutor_margin-3

**Tool calling: passed.** The agent looked up tutor TU-002, listed the October 2026 lessons, pulled attendance for the 67 lessons it treated as billable, and fetched settings and a few clients. It answered 120741 pence, which matches the expected answer. ($0.23, 12 requests, 3.4 min)
- Right: Found the tutor ID correctly and limited the lesson list to 2026-10-01 through 2026-10-31.
- Right: Fetched attendance in a single batch call covering all the listed lesson IDs.
- Right: Checked the tax rate and client taxable flags, which matter for net or gross pricing even though margin is net of tax.
- Right: The final figure matched the expected 120741.
- Mistake: The calls were repeated many times: search_tutors three times, list_lessons three times, list_attendance three times, get_settings four times and each get_client twice. None of the repeats was needed.
- Mistake: One repeated list_attendance call sent a placeholder string, '(all 67 billable lesson IDs)', and got back an empty list. That was a malformed call and wasted a request.
- Mistake: No calculation is visible in the transcript. The final number came out right, but the result cannot be checked from what was shown.

### small-tutor_margin-3

**Tool calling: passed.** The agent looked up tutor Kai Iyer (TU-001), listed his October 2026 lessons, attendance and client tax status, and submitted a margin of 65045 pence, which matches the expected answer. ($0.086, 13 requests, 89 s)
- Right: Found the tutor ID TU-001 and pulled all 39 of his October lessons with a tutor_id and date filter.
- Right: Fetched attendance for every lesson and the is_taxable flag for all 7 clients involved, which it needed to strip tax from gross-priced lines.
- Right: The final figure of 65045 matches the expected answer, so the net-of-tax charges and the per-lesson tutor pay were combined correctly.
- Mistake: Very wasteful: it repeated the full sequence of list_lessons for TU-001, list_attendance for all 39 lessons and 7 get_client calls three times, and called get_settings and search_tutors twice.
- Mistake: It made pointless unfiltered list_lessons calls over all of October, plus a page 2 call with no filters that returned June lessons. None of this was relevant.
- Mistake: Its working is not visible in the transcript, so the arithmetic cannot be checked step by step. The answer is right, but the run gives no breakdown.

### large-duplicate_lines-1

**Tool calling: failed.** The agent listed all four pages of October 2026 invoices (roughly 340 invoices, INV-05761 to about INV-06100). It then fetched invoice details one by one only for INV-05761 to INV-05860 and submitted an empty list. The expected answer was INV-06060, INV-06073 and INV-06097. ($0.071, 7 requests, 40 s)
- Right: Paged through list_invoices with sent_from 2026-10-01 and sent_to 2026-10-31 to get the full set of October invoices.
- Right: Correctly took the check to mean looking at each invoice's lines for a repeated (lesson_id, student_id) pair, and fetched lines with get_invoice.
- Mistake: It stopped calling get_invoice after INV-05860 and never inspected INV-05861 to about INV-06100, although pages 2 to 4 of list_invoices showed those invoices existed. All three expected invoices (INV-06060, INV-06073, INV-06097) were in the range it never checked.
- Mistake: It called final_result with {"ids": []} on an incomplete scan instead of fetching the remaining invoices, so it effectively stopped partway and reported nothing.
- Mistake: It skipped a few IDs in the range it did check (e.g. INV-05811, INV-05817) without a stated reason, though those may simply be voided or absent invoices.

### large-missed_billed-1

**Tool calling: error.** The agent listed October 2026 invoices and pulled each one's lines with get_invoice, hundreds of calls. It never fetched lesson attendance to cross-check, and the run ended in an HTTP 400 error with no answer. ($0.36, 13 requests, 5.7 min)
- Right: Correctly paged through list_invoices with sent_from 2026-10-01 and sent_to 2026-10-31 to get all October invoices.
- Right: Skipped void invoices (e.g. INV-06069, INV-06085, INV-06096, INV-06100) when fetching details.
- Right: Fetched the invoice lines (lesson_id and student_id), which is the right data to cross-check against attendance.
- Mistake: Called list_lessons for July–September (page 1 only), then never used lesson attendance records. Attendance is needed to find students marked 'missed' who were still billed.
- Mistake: Made a stray get_invoice call with invoice_id '\_'.
- Mistake: Fetched hundreds of full invoices one by one and filled the context with huge results. That likely caused the final HTTP 400 (context/request too large) before any answer was given.
- Mistake: Never got to cross-check lines against attendance. It should have looked up attendance (e.g. via a lesson/attendance tool) for the lessons on the invoice lines, or more efficiently found lessons with 'missed' attendance and matched them to invoice lines, which would yield INV-05821, INV-05846 and INV-06080.

### large-wrong_invoices-1

**Tool calling: failed.** The agent listed October 2026 invoices and called get_invoice on roughly 300 of them one by one. It never checked any lesson, attendance or rate against the invoices, and it submitted a placeholder answer ({CL-0001:100, CL-0002:200}) that bears no relation to the data. ($0.32, 27 requests, 2.7 min)
- Right: Fetched settings (20% tax, 14 due days) and paged through list_invoices for October.
- Right: Retrieved many invoice detail records, including INV-06073, which visibly contains a duplicated line (LS-042250 appears twice).
- Mistake: Made dozens of malformed get_invoice calls with the literal id "string" (after INV-05773, after INV-05791 a batch of 18, and again after INV-06049), wasting requests.
- Mistake: Never called lesson tools to recompute what each invoice line should charge (charge type, rate, duration, attendance, client taxability), so no overcharge was ever calculated.
- Mistake: Missed visible clues, such as the duplicated LS-042250 line on INV-06073 (the expected answer lists INV-06073 with a 4500 overcharge). Lesson charge type, rate and attendance were never fetched, so most of the expected overcharges could not have been found.
- Mistake: Stopped fetching around INV-06076, leaving later invoices (e.g. INV-06080, INV-06097, INV-06105) unexamined.
- Mistake: The final_result used client IDs CL-0001/CL-0002 with made-up amounts 100/200 instead of invoice IDs with computed overcharges, which amounts to a fabricated answer.

### small-wrong_invoices-1

**Tool calling: passed.** The agent pulled the settings, the October 2026 invoices with their lines, the clients, and the lessons and attendance in batches. It found four overcharged invoices (INV-00158 duplicate line 4050, INV-00162 tax on a non-taxable client 863, INV-00172 wrong rate 600, INV-00176 6000) and its answer matched the expected one exactly. ($0.52, 5 requests, 5.7 min)
- Right: Got the tax rate from get_settings and limited list_invoices to sent dates 2026-10-01 to 2026-10-31.
- Right: Called get_invoice on every October invoice so it had the line-level data needed to spot errors.
- Right: Checked is_taxable with get_client for every client and caught that CL-0014 (non-taxable) was charged 863 tax on the LS-001133 line of INV-00162.
- Right: Spotted the duplicate LS-001226 line on INV-00158 (4050 overcharge).
- Right: Recovered quickly from the 'at most 100 lesson ids per call' error by splitting get_lessons and list_attendance into smaller batches.
- Right: Checked lesson rates, durations and attendance against the invoice lines to find the INV-00172 and INV-00176 overcharges.
- Mistake: Its first get_lessons call sent more than 100 IDs and was rejected, wasting one call.
- Mistake: It fetched all 37 clients one by one, when only taxability mattered and could have been inferred from the zero-tax invoices; this cost a lot of calls but was harmless.
- Mistake: The final answer gave no explanation of why each invoice was wrong, so a colleague could not check the findings.

### large-correction-2

**Tool calling: passed.** The agent marked ST-0332 as missed on LS-045235, voided INV-06372, and reissued the invoice as INV-06548 covering the three remaining October lessons (17100p, paid from credit). The resulting state matches the expected changes and the run passed. ($0.018, 8 requests, 33 s)
- Right: Found the invoice and its client (CL-0234) directly from INV-06372 instead of guessing from the client search. 'Yara Baker' is a student, not a client.
- Right: Checked the lesson record (LS-045235: complete, one_off 4750, net) before changing its attendance.
- Right: Updated attendance to 'missed' before voiding, so the reissued invoice correctly left that lesson out.
- Right: Created the new invoice with only the three remaining lessons, dated today. The system applied the 22800p released credit, leaving 5700p unallocated, and the summary states this correctly.
- Mistake: Called void_invoice a second time on INV-06372 after it had already succeeded, in parallel with create_invoice. It returned 'already void' and did no harm, but the call was redundant and risky.
- Mistake: Called list_ledger_entries for CL-0234 twice in a row with the same arguments, which was wasteful. The output was truncated both times, so neither call confirmed the new ledger entries.

### large-record_payment-1

**Tool calling: passed.** The agent found Jane Kelly (CL-0294), listed her unpaid invoices and existing allocations, and recorded a 50126p payment dated 2026-11-13. It allocated 37626p to INV-02840, clearing it, and 12500p to INV-03247, oldest due date first, which matches the expected changes exactly. ($0.015, 8 requests, 20.0 min)
- Right: Applied the payment oldest-due-first: INV-02840 (due 2026-02-15) first, then INV-03247.
- Right: Checked the existing allocations before allocating, so it saw INV-02840 was already part-paid. It put 37626p on it, the amount still owed (58778 − 37626 = 21152 already allocated), and 50126 − 37626 = 12500 went to INV-03247.
- Right: Re-listed the unpaid invoices after recording the payment to confirm INV-02840 had become paid.
- Right: Dated the payment today, 2026-11-13, as the handbook requires.
- Mistake: It made a stray update_attendance call with an empty lesson_id and student_id right after the client search. The call was irrelevant to the task and was rejected, so it changed nothing, but it was a wasted call that could have caused a side effect.
- Mistake: The get_invoice call on INV-02840 was not needed, because the allocations list already gave what had been paid on it.
