SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2304.14317 · 2023

ICE-Score: Instructing Large Language Models to Evaluate Code

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 4 functions out of this paper's own repositories and ran 2 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
terryyz/ice-score canonical 2 of 2
terryyz/llm-code-eval canonical 0 of 2
FunctionStatusWhere it lives
get_gpt_answer Ran terryyz/ice-score/llm_code_eval/evaluator.py
code served (permissive licence) · get_code("b9229b89784c7b66")
process_raw_content Ran terryyz/ice-score/llm_code_eval/evaluator.py
code served (permissive licence) · get_code("d3eca7c3807cab0d")
dispatch_openai_requests Not yet run terryyz/llm-code-eval/experiment_source/conala_gpt_eval.py
code served (permissive licence) · get_code("581d9a5b5f02e00c")
evaluate Not yet run terryyz/llm-code-eval/llm_code_eval/evaluator.py
code served (permissive licence) · get_code("1e81b4154ee3d021")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Recent advancements in the field of natural language generation have facilitated the use of large language models to assess the quality of generated text. Although these models have shown promising results in tasks such as machine translation and summarization, their applicability in code intelligence tasks remains limited without human involvement. The complexity of programming concepts required for such tasks makes it difficult to develop evaluation metrics that align with human judgment. Token-matching-based metrics, such as BLEU, have demonstrated weak correlations with human practitioners in code intelligence tasks. Moreover, utilizing human-written test suites to evaluate functional correctness can be challenging in domains with low resources. To overcome these obstacles, we propose \texttt{ICE-Score}, a new evaluation metric via instructing large language models (LLMs) for code assessments. Our metric addresses the limitations of existing approaches by achieving superior correlations with functional correctness and human preferences, without the need for test oracles or references. We evaluate the efficacy of our metric on two different aspects (\textit{human preference} and \textit{execution success}) and four programming languages. Our results demonstrate that our metric surpasses state-of-the-art metrics for code generation, delivering high levels of accuracy and consistency across various programming languages and tasks. We also make our evaluation metric and datasets available to the public\footnote{\url{https://github.com/terryyz/ice-score}}, encouraging further research in evaluating code intelligence tasks.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2304.14317")
get_code_for_paper("2304.14317")
have("2304.14317")

Connect an agent — have() is free.