跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 计算与语言

arXiv:2512.23214 (cs)
[提交于 2025年12月29日]

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

作者:Saif Khalfan Saif Al Mazrouei
查看论文《Anka: A Domain-Specific Language for Reliable LLM Code Generation》的 PDF
查看中文 PDF 查看原文 PDF EasyResearch 阅读
摘要: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.
评论: 11 pages, 1 figure, 4 tables. Code and benchmarks available at https://github.com/BleBlo/Anka
主题: 计算与语言 (cs.CL); 机器学习 (cs.LG); 程序设计语言 (cs.PL); 软件工程 (cs.SE)
引用方式: arXiv:2512.23214 [cs.CL]
  (或者 arXiv:2512.23214v1 [cs.CL] 对于此版本)
  https://doi.org/10.48550/arXiv.2512.23214

提交历史

来自:Saif Khalfan Saif Al Mazrouei
[v1] 2025年12月29日 星期一 05:28:17 UTC
全文链接:

访问论文:

  • 查看中文 PDF
  • 查看原文 PDF
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.CL
< 上一篇   |   下一篇 >
最新 | 近期 | 2025-12
切换浏览方式为:
cs
cs.LG
cs.PL
cs.SE

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站