In-Context Learning as an Effective Estimator of Functional Correctness of LLM-Generated Code

When applying LLM-based code generation to software development projects that follow a feature-driven or rapid application development approach, it becomes necessary to estimate the functional correctness of the generated code in the absence of test cases. Just as a user selects a relevant document from a ranked list of retrieved ones, a software generation workflow requires a developer to choose (and potentially refine) a generated solution from a ranked list of alternative solutions, ordered by their posterior likelihoods. This implies that estimating the quality of a ranked list - akin to estimating ''relevance'' for query performance prediction (QPP) in IR - is also crucial for generative software development, where quality is defined in terms of ''functional correctness''. In this paper, we propose an in-context learning (ICL) based approach for code quality estimation. Our findings demonstrate that providing few-shot examples of functionally correct code from a training set enhances the performance of existing QPP approaches as well as a zero-shot-based approach for code quality estimation.

Authors

Institutions

Publication Details

Published
2025-07-13
DOI
https://doi.org/10.1145/3726302.3730212
Citations
1
Primary Topic
Natural Language Processing Techniques
Type
article
Field-Weighted Citation Impact
2.48
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

In-Context Learning as an Effective Estimator of Functional Correctness of LLM-Generated Code

Madhusudan Ghosh, Gül Çalıklı, Debasis Ganguly, Subhadipa Das et al.
1 citations
Natural Language Processing Techniques
2.48
article

In-Context Learning as an Effective Estimator of Functional Correctness of LLM-Generated Code

Madhusudan Ghosh, Gül Çalıklı, Debasis Ganguly, Subhadipa Das, Priyanka Swami
article en
1 citations

Abstract

When applying LLM-based code generation to software development projects that follow a feature-driven or rapid application development approach, it becomes necessary to estimate the functional correctness of the generated code in the absence of test cases. Just as a user selects a relevant document from a ranked list of retrieved ones, a software generation workflow requires a developer to choose (and potentially refine) a generated solution from a ranked list of alternative solutions, ordered by their posterior likelihoods. This implies that estimating the quality of a ranked list - akin to estimating ''relevance'' for query performance prediction (QPP) in IR - is also crucial for generative software development, where quality is defined in terms of ''functional correctness''. In this paper, we propose an in-context learning (ICL) based approach for code quality estimation. Our findings demonstrate that providing few-shot examples of functionally correct code from a training set enhances the performance of existing QPP approaches as well as a zero-shot-based approach for code quality estimation.

Indian Association for the Cultivation of Science (IN), University of Glasgow (GB)
Openalex Percentile: Top 10%
Natural Language Processing Techniques
2.48
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

In-Context Learning as an Effective Estimator of Functional Correctness of LLM-Generated Code — Madhusudan Ghosh, Gül Çalıklı, et al. · (2025) | TGRS Research Map | TGRS