L2CEval: Evaluating Language-to-Code Generation Capabilities of Large Language Models
Authors:
Preprint
Abstract
Recently, large language models (LLMs), especially those that are pretrained on code, have demonstrated strong capabilities in generating programs from natural language inputs in a few-shot or even zero-shot manner. Despite promising results, there is a notable lack of a comprehensive evaluation of these models language-to-code generation capabilities. Existing studies often focus on specific tasks, model architectures, or learning paradigms, leading to a fragmented understanding of the overall landscape. In this work, we present L2CEval, a systematic evaluation of the language-to-code generation capabilities of LLMs on 7 tasks across the domain spectrum of semantic parsing, math reasoning and Python programming, analyzing the factors that potentially affect their performance, such as model size, pretraining data, instruction tuning, and different prompting methods. In addition to assessing model performance, we measure confidence calibration for the models and conduct human evaluations of the output programs. This enables us to identify and analyze the typical failure modes across various tasks and models. L2CEval offers a comprehensive understanding of the capabilities and limitations of LLMs in language-to-code generation. We also release the evaluation framework and all model outputs, hoping to lay the groundwork for further future research in this domain.Keywords
All Related Versions
This publication has 16 references indexed in Scilit:
- CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-X2023
- MultiPL-E: A Scalable and Polyglot Approach to Benchmarking Neural Code GenerationIEEE Transactions on Software Engineering, 2023
- Survey of Hallucination in Natural Language GenerationACM Computing Surveys, 2023
- CodeBERTScore: Evaluating Code Generation with Pretrained Models of Code2023
- UnifiedSKG: Unifying and Multi-Tasking Structured Knowledge Grounding with Text-to-Text Language Models2022
- Natural Language to Code Translation with Execution2022
- GPT-NeoX-20B: An Open-Source Autoregressive Language Model2022
- Semantic Evaluation for Text-to-SQL with Distilled Test Suites2020
- TaBERT: Pretraining for Joint Understanding of Textual and Tabular Data2020
- Learning to mine aligned code and natural language pairs from stack overflow2018