arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2407.03387cs.SEcs.AIcs.CL
收藏

ConCodeEval:评估大语言模型在领域特定语言中代码约束的理解能力

ConCodeEval: Evaluating Large Language Models for Code Constraints in Domain-Specific Languages

IBM

Mehant Kammakomati, Sameer Pimparkhede, Srikanth Tamilselvam, Prince Kumar, Pushpak Bhattacharyya

AI总结:

针对大语言模型在代码约束理解上缺乏评估的问题,提出首个覆盖五种表示、含两项新任务的ConCodeEval基准,发现LLMs处理代码约束能力不足,常规代码表现好的语言在细粒度约束任务中表现不佳。

摘要:

近期研究表明,在零样本和少样本设置下,大语言模型(LLMs)在各类文本生成任务中难以理解自然语言约束。而在代码领域,代码格式的约束被广泛用于维护JSON、YAML等领域特定语言(DSLs)编写的代码的完整性,这类语言在企业的系统级编程任务中应用广泛。鉴于LLMs越来越多地用于系统级代码任务,评估它们能否理解这些代码约束至关重要。但目前尚无研究评估LLMs对代码约束的可控性。为此,我们提出ConCodeEval——首个此类基准,包含两项针对代码约束的新颖任务,覆盖五种表示形式。研究结果表明,语言模型在处理代码约束时存在困难:在常规代码任务中表现优异的编程语言,当用同种语言表示细粒度约束时,表现并不理想。

英文摘要:

Recent work shows Large Language Models (LLMs) struggle to understand natural language constraints for various text generation tasks in zero- and few-shot settings. While, in the code domain, there is wide usage of constraints in code format to maintain the integrity of code written in Domain-Specific Languages (DSLs) like JSON and YAML which are widely used for system-level programming tasks in enterprises. Given that LLMs are increasingly used for system-level code tasks, evaluating if they can comprehend these code constraints is crucial. However, no work has been done to evaluate their controllability over code constraints. Hence, we introduce ConCodeEval, a first-of-its-kind benchmark having two novel tasks for code constraints across five representations. Our findings suggest that language models struggle with code constraints. Code languages that perform excellently for normal code tasks do not perform well when the same languages represent fine-grained constraints.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑