vix.ing · top · new · best · stats

CodeJudge: Evaluating Code Generation with Large Language Models

2024/10/03 by Weixi Tong, Tianyi Zhang, Tong, Weixi +1 · 1 voice · 27 citations
Computer Science · #Code (set theory) #Computation and Language (cs.CL) #Computer science #FOS: Computer and information sciences #Machine Learning (cs.LG) #Model-Driven Software Engineering Techniques #Natural Language Processing Techniques #Programming language #Software Engineering (cs.SE) #Software Engineering Research #cs.CL #cs.LG #cs.SE

paper · pdf · doi:10.48550/arxiv.2410.02184

published in arXiv (Cornell University) (Cornell University)

openalex publication_date 2024/10/03 · arxiv published 2024/10/03 · arxiv updated 2024/10/03 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

Large Language Models (LLMs) have shown promising performance in code generation. However, how to reliably evaluate code generated by LLMs remains an unresolved problem. This paper presents CodeJudge, a code evaluation framework that leverages LLMs to evaluate the semantic correctness of generated code without the need for test cases. We investigate different ways to guide the LLM in performing "slow thinking" to arrive at an in-depth and reliable evaluation. We experimented with four LLMs as evaluators on four code generation datasets and five programming languages. The results show that CodeJudge significantly outperformed existing methods in most settings. Furthermore, compared with a SOTA GPT-3.5-based code evaluation method, CodeJudge achieved better results even when using a much smaller model, Llama-3-8B-Instruct. Our code and datasets are available on GitHub https://github.com/VichyTong/CodeJudge.

Cited by

Discussions

Related