MalloyBench: how well do language models know Malloy by heart?
How much Malloy does a language model know by heart? With the compiler, Claude Opus 5.5 answers all 118 of MalloyBench's tasks. Here each task gets one answer, with no compiler to check against. We ran eleven models at 35 reasoning settings, and half of the benchmark is now public on GitHub.
Results
| Model, best setting | All 118 | Core 44 | Hard 45 | Frontier 29 | Per answer |
|---|---|---|---|---|---|
| Claude Opus 5.5 (xhigh) | 94.1% | 97.7% | 95.6% | 86.2% | $0.275 |
| Gemini 4 Argon (high) | 77.1% | 93.2% | 62.2% | 75.9% | $0.204 |
| Claude Fable 5.1 (low) | 69.5% | 88.6% | 51.1% | 69.0% | $0.335 |
| GPT-6.1 Sol (xhigh) | 61.9% | 81.8% | 35.6% | 72.4% | $0.081 |
| Claude Sonnet 5.5 (high) | 55.9% | 75.0% | 44.4% | 44.8% | $0.100 |
| Gemini 3.8 Flash (medium) | 30.5% | 56.8% | 13.3% | 17.2% | $0.102 |
| Claude Haiku 5.5 (high) | 20.3% | 50.0% | 0.0% | 6.9% | $0.014 |
| GPT-6 Luna (high) | 11.9% | 31.8% | 0.0% | 0.0% | $0.005 |
| Gemini 3.5 Flash-Lite (medium) | 10.2% | 22.7% | 2.2% | 3.4% | $0.016 |
| GPT-5.6 Luna (high) | 10.2% | 27.3% | 0.0% | 0.0% | $0.016 |
| DeepSeek V4 Flash | 6.8% | 18.2% | 0.0% | 0.0% | $0.009 |
Claude Opus 5.5 knows Malloy best: at xhigh it passes 111 of 118, and 43 of the 45 hard reports. Below it, value depends on the tier: on the core, Gemini 4 Argon at low passes 82% for 3 cents, and on the frontier GPT-6.1 Sol at xhigh passes 72% for 9 cents, close to Opus 5.5 at high (76%) for less than half the price.
The cheaper models do not get far: none passes a third of the tasks, and on the 74 hard and frontier tasks all of their settings but one pass two or fewer. More reasoning helps the strong models, though not evenly: Opus 5.5 passes 63% at low and 94% at xhigh. Most failed answers never compile, and they repeat the same few mistakes.
What a task looks like
Each task is a question about a dataset, asked with its Malloy model and doc strings, the schema of every source and notes from the data team: about 4,000 tokens. One of the shortest:
How did revenue move month to month in 1995? Give each month's revenue and the change from the month before.
run: line_items -> {
where: ship_date = @1995
group_by: ship_month is ship_date.month
aggregate: revenue
calculate: change is revenue - lag(revenue)
order_by: ship_month
}
How it works
The six datasets form two halves, each with one dataset familiar from training data, one real but unusual, and one synthetic that no model can have seen. The public half has a TPC-H-derived wholesale supplier, three days of rated Lichess games, and Skerry Line, a fictional ferry operator; the private half a TPC-DS-derived retailer, USDA FoodData Central, and a fictional honey cooperative.
Core tasks (44) cover the language, from joins and nesting to window functions and repairing queries. Hard tasks (45) are reports with eight to ten decisions each. Frontier tasks (29) are easy in SQL and hard in Malloy: funnels, a top N with a row for the rest, gaps in a calendar. Fifteen ask for a Malloy model instead of a query, which hidden queries then test.
An answer passes if it compiles in Malloy's restricted mode, which reaches the data only through the Malloy model, and returns the reference's result on the full data and on two samples of it, so a number typed in from elsewhere fails.
Explore the public tasks
The tasks, the references and every result are in the MalloyBench repository.
The private half
Public tasks end up in training data, so half of MalloyBench stays private: we run it on released models and publish only the score. The two halves rank the 35 settings alike (Kendall tau 0.88), the public half about 4 points higher, so a model whose public score rises while its private score does not has been tuned on the public half. To have a model scored, open an issue.
Caveats
- One answer per task and setting. In an earlier release, a second run of two settings moved their scores by under a point, but 14 to 25 of their tasks changed outcome.
- One engine: DuckDB, with Malloy 0.0.435.
- October 2026 list prices, with nothing cached. Gemini 4 Argon's are introductory and double on 1 December.
Run it
The harness and the public half are at github.com/Snowboard-Software/malloybench: the code under the MIT license, the tasks and Malloy models under CC BY 4.0. One pass of all 35 settings over the 118 tasks costs about $240 at list price, and building MalloyBench, every test along the way included, cost about $1,500.
Thanks to Lloyd Tabb for reading a draft of this.
Rick Radewagen
Rick is a co-founder of Dot, on a mission to make data accessible to everyone. When he's not building AI-powered analytics, you'll find him obsessing over well-arranged pixels and surprising himself by learning new languages.