How I Benchmark LLMs on AL Code
CentralGauge is an open source benchmark designed to evaluate Large Language Models on AL code generation for Business Central. The post explains the methodology, task design philosophy, two-attempt scoring mechanism, and results showing how different models perform on domain-specific AL code compared to generic benchmarks.
Open in Claudehttps-sshadows-dk-blog-benchmark-llms-al-code--ced3c15285.mdRead the original on SShadowS

post SShadowS
"Generic code benchmarks cannot tell you how an LLM will perform on your specific domain."
Key points
- AL’s niche characteristics (syntax, conventions, standard library patterns) require specialized benchmarking distinct from Python or JavaScript benchmarks
- The benchmark includes 56 tasks across three difficulty tiers with real compilation in a Business Central container and test execution to ensure viability
- The two-attempt mechanism measures both code generation quality and self-correction ability, penalizing second attempts by 10 points
- Model performance rankings on AL tasks differ significantly from generic benchmarks, with Opus 4.5 leading at 66% pass rate and dramatic cost efficiency variations between providers
- Contributing new tasks requires defining YAML specifications with test codeunits that validate expected behavior rather than vague requirements
Quotes
- “Generic code benchmarks cannot tell you how an LLM will perform on your specific domain.” (This is the core justification for why specialized benchmarks like CentralGauge are necessary rather than relying on generic benchmarks like HumanEval)
- “The model should know this. If it does not, that is a valid test failure.” (Explains the benchmark’s philosophy of testing domain knowledge rather than instruction-following ability, ensuring tasks measure genuine AL competency)
- “Model ranking on AL tasks does not match generic benchmark rankings.” (Demonstrates that domain-specific performance cannot be predicted from general-purpose benchmarks, validating the need for specialized evaluation)
AL objects mentioned
As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.
- codeunit “Assert”
- table “Product Category”
Not found in BC28-30: codeunit “Assert”, table “Product Category”.
Context
- Features: AL code generation, LLM evaluation, Benchmark task design, Two-attempt scoring, Real compilation testing, Self-correction measurement, Cost tracking, Parallel execution
Source: SShadowS, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.