mlsanityData to 14 Oct 2026

Anka: A Domain-Specific Language for Reliable LLM Code Generation

arXiv 2512.23214 ↗First posted 29 Dec 2025cs.CL cs.LG cs.PLcited by 1

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) have demonstrated remarkable capabilities in code generation, yet they exhibit systematic errors on complex, multi-step programming tasks. We hypothesize that these errors stem from the flexibility of general-purpose languages, which permits multiple valid approaches and requires implicit state management. To test this hypothesis, we introduce Anka, a domain-specific language (DSL) for data transformation pipelines designed with explicit, constrained syntax that reduces ambiguity in code generation. Despite having zero prior training exposure to Anka, Claude 3.5 Haiku achieves 99.9% parse success and 95.8% overall task accuracy across 100 benchmark problems. Critically, Anka demonstrates a 40 percentage point accuracy advantage over Python on multi-step pipeline tasks (100% vs. 60%), where Python's flexible syntax leads to frequent errors in operation sequencing and variable management. Cross-model validation with GPT-4o-mini confirms this advantage (+26.7 percentage points on multi-step tasks). Our results demonstrate that: (1) LLMs can learn novel DSLs entirely from in-context prompts, achieving near-native accuracy; (2) constrained syntax significantly reduces errors on complex tasks; and (3) domain-specific languages purposefully designed for LLM generation can outperform general-purpose languages on which the LLM has extensive training. We release the complete language implementation, benchmark suite, and evaluation framework to facilitate further research.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 12 of its 22 references that are in the map. First posted on arXiv 29 Dec 2025.

Builds on

12 of 22 references.

References · 12

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  4. 2021Program Synthesis with Large Language Modelscited by 3,637
  5. 2021Measuring Coding Challenge Competence With APPScited by 902
  6. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  7. 2023StarCoder: may the source be with you!cited by 799
  8. 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
  9. 2022Synchromesh: Reliable code generation from pre-trained language modelscited by 156
  10. 2023Self-planning Code Generation with Large Language Modelscited by 124
  11. 2021Examining Zero-Shot Vulnerability Repair with Large Language Modelscited by 105
  12. 2023Large Language Models and Simple, Stupid Bugscited by 45

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.