Papers › CodeJudge: Evaluating Code Generation with Large Language Models

CodeJudge: Evaluating Code Generation with Large Language Models

3 Oct 2024arXiv:2410.02184archive 2025-07-28

Weixi Tong, Tianyi Zhang

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2410.02184")

Code

Syntology Ran 15 of 23 code samples harvested from 2 repositories linked to this paper; 8 have no recorded run. Of those that ran: 2 ran · honoured contract; 1 ran · our draft was wrong; 12 ran with no contract checked.

By repository: official repository: 20 samples from 1 repository, 13 ran; found in paper text by Syntology: 1 sample from 1 repository, 0 ran; 2 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

VichyTong/CodeJudge officialmentioned in paperpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

23 samples harvested; 15 ran; 2 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
1ran · our draft was wrong
12ran
8unverified

Licence: 2 of the 23 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

answer_to_score VichyTong/CodeJudge/code_model_score/utils.py official repository ran fingerprinted Apache-2.0 (permissive) · 8f3951a30e7ab452 · report
calculate_correlation VichyTong/CodeJudge/evaluation/apps/calculate_single_correlation.py official repository ran Apache-2.0 (permissive) · 2dbad7c7765ac00d · report
calculate_correlation VichyTong/CodeJudge/evaluation/apps/calculate_table.py official repository ran Apache-2.0 (permissive) · 5216eb6022b6ac5b · report
calculate_other_correlation VichyTong/CodeJudge/evaluation/apps/calculate_table.py official repository ran Apache-2.0 (permissive) · 4bb7535462be56ac · report
code_llama_prompt VichyTong/CodeJudge/code_model_score/gpt_score.py official repository ran Apache-2.0 (permissive) · ded9c4a6757d8d95 · report
compute_intermediate_size VichyTong/CodeJudge/evaluation/model/convert_llama_weights_to_hf.py official repository ran fingerprinted Apache-2.0 (permissive) · 507f475feb734647 · report
extend VichyTong/CodeJudge/evaluation/apps/calculate_single_correlation.py official repository ran Apache-2.0 (permissive) · 52f8f65294260a82 · report
find_files_with_substring VichyTong/CodeJudge/evaluation/apps/calculate_accuracy.py official repository ran fingerprinted Apache-2.0 (permissive) · 9cb071c5ea904943 · report
form_filling VichyTong/CodeJudge/code_model_score/gpt_score.py official repository ran Apache-2.0 (permissive) · 68c90a7c8006a85d · report
get_pair VichyTong/CodeJudge/evaluation/humaneval/code_score.py official repository ran Apache-2.0 (permissive) · da7ee7dddf48bf67 · report
llama3_prompt VichyTong/CodeJudge/code_model_score/gpt_score.py official repository ran Apache-2.0 (permissive) · 1756c2f56ede92e2 · report
process_raw_content VichyTong/CodeJudge/code_model_score/utils.py official repository ran fingerprinted Apache-2.0 (permissive) · 6da24498ded11eb5 · report
read_json VichyTong/CodeJudge/evaluation/model/convert_llama_weights_to_hf.py official repository ran · our draft was wrong Apache-2.0 (permissive) · c5bcf01d18bba63d · report
calculate_correlation VichyTong/CodeJudge/evaluation/apps/calculate_accuracy.py official repository unverified Apache-2.0 (permissive) · 8afc902197b67802 · report
load_model VichyTong/CodeJudge/code_model_score/utils.py official repository unverified Apache-2.0 (permissive) · 441183fe72976e33 · report
read_data VichyTong/CodeJudge/evaluation/apps/code_score.py official repository unverified Apache-2.0 (permissive) · 406265a924488a97 · report
read_data VichyTong/CodeJudge/evaluation/bigcodebench/code_score.py official repository unverified Apache-2.0 (permissive) · 97104da8984d7e70 · report
read_data VichyTong/CodeJudge/evaluation/conala/code_score.py official repository unverified Apache-2.0 (permissive) · dbd4470654b4a66e · report
read_data VichyTong/CodeJudge/evaluation/humaneval/code_score.py official repository unverified Apache-2.0 (permissive) · 21fbaf2a4f026641 · report
write_model VichyTong/CodeJudge/evaluation/model/convert_llama_weights_to_hf.py official repository unverified Apache-2.0 (permissive) · 5f56e1f4e5b6ba8c · report
evaluate terryyz/ice-score/llm_code_eval/evaluator.py found in paper text by Syntology unverified MIT (permissive) · bcf3a566009fd040 · report
get_gpt_answer identical code first harvested elsewhere ran · honoured contract fingerprinted licence of this copy not recorded · b9229b89784c7b66 · report
process_raw_content identical code first harvested elsewhere ran · honoured contract licence of this copy not recorded · d3eca7c3807cab0d · report

Tasks

Code Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdamAttentionAttention DropoutBPECosine AnnealingDense ConnectionsDropoutGPT-3Layer NormalizationLinear LayerLinear Warmup With Cosine AnnealingMulti-Head AttentionResidual ConnectionSoftmaxWeight Decay

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections