---
title: "Muse Wonder on Pydantic AI Accounting"
description: "Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 90%, code mode 100%; rank 2 of 32."
canonical: https://models.pydantic.dev/models/muse-wonder/accounting_platform/
---

# Muse Wonder on Pydantic AI Accounting

> Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 90%, code mode 100%; rank 2 of 32.
>
> Markdown copy of https://models.pydantic.dev/models/muse-wonder/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>`
- Any other question about the models: `GET https://models.pydantic.dev/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://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/muse-wonder.md

| Mode         | Score | Tasks passed | Cost   | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ------ | -------- | ---------- | -------- |
| Tool calling | 90%   | 9 of 10      | $10.69 | 154      | 957        | 35.8 min |
| Code mode    | 100%  | 10 of 10     | $2.46  | 116      | 115        | 11.8 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

`gateway/meta-muse:muse-wonder-1.0` passed 19/20 runs: 9/10 in `tools` and 10/10 in `code_mode`. The sole failure exhausted the 60-request limit during the large invoice audit; there were no provider failures. These cases show strong accounting accuracy, with efficiency and audit discipline as the main weaknesses.

#### Where it does well

Both modes passed all four mutation runs, correctly sequencing attendance correction, invoice voiding and reissue, and allocating payments oldest due first. Both also passed all four margin runs and all four simple total/outstanding-balance runs.

Code mode explicitly implements `Decimal` and `ROUND_HALF_UP`, per-student tax, charged-student split denominators and tutor pay for billable lessons with no charged students. Its large audits retain records in dictionaries and join on `(lesson_id, student_id)`, allowing complete checks of 384 non-void invoices and 3108 lines.

#### Mistakes it makes

It frequently keeps checking after finding the answer, including fetching excluded void invoices and unrelated invoice/payment-order records. In the failed tools audit, exploratory detours and incomplete checks consumed the budget before completion.

Recovered errors matter: the tools duplicate scan temporarily misidentified `INV-05884` and returned an invalid prose answer; the large code audit initially omitted duplicate-line handling; the small code audit hit a sandbox `next(...)` error. The tools missed-billing run passed while assuming contiguous lesson IDs and September-only coverage, neither guaranteed by the handbook.

#### Tool calling compared with code mode

Across these ten paired cases, code mode used 116 requests and $2.4563 versus 154 requests and $10.6900 for tools—about 77% lower cost. The largest gain was the broad audit: code passed in 33 requests/$0.6502; tools failed at 60/$3.8836. Duplicate detection fell from 27 requests/$3.1896 to 10/$0.2566.

Code mode used more requests on six smaller or focused tasks, often because of redundant verification. It is the stronger choice here for large record joins and recalculation; ordinary tools were more economical for straightforward lookups and focused updates.

## Runs

### small-invoice_total-1

**Tool calling: passed.** Retrieved `INV-00084` and correctly returned its tax-inclusive total of `89700` in 2 requests. ($0.026, 2 requests, 11 s)
- Right: One `get_invoice` supplied `net=74752`, `tax=14948` and `total=89700`; the next request submitted `final_result`.
- Right: Avoided unrelated account or lesson queries.

**Code mode: passed.** Correctly returned `89700` after retrieving and summing the invoice’s 14 lines. Passed in 3 requests. ($0.052, 3 requests, 10 s)
- Right: Computed `sum(line['total'] for line in inv['lines'])` and verified net `74752`, tax `14948` and header total `89700`.
- Mistake: At request 2, called `get_invoice('INV-00084')` again instead of reusing the record retained as `result` by the first code call.

### small-owed_on_invoices-1

**Tool calling: passed.** Correctly calculated Emeka Brown’s unpaid invoice balance as `85204` in 4 requests. ($0.017, 4 requests, 11 s)
- Right: Resolved `CL-0007` with `search_clients` and retrieved two unpaid invoices with `list_invoices`.
- Right: Used `list_allocations` to subtract only the relevant `3563` allocation: `39452 + 49315 - 3563 = 85204`.

**Code mode: passed.** Correctly returned `85204` owed on Emeka Brown’s unpaid invoices in 5 requests. ($0.048, 5 requests, 18 s)
- Right: Retrieved the two unpaid invoices and used `asyncio.gather` for their individual `list_allocations` calls.
- Right: Calculated `(39452 - 3563) + 49315`, subtracting only the allocation attached to an unpaid invoice.
- Mistake: Used a separate fourth code request solely for arithmetic on manually copied constants; the calculation could have accompanied the allocation retrieval.

### large-tutor_margin-3

**Tool calling: passed.** Returned the correct October margin of `120741` for Chen Mensah in 5 requests. ($0.36, 5 requests, 2.2 min)
- Right: Used `search_tutors`, `get_settings`, `list_lessons` and `list_attendance` for `TU-002` over `2026-10-01` through `2026-10-31`.
- Right: Identified 67 billable lessons among 75 and checked only the three clients whose gross pricing required taxable-status information.
- Right: Correctly distinguished taxable `CL-0269` and `CL-0065` from non-taxable `CL-0097`.

**Code mode: passed.** Correctly calculated `360316 - 239575 = 120741` for Chen Mensah’s October margin. Passed in 12 requests. ($0.29, 12 requests, 1.5 min)
- Right: Implemented per-student charge rounding and gross-tax extraction with `Decimal` and `ROUND_HALF_UP`.
- Right: Paid the tutor once for each of 67 billable lessons, including four lessons with no charged students.
- Right: Used all charged attendees as the split denominator and respected client taxable status.
- Mistake: Reached the correct margin at request 5 but continued through invoice-list queries, client-specific November invoices, invoice details and `list_payment_orders` before finalising at request 12.
- Mistake: Fetched taxable status for every attendance client although only gross-priced client charges require it to calculate net revenue.

### small-tutor_margin-3

**Tool calling: passed.** Correctly returned Kai Iyer’s October margin of `65045` in 5 requests. ($0.16, 5 requests, 57 s)
- Right: Retrieved 39 October lessons for `TU-001`, their attendance and the 20% tax setting.
- Right: Batched seven `get_client` calls to establish taxable status, including non-taxable `CL-0037` and `CL-0030`.
- Right: Based the answer on lesson and attendance records rather than invoice payment status.

**Code mode: passed.** Correctly calculated Kai Iyer’s margin as `187435 - 122390 = 65045`. Passed in 9 requests. ($0.22, 9 requests, 60 s)
- Right: Excluded two cancelled lessons, retaining 37 billable lessons.
- Right: Used `Decimal` and `ROUND_HALF_UP` for hourly tutor pay and gross-tax extraction, respecting the two non-taxable clients.
- Right: Included tutor pay for billable lessons even when attendance was `missed`.
- Mistake: Reached the correct answer at request 5, then queried November invoices, their details and payment orders before submitting the result at request 9.

### large-duplicate_lines-1

**Tool calling: passed.** Eventually returned the correct three duplicate invoices after inspecting all 384 non-void invoices. It took 27 requests and recovered from an invalid final response. ($3.19, 27 requests, 9.9 min)
- Right: Read all four `list_invoices` pages and identified repeated `(lesson_id, student_id)` pairs in `INV-06060`, `INV-06073` and `INV-06097`.
- Right: Corrected the output format using `final_result` after automated validation feedback.
- Mistake: At request 12, incorrectly called `INV-05884` a duplicate; its repeated lesson IDs belong to different students. It excluded this false positive from the final answer without explaining the correction.
- Mistake: At request 20, incorrectly claimed `INV-06060`’s net header was below its line sum; both equal `49513`.
- Mistake: At request 25, returned prose instead of valid structured output. After validation failed, unnecessarily repeated three `get_invoice` calls before submitting `final_result`; there were 387 invoice reads for 384 distinct invoices.

**Code mode: passed.** Correctly detected the three duplicate invoices using Python counters across 384 non-void invoices. Passed in 10 requests. ($0.26, 10 requests, 67 s)
- Right: Fetched invoice details with `asyncio.gather` in batches of 90, retaining results in `inv_details`.
- Right: Counted `(lesson_id, student_id)` keys with `Counter` and returned `INV-06060`, `INV-06073` and `INV-06097`.
- Mistake: At request 2, fetched October page 1 again despite retaining its initial response.
- Mistake: After finding the three internal duplicates, fetched all 10 excluded void invoices and compared their overlapping lines; that was unnecessary for the requested non-void duplicate check.

### large-missed_billed-1

**Tool calling: passed.** Found the correct three invoices by scanning September attendance for `missed` students marked invoiced, then verifying their invoice lines. Passed in 19 requests, but its coverage relied on assumptions. ($1.79, 19 requests, 5.1 min)
- Right: Used `list_attendance` to find `LS-041761`/`ST-0127`, `LS-043071`/`ST-0491` and `LS-044224`/`ST-0088`.
- Right: Verified these pairs with `get_invoice` and returned `INV-05846`, `INV-06080` and `INV-05821`, excluding void invoices.
- Mistake: At requests 7–8, inferred every September lesson ID from the first and last `list_lessons` pages and constructed `LS-041722` through `LS-044678`; contiguous identifiers are not guaranteed by the handbook.
- Mistake: Restricted the main scan to September based on sampled invoice dates. October invoices can include older uninvoiced lessons; deriving lesson IDs from all invoice lines would establish complete coverage.
- Mistake: Spent several early requests inspecting replacement invoices and emitted lengthy speculation before the systematic attendance scan.

**Code mode: passed.** Completely checked 3108 lines across 384 non-void invoices and correctly returned the three missed-student billing errors. Passed in 19 requests. ($0.32, 19 requests, 84 s)
- Right: Derived all 2655 lesson IDs from invoice lines, avoiding assumptions about lesson dates or identifier continuity.
- Right: Fetched attendance in 27 batches and built `att_map[(lesson_id, student_id)]` to test `status == 'missed'`.
- Right: Returned `INV-05821`, `INV-05846` and `INV-06080`.
- Mistake: Re-fetched the sampled first invoice in the full batch.
- Mistake: After finding all three matches at request 13, spent requests 14–18 rechecking them, retrieving excluded void invoices and repeatedly inspecting replacement-invoice attendance.

### large-wrong_invoices-1

**Tool calling: error.** Failed without a final answer when the next request would exceed the 60-request limit. Its exploratory checks never became a complete invoice recalculation. ($3.88, 60 requests, 11.5 min)
- Right: Retrieved all four October invoice-list pages and investigated three tax charges on non-taxable clients.
- Right: Used lesson and attendance records to check some suspected errors.
- Mistake: Requests 8–29 diverted into sampled lessons, void/replacement histories, client invoice histories and all four November invoice pages instead of systematically checking the October population.
- Mistake: At request 41, declared page 1 correct apart from tax anomalies without checking every billed student’s attendance or every rate; that page contained additional expected overcharges.
- Mistake: The recorded conversation includes 332 `get_invoice` calls but only six `get_lessons` and six `list_attendance` calls. Its last visible batch covered `INV-06057` through `INV-06066`, leaving the audit unfinished.
- Mistake: It should have batched invoice reads, deduplicated lesson/student keys, fetched all supporting records and reserved requests for calculation and final submission.

**Code mode: passed.** Completed the large audit and returned all 12 expected overcharges in 33 requests. It initially missed duplicate-line overcharges, then corrected its calculation. ($0.65, 33 requests, 2.9 min)
- Right: Collected 384 non-void invoices, 3108 lines, 2655 lessons, 3148 attendance records and 384 client records with batched calls.
- Right: Applied `Decimal`/`ROUND_HALF_UP`, attendance eligibility, all four charge types and per-client tax rules.
- Right: A later duplicate-key check found the three extra lines; recomputing with `seen_keys` added `INV-06060: 3563`, `INV-06073: 4500` and `INV-06097: 9900` to the nine other overcharges.
- Mistake: At request 23, recalculated every recorded line without deduplicating `(lesson_id, student_id)`, treating duplicate charges as legitimate and finding only nine incorrect invoices. The one-line-per-student-per-lesson rule should have been implemented initially.
- Mistake: After correcting the result to 12 invoices at request 29, spent further requests discussing possible errors and fetching excluded void invoices.

### small-wrong_invoices-1

**Tool calling: passed.** Audited all 37 October invoices and returned the correct four overcharges in 19 requests. ($1.11, 19 requests, 4.5 min)
- Right: Fetched invoice details, all 280 distinct lessons, attendance covering those lessons and client tax flags.
- Right: Returned `INV-00158: 4050`, `INV-00162: 863`, `INV-00172: 600` and `INV-00176: 6000`.
- Right: Explicitly checked split charges across clients and identified the wrongly taxed line for non-taxable `CL-0014`.
- Mistake: Requests 8–10 investigated selected suspicious lessons before the comprehensive scan, causing overlapping `get_lessons` retrievals.
- Mistake: Separated several independent lesson and attendance batches across requests, contributing to the 19-request cost.

**Code mode: passed.** Correctly returned all four overcharges after a complete recalculation. A verification script failed, but the model repaired it and passed in 9 requests. ($0.37, 9 requests, 1.9 min)
- Right: Checked 37 invoices, 325 lines and 280 distinct lessons, using deduplicated expected charges and half-up rounding.
- Right: Found duplicate `4050`, erroneous tax `863`, excess lesson charge `600` and missed-student charge `6000`.
- Right: Correctly rounded `4312.50` to `4313` before identifying the non-taxable client’s erroneous `863` tax.
- Mistake: At request 6, verification used `next(x for x in invoice_details if x['id']==inv_id)`, which failed in this sandbox with `TypeError: 'list' object is not an iterator`. Request 7 replaced it with an explicit loop and `break`.
- Mistake: Repeated page 1 and sampled records during initial collection, then continued several verification steps after obtaining the correct four discrepancies.

### large-correction-2

**Tool calling: passed.** Correctly changed Yara Baker’s attendance, voided the paid invoice and issued its replacement. All expected changes matched in 6 requests. ($0.062, 6 requests, 35 s)
- Right: Checked `get_invoice`, `get_lessons`, `list_attendance`, `get_client`, `get_settings` and `list_allocations` before changing records.
- Right: Called `update_attendance` for `LS-045235`/`ST-0332`, then `void_invoice`, then `create_invoice`, with invoice changes dated `2026-11-13`.
- Right: Replacement `INV-06548` retained three lines, totalling `14250` net plus `2850` tax; released credit paid all `17100`.

**Code mode: passed.** Correctly performed the attendance correction, void and reissue through Python tool calls. All expected changes matched in 7 requests. ($0.11, 7 requests, 42 s)
- Right: Sequentially awaited `update_attendance` and `void_invoice`, then created `INV-06548` for the three remaining lessons.
- Right: Verified the old `22800` allocation had `released_on='2026-11-13'` and the replacement had a `17100` allocation.
- Right: Reported `5700` remaining credit and the replacement’s `14250` net and `2850` tax.
- Mistake: Before mutation, read the client’s full ledger in addition to the original invoice allocation; this was more history than the correction required.

### large-record_payment-1

**Tool calling: passed.** Correctly recorded Jane Kelly’s `50126` payment dated `2026-11-13`, applying it oldest due first. All expected changes matched. ($0.095, 7 requests, 43 s)
- Right: Used `search_clients`, `list_invoices` and `list_allocations` to establish `58778 - 21152 = 37626` outstanding on `INV-02840`.
- Right: Called `record_payment` with `37626` allocated to `INV-02840` and `12500` to `INV-03247`, leaving no unallocated payment.
- Mistake: At request 4, fetched allocations separately for all 10 unpaid invoices after the complete client-level allocation list had already supplied them.
- Mistake: At request 5, read the ledger to verify an existing payment despite already having the allocation information needed for this transaction.

**Code mode: passed.** Correctly recorded and allocated Jane Kelly’s `50126` payment. Passed in 9 requests with unnecessary historical and verification reads. ($0.14, 9 requests, 46 s)
- Right: Calculated the allocation plan using `take=min(bal,remaining)` and stopped when the payment was exhausted.
- Right: Called `record_payment` with `37626` for `INV-02840` and `12500` for `INV-03247`, dated `2026-11-13`.
- Right: Verified the first invoice became paid and reported `12504` still outstanding on the second.
- Mistake: At request 4, called `list_ledger_entries` for pages 2 and 3 despite page 1 reporting `pages=1`; both extra pages were empty.
- Mistake: Fetched all client invoices and manually transcribed payment, allocation and unpaid-invoice arrays even though structured records were already available.
