Skip to Content
Applied SciencesApplied Sciences
  • Article
  • Open Access

8 October 2026

30 Pages

Library-Oriented Code Generation Method Combining Execution-Feedback Re-Retrieval and Repair Mechanisms

,
and
1
Qingdao Institute of Software, College of Computer Science and Technology, China University of Petroleum (East China), Qingdao 266580, China
2
Shandong Key Laboratory of Intelligent Oil & Gas Industrial Software, Qingdao 266580, China
3
State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing 210023, China
*
Author to whom correspondence should be addressed.
This article belongs to the Special Issue Intelligent Computing in Software Engineering

Abstract

Library-oriented code generation methods typically supplement the library knowledge of large language models by retrieving API documentation. However, static retrieval cannot readily exploit runtime information generated during code generation to update the retrieved documents, and models may therefore still produce invalid API calls or code with runtime errors. To address this problem, we propose EFRRCoder, a library-oriented code generation method that combines execution-feedback-based re-retrieval and repair. On top of initial document retrieval and code generation, EFRRCoder introduces self-generated execution inputs to obtain runtime feedback from candidate programs, dynamically updates relevant API documents when execution reveals a potential API knowledge gap, and iteratively repairs failed code. This allows runtime information to improve generation results without additional model training. Experiments on the MonkeyEval and BeatNumEval library-oriented code generation benchmarks show that, across two base models, EFRRCoder improves pass@1 and pass@5 by up to 7.13 and 6.93 percentage points, respectively, over the best-performing baseline under each setting. Supplementary cross-library experiments on NdonnxEval further show that EFRRCoder consistently outperforms the compared baselines across both base models under docstring-removed and docstring-retained settings.

1. Introduction

Large language models (LLMs) have shown strong capabilities in program understanding and code generation, providing a new technical route for automatically generating code from natural-language descriptions. In real-world software development, programs frequently call APIs provided by software libraries for data processing, scientific computing, deep learning, and other purposes so that existing functionality can be reused and development costs can be reduced. Library-oriented code generation aims to generate or complete code that invokes APIs of a target software library according to a natural-language requirement and an existing code context such that the completed program can correctly implement the requested functionality [1,2]. However, a target library often contains a large number of APIs, while natural-language task descriptions usually do not explicitly specify the target API name. As a result, a model may have difficulty accurately mapping task semantics to API functionality and may hallucinate APIs that do not exist in the target library when its library knowledge is incomplete [3]. In addition, programming tasks often require multiple API calls, where the output of one API becomes the input of another [4,5], further increasing the difficulty of library-oriented code generation. Therefore, relying only on knowledge stored in model parameters is insufficient for stable and correct generation.
Existing work mainly addresses insufficient target-library knowledge from two directions: updating model parameters and augmenting generation with external documentation. PriCoder [6], for example, trains models on automatically synthesized library-usage data to improve their practical ability to use unfamiliar APIs. External-documentation methods instead leave model parameters unchanged and retrieve task-relevant API documents during inference. DocPrompting follows a “document retrieval–code generation” pipeline and uses external documentation to supplement missing model knowledge [7]. Zan et al. proposed the APIRetriever and APICoder framework, in which a trained retriever selects candidate APIs from target-library documentation and an LLM generates code conditioned on the retrieved documents [8].
Parameter-update approaches require additional training data and training procedures and generally need new knowledge adaptation when transferred to another target library. External-documentation approaches, by contrast, depend heavily on the initial retrieval result. If the task description contains weak API clues or the first retrieval misses critical documents, the model may still generate incorrect code under incomplete knowledge. PriCoder further shows that, even when accurate API knowledge is provided, a model may still fail to use the relevant API correctly [6].
Execution-based verification and iterative optimization have recently been used to improve code-generation correctness. LEVER uses program execution results to verify and rerank candidate code [9]. Self-Debugging iteratively repairs generated programs using natural-language code explanations [10]. RepoCoder updates repository-level retrieval context using intermediate code completions, forming an iterative retrieval–generation process [11]. These studies demonstrate that candidate code and its execution results can provide useful information for subsequent generation. However, execution results have mainly been used for candidate validation or general program repair, and comparatively little work uses runtime error information to further update the API documentation used in library-oriented code generation.
To address this gap, we propose EFRRCoder (Library-Oriented Code Generation Combining Execution-Feedback Re-Retrieval and Repair Mechanisms). EFRRCoder requires no additional training of the LLM. During inference, it combines target-library API documentation, self-generated execution inputs, and runtime feedback from candidate programs to dynamically update the document context and repair failed code. The main contributions are as follows:
  • We propose EFRRCoder, a training-free iterative framework driven by execution feedback. It combines external API documentation, self-generated execution inputs, and runtime feedback from candidate code. An execution-feedback-driven document re-retrieval mechanism dynamically supplements missing API knowledge, while an execution-feedback-guided repair mechanism corrects generation errors in failed candidates.
  • We evaluate EFRRCoder on MonkeyEval and BeatNumEval [8] using Llama-3.1-8B and Qwen2.5-Coder-7B as two different types of base models and conduct supplementary experiments on NdonnxEval [6]. Across the two base models, the maximum gains over the best-performing baseline in each setting are 7.13 percentage points for pass@1 and 6.93 percentage points for pass@5. Ablation experiments verify the effectiveness of both document re-retrieval and execution-feedback-guided repair. On NdonnxEval, EFRRCoder is further evaluated using both base models under docstring-removed and docstring-retained settings, and it consistently outperforms the compared baselines across all four configurations.

2. Related Work

2.1. Library-Oriented Code Generation

Library-oriented code generation requires a model to generate code that calls the APIs of a target software library from a natural-language requirement and an existing code context. Compared with general code generation, the task requires not only understanding program semantics and control logic but also mastering API functionality, parameter forms, return values, and calling constraints. When the target library is poorly covered by training data, or when many APIs have similar functionality, the model is prone to generating incorrect API names, using parameters improperly, or composing interfaces in unsuitable ways.
Some studies enhance API-use ability by continued pre-training or by constructing library-related training data. CERT decomposes library-oriented generation into code-sketch generation and code-detail completion and continually pre-trains both stages with unlabeled code corpora [1]. CodeGen4Libs links task requirements to target libraries through a two-stage library-retrieval and code-generation pipeline [2]. These approaches can integrate library-call knowledge into model parameters, but they usually require additional training data and training and may require renewed adaptation when the target library changes.
Other methods help models use unseen APIs through API retrieval and task decomposition. Zan et al. proposed a private-library code-generation framework consisting of APIRetriever and APICoder and introduced the MonkeyEval and BeatNumEval execution benchmarks [8]. EpiGEN decomposes a requirement into multiple API-call subtasks and combines task decomposition, API retrieval, and code generation for multi-API generation [4]. CAPIR decomposes coarse-grained requirements into fine-grained subtasks, retrieves candidate APIs for each subtask, and reranks them with an LLM [5]. These methods improve the use of candidate interfaces and multi-API combinations, but their retrieval is mainly driven by pre-generation task descriptions and decomposition results and therefore depends on decomposition quality.
Recent work further asks whether a model can correctly use external knowledge after it is retrieved. PriCoder shows that providing accurate private-library knowledge does not necessarily guarantee correct API use and therefore trains models on automatically synthesized library-call data [6]. In contrast, EFRRCoder focuses on using errors exposed during candidate execution to update API documentation and repair failed code.

2.2. Retrieval-Augmented Code Generation

Retrieval-augmented code generation retrieves task-relevant code, documentation, or examples from an external knowledge base and feeds them to the generation model as additional context. REDCODER uses a dense retriever to obtain relevant code or natural-language descriptions and uses them for code generation and summarization [12]. DocPrompting directly retrieves software-library documentation for natural-language-to-code generation [7]. Such methods can adapt to libraries that were insufficiently covered during model training without modifying model parameters.
CodeRAG-Bench evaluates retrievers and generators across basic programming, open-domain code generation, and repository-level tasks, showing that high-quality context can improve generation but also that retrievers may fail to obtain useful content and generators may fail to use retrieved context correctly [13]. In repository-level completion, RepoCoder organizes similarity retrieval and a code language model into an iterative retrieval–generation process and updates the retrieval query using intermediate completions [11]. This demonstrates that intermediate generation results can provide more specific retrieval signals than the original requirement, although RepoCoder targets repository-level completion rather than library-oriented generation.
Dynamic retrieval has also been explored in general retrieval-augmented generation. Iter-RetGen updates subsequent retrieval queries with the previous generation [14]; FLARE decides whether to retrieve according to model confidence during generation [15]; DRAGIN dynamically determines retrieval timing and content according to the real-time information needs of the LLM [16]. These methods show that intermediate generation states can guide subsequent knowledge acquisition, but their triggers are mainly generated text, model confidence, or information needs rather than actual program execution states. In library-oriented code generation, invalid or misused APIs can be exposed directly through candidate execution. EFRRCoder therefore uses execution failures indicating nonexistent APIs, currently identified through AttributeError, as signals for document updating and extracts failed symbols from these exceptions to construct targeted re-retrieval queries.

2.3. Execution-Feedback-Driven Code Generation and Iterative Optimization

Program execution provides runtime feedback such as exceptions, outputs, and test results and is therefore widely used for candidate verification and generation improvement. Because manually written tests are often unavailable in practical code-generation settings, self-generated tests have been explored as a source of execution feedback. CodeT jointly generates candidate code and test cases and selects programs based on test-output consistency and agreement among candidates [17]. CoCoST automatically constructs tests from task descriptions, executes candidate programs, and uses test results to improve generation [18]. UnitCoder validates and filters synthesized code with automatically generated unit tests [19].
Execution feedback has also been used for candidate selection, program repair, and multi-round generation. LEVER feeds the requirement, candidate program, and execution result to a verifier and combines verification scores with generation probabilities for reranking [9]. Self-Debugging guides LLMs to inspect and repair their own programs through natural-language explanations [10]. Self-edit converts execution results into additional feedback and edits failed code [20]. LDB further exploits fine-grained runtime execution information by tracking intermediate program states and verifying program blocks step by step to localize and repair errors [21]. These methods mainly target general code-generation validation or repair and do not specifically use runtime errors to update external API documents when library knowledge gaps are exposed.
Interactive execution-feedback systems provide further evidence that runtime outcomes can support multi-round code generation. InterCode treats code as an agent action and execution results as environment observations in Bash, SQL, and Python environments [22]. Reflexion stores historical failures as verbal feedback and reflective memory to adjust later decisions [23]. EFRRCoder differs by explicitly using runtime errors for external-knowledge updating in library-oriented generation and coordinating document re-retrieval with code repair. When a potential API knowledge gap is detected, related API documents are first updated; the updated documents, failed code, and execution feedback are then jointly used for repair.

3. EFRRCoder Method

3.1. Overall Framework

Let q denote a natural-language task description, C the existing code context, and D = { d 1 , d 2 , … , d o } the API-document collection of the target library. Library-oriented code generation aims to produce code that correctly invokes relevant APIs and satisfies the task requirement.
Consider a MonkeyEval task that computes row-wise averages. Its task description is as follows: “You can specify a new column named average_along_rows that contains the average of each row. You also need to compute the average along the rows, so use axis=1. Finally, return the KnowledgeFrame with the new column.” The starter context is import monkey as mk; def compute_average_along_rows(kf):. The Monkey API document collection contains, among others, monkey.KnowledgeFrame.average, monkey.Collections.average, and monkey.KnowledgeFrame.rank. The model must complete the function, compute the average of each row and store the result in a new column named average_along_rows.
Figure 1 shows the overall framework. EFRRCoder organizes API-document retrieval, candidate generation, self-generated execution-input generation, candidate execution, execution-state analysis, document re-retrieval, and code repair into an iterative loop without additional model training. If a candidate executes successfully on all self-generated execution inputs without raising an exception, the iterative process terminates and the current code is returned. If execution reveals a call to a nonexistent API, EFRRCoder extracts the failed symbol from the exception and re-retrieves relevant API documentation using the task description, code context, exception type, failed symbol, and error message. Other execution errors keep the current document context and directly enter execution-feedback-guided code repair. The updated code is then re-executed until all self-generated execution inputs complete without exceptions or the maximum number of iterations is reached. A trajectory may also terminate early when further iteration is unlikely to provide useful progress, such as when the generated code or error symbol is repeated or when document re-retrieval provides no new information.
Figure 1. Overall framework of EFRRCoder.

3.2. Initial Document Retrieval and Candidate Generation

EFRRCoder first constructs the initial retrieval query by combining the task description and code context:
Q ( 0 ) = Concat ( q , C ) .
Let Retrieve BM 25 ( Q , D , k ) denote the BM25-based retrieval operation [24] that ranks the documents in D according to their relevance to query Q and returns the top-k documents. The initial document set is therefore obtained as
D ( 0 ) = Retrieve BM 25 Q ( 0 ) , D , k .
For a query Q and a candidate API document d, the relevance score used for ranking is computed using the standard BM25 scoring function:
BM 25 ( Q , d ) = ∑ w ∈ Q IDF ( w ) f ( w , d ) ( k 1 + 1 ) f ( w , d ) + k 1 1 − b + b | d | avgdl .
For the row-average example, the initially retrieved top-5 documents are listed in Table 1. They mainly concern rank, squeeze, and wide_to_long and do not include APIs directly related to row-wise averaging. This illustrates that when a task description does not explicitly contain the target API name, one-shot retrieval based only on the initial task information may miss truly useful documentation.
Table 1. Example of initial document retrieval results.
The task description, code context, and initial document set are then passed to the LLM, which generates n initial candidates:
Y ( 0 ) = { y 1 ( 0 ) , y 2 ( 0 ) , … , y n ( 0 ) } .
Because the initial retrieval does not contain directly relevant documentation, the model may rely on prior Pandas experience and produce the candidate in Table 2.
Table 2. Example of an initial candidate program.
The candidate uses mean for row-wise averaging, but whether this interface is valid in Monkey must be determined by execution. EFRRCoder therefore uses self-generated execution inputs to execute candidates and obtain runtime information. The five initial candidates generated for each task are treated as five independent trajectories and separately undergo execution on the generated inputs, execution-state analysis, document re-retrieval, and repair until a stopping condition is met or the maximum number of iterations is reached.

3.3. Self-Generated Execution Inputs and Execution Feedback

To obtain runtime information without relying on manually written tests or the benchmark’s official tests, EFRRCoder asks the LLM to generate execution inputs from the task description and code context. For each task, the model generates m self-generated execution inputs, forming
T = { t 1 , t 2 , … , t m } .
For the same task, T is fixed after candidate generation and reused across different candidates and subsequent iterations. This keeps execution feedback comparable across rounds. To prevent an erroneous candidate implementation from influencing input construction, EFRRCoder does not provide candidate code when generating these inputs. The model generates input assignments only, without expected outputs or assertions. Therefore, these inputs act as execution inputs rather than functional-correctness tests: they can expose runtime failures such as invalid API calls, argument mismatches, or type and shape errors, but successful execution does not imply semantic correctness. The prompt template for generating self-generated execution inputs is shown in Table 3.
Table 3. Prompt template for self-generated execution-input generation.
For the running example, Qwen2.5-Coder-7B generates the self-generated execution inputs shown in Table 4.
Table 4. Examples of self-generated execution inputs.
When the initial candidate executes kf.mean(axis=1), it produces the exception AttributeError: module ’monkey’ has no attribute ’mean’. This indicates that the current candidate contains an interface that cannot be correctly called in the Monkey library, so EFRRCoder enters the re-retrieval path. More generally, a candidate y ( i ) is executed on the fixed input set T and its execution state and exception information are recorded. If all self-generated execution inputs complete without exceptions, the iterative repair process stops. This stopping condition indicates only that no runtime failure has been exposed by the current execution inputs; it does not establish functional correctness. A candidate may execute successfully while still producing semantically incorrect outputs. Consequently, such a candidate may terminate the repair process prematurely because the current oracle-free execution inputs cannot detect semantic errors that do not manifest as runtime exceptions. Final functional correctness is therefore assessed only by the benchmark’s official tests, which are never used during generation or repair.

3.4. Execution-Feedback-Based Document Re-Retrieval and Code Repair

Traditional retrieval-augmented generation generally retrieves external knowledge once from initial task information. The initial query cannot exploit information newly exposed during code generation and execution. Dynamic retrieval methods have shown that intermediate generation results, model confidence, or real-time information needs can adjust subsequent retrieval [14,15,16]. EFRRCoder instead exploits runtime feedback directly tied to library API calls. A call to a nonexistent API is treated as evidence of a potential API knowledge gap and triggers document re-retrieval.
At present, EFRRCoder uses only nonexistent attributes or API calls manifested as AttributeError as the trigger for document re-retrieval. Other execution errors, including TypeError, RuntimeError, and ValueError, do not trigger re-retrieval and are instead handled through direct repair. Specifically, these errors bypass the document re-retrieval stage in Table 5 and directly enter the execution-feedback-guided repair stage. For these cases, EFRRCoder retains the current API-document set and provides the task description, starter code, failed completion, current API documents, and structured execution feedback to the LLM. The repair prompt provides the failed completion, error message, failing source line, optional failed symbol, and current API-document context to the LLM. These signals allow the model to address concrete execution failures, including incorrect positional or keyword arguments, receiver types, shape, or dtype constraints without requiring a different API to be retrieved.
Table 5. Prompt template for the document re-retrieval query.
The motivation is that AttributeError more directly indicates that the candidate has invoked an interface that is unavailable on the current object or in the target library. Nevertheless, exception types do not map one-to-one to root causes: insufficient knowledge of parameter constraints, data types, or API composition may also manifest as TypeError or RuntimeError. Therefore, the current execution-state routing strategy remains coarse-grained. Importantly, an execution failure does not necessarily indicate that the required API knowledge is absent from the retrieved context. Prior work has shown that, even when accurate API knowledge is explicitly provided, LLMs may still fail to use the relevant APIs correctly [6]. Therefore, some TypeError or RuntimeError cases may arise from incorrect application of already available API knowledge rather than from missing documentation. In such cases, additional document retrieval alone may not resolve the underlying failure, whereas execution-feedback-guided repair can directly revise the incorrect API usage.
When an AttributeError triggers document re-retrieval, EFRRCoder extracts the failed symbol from the exception text using a deterministic regular-expression rule. For the error message e ( i ) produced at iteration i,
s ( i ) = Extract ( e ( i ) ) ,
where s ( i ) is the failed symbol. The matching pattern is has no attribute [’"]([^’"]+)[’"]. For the running example, s ( 0 ) = mean .
For other exception types, including TypeError, RuntimeError, and ValueError, the failed symbol is optional. If no symbol can be reliably identified from the execution feedback, s ( i ) remains unspecified.
Let l ( i ) denote the failing source line at iteration i. It is first extracted from the traceback frame corresponding to the failed candidate. If the traceback does not provide an explicit source line but a failed symbol has been identified, EFRRCoder locates the first line in the failed completion containing that symbol. If neither source is available, l ( i ) remains unspecified. These fields provide diagnostic information to the repair prompt and do not independently trigger document re-retrieval.
When document re-retrieval is triggered, let τ ( i ) denote the exception type at iteration i. EFRRCoder then constructs the re-retrieval query by concatenating the original task description, code context, exception type, failed symbol, and exception message:
q r ( i ) = Concat q , C , τ ( i ) , s ( i ) , e ( i ) ,
The query is then used to retrieve the top-k documents from the target-library API document collection:
D r ( i ) = Retrieve BM 25 q r ( i ) , D , k ,
where k is the number of retained API documents, and D r ( i ) is the re-retrieved document set.
After adding the failed symbol mean and its exception information, the top-5 documents in Table 6 are retrieved. monkey.Collections.sem and monkey.KnowledgeFrame.sem rank above the average APIs because BM25 gives high scores to the directly matching term mean appearing in the sem documentation. Although the average APIs are not ranked first, re-retrieval successfully adds monkey.KnowledgeFrame.average and monkey.Collections.average, which were missed by initial retrieval.
Table 6. Example of document re-retrieval results.
EFRRCoder uses a replacement strategy in which the top-k documents re-retrieved in the current round replace the previous document set:
D ( i + 1 ) = D r ( i ) .
The updated set becomes the new external knowledge context for repairing the failed candidate.
The document set actually used for repair is
D ^ ( i ) = D r ( i ) , if document re - retrieval is triggered , D ( i ) , for other execution errors ,
and the next candidate is produced by
y ( i + 1 ) = G repair q , C , y ( i ) , D ^ ( i ) , e ( i ) , s ( i ) , l ( i ) ,
where G repair denotes the LLM-based repair process, s ( i ) is the optional failed symbol, and  l ( i ) is the failing source line. The repaired candidate is then re-executed on the fixed self-generated execution inputs, and the subsequent processing is determined by the new execution result. The prompt template for execution-feedback-guided code repair is shown in Table 7.
Table 7. Prompt template for execution-feedback-guided code repair.
In this example, the updated documents include monkey.KnowledgeFrame.average. Using these documents and execution feedback, EFRRCoder repairs the candidate shown in Table 8. All self-generated execution inputs then complete without exceptions.
Table 8. Example of execution-feedback-guided code repair.

4. Experiments and Results

4.1. Experimental Setup

4.1.1. Datasets

We use MonkeyEval and BeatNumEval [8]. Both benchmarks are transformed from tasks related to public software libraries while largely preserving original functionality and program semantics, but replacing identifiers such as library names and selected API names to simulate scenarios in which a model lacks target-library interface knowledge. MonkeyEval is constructed from PandasEval [1], with Monkey as the target library; BeatNumEval is constructed from NumpyEval [1], with BeatNum as the target library. Each contains 101 code-generation tasks.
To construct the external API document libraries, we collect relevant documentation from the official Pandas and NumPy documentation and transform library names and API identifiers according to benchmark mappings. The final external knowledge bases contain 686 Monkey API documents and 570 BeatNum API documents (Table 9).
Table 9. Statistics of the experimental datasets.

4.1.2. Baselines

Fine-tuning approaches such as PriCoder are not used as direct experimental baselines because EFRRCoder does not perform additional base-model training and instead adapts at inference time with external API documentation and execution feedback. The two categories differ in training requirements, target-library training data, and model parameter state, which makes a controlled comparison under the same base model and inference settings difficult. Fine-tuning approaches are therefore discussed as related work rather than directly compared.
We compare against the following: Vanilla, which generates directly from the task and code context without target-library API documentation; DocPrompting [7], which performs one-shot document retrieval followed by generation; Self-Debugging [10], adapted to library-oriented generation by allowing one self-explanation/self-check and one revision when the model detects a problem; EpiGEN [4], which decomposes a task into fine-grained subtasks and retrieves APIs for each; and CAPIR [5], which decomposes coarse requirements, retrieves candidate APIs, reranks them with an LLM, and generates code from the resulting interface set. EFRRCoder is evaluated under the same base models, candidate count, and generation parameters.

4.1.3. Environment and Parameters

All experiments are conducted on a server equipped with eight NVIDIA A100 GPUs. The two base models are meta-llama/Llama-3.1-8B-Instruct and Qwen/Qwen2.5-Coder- 7B-Instruct. Both models are locally deployed using vLLM 0.19.0, representing a general instruction-following model and a code-oriented LLM, respectively. Both models are served with a tensor-parallel size of 2, a maximum model context length of 12,000 tokens, and a GPU-memory-utilization ratio of 0.35.
API-document retrieval uses BM25 with k 1 = 1.5 and b = 0.75 . A unified parameter setting is adopted across all datasets and base models without dataset-specific tuning. The retrieval depth is set to Top- k = 5 . For code generation, the temperature is set to 0.2, top-p to 1.0, the maximum output length to 512 tokens, and the random seed to 42. Each task generates five candidate programs and uses three self-generated execution inputs. The maximum number of repair iterations is set to three. These execution inputs are used only to execute candidate programs and collect runtime feedback rather than as functional-correctness oracles.
The software environment consists of Python 3.12.13, NumPy 2.2.5, Pandas 2.3.3, Transformers 4.57.6, and vLLM 0.19.0.

4.1.4. Evaluation Metric

We use pass@k. For each task, all methods generate five candidates under the same sampling setup, and pass@1 and pass@5 are computed from these five candidates. If the c of n = 5 candidates passes the benchmark’s official tests, the standard unbiased estimator is
pass @ k = 1 − n − c k n k .

4.2. Main Results

Table 10 reports the results on MonkeyEval and BeatNumEval. For Llama-3.1-8B, EFRRCoder reaches 15.64% pass@1 and 20.79% pass@5 on MonkeyEval. On BeatNumEval, EFRRCoder achieves 20.79% pass@1 and 25.74% pass@5. Relative to DocPrompting, EFRRCoder improves MonkeyEval pass@1/pass@5 by 5.54/4.95 percentage points and BeatNumEval by 9.70/9.90 percentage points.
Table 10. Experimental results on MonkeyEval and BeatNumEval (%).
For Qwen2.5-Coder-7B, EFRRCoder also outperforms DocPrompting on both benchmarks. On MonkeyEval, EFRRCoder reaches 33.66% pass@1 and 36.63% pass@5, improving over DocPrompting by 5.34 and 6.93 percentage points, respectively. On BeatNumEval, it reaches 44.16% pass@1 and 48.51% pass@5, improving over DocPrompting by 7.13 and 5.94 percentage points, respectively. Qwen2.5-Coder-7B, being optimized for coding tasks, shows strong code generation and repair performance after API documents and execution feedback are introduced. Improvements across both base models indicate that EFRRCoder is not tied to one specific model.
The results also show that document augmentation does not always improve a base model. On MonkeyEval with Llama-3.1-8B, DocPrompting performs below Vanilla, indicating that static retrieved documents can interfere with generation when retrieval is misaligned with task needs or the generator cannot use the retrieved content correctly. EFRRCoder does not rely on a fixed initial retrieval result; it analyzes runtime failures, updates potentially missing API knowledge, and repairs the failed code, which yields more stable improvements than one-shot static augmentation.

4.3. Ablation Study

Using Qwen2.5-Coder-7B, we remove the re-retrieval module, the execution-feedback-guided repair module, and API documentation separately while keeping the number of candidates, self-generated execution inputs, maximum number of iterations, and other generation parameters unchanged.
In w/o Re-retrieval, the initially retrieved API documents remain fixed throughout the iterative process. When candidate execution exposes an error, no additional document retrieval is performed, and the failed candidate is repaired using the execution feedback together with the unchanged initial document set.
In w/o Repair, execution-state analysis and document re-retrieval are retained, but the execution-feedback-guided repair operation is removed. When an execution failure triggers re-retrieval, the API-document context is first updated according to the execution feedback. Instead of repairing the previous failed candidate using its code and runtime-error information, EFRRCoder discards the failed completion and generates a fresh candidate from the original task description, starter code, and the updated API documents.
For execution failures that do not trigger re-retrieval, such as TypeError, RuntimeError, or ValueError, EFRRCoder likewise discards the failed completion and generates a fresh candidate from the original task description, starter code, and the unchanged current API documents. In both cases, the failed code, error message, failing source line, and other runtime-error feedback are not provided to the generator. Therefore, this variant retains execution-feedback-driven document updating while removing targeted code repair based on the failed completion and runtime-error feedback.
In w/o API Docs, both initial API documentation and subsequent document re-retrieval are removed. Failed candidates are iteratively repaired using the previous code and execution feedback without external API-document context.
As Table 11 shows, removing either document re-retrieval or execution-feedback-guided repair reduces pass@1 and pass@5 on both datasets. On MonkeyEval, removing re-retrieval decreases pass@1/pass@5 from 33.66%/36.63% to 29.50%/30.69%, whereas removing repair decreases them to 30.10%/31.68%. On BeatNumEval, the corresponding results are 41.19%/45.54% for w/o Re-retrieval and 42.77%/46.53% for w/o Repair compared with 44.16%/48.51% for the full EFRRCoder.
Table 11. Ablation results of EFRRCoder (%).
These results show that both document re-retrieval and execution-feedback-guided repair contribute to the final performance. Under the current experimental settings, removing re-retrieval causes a larger degradation than removing repair on both benchmarks, indicating that dynamically updating the API-document context is particularly important when execution exposes potential API-knowledge gaps. At the same time, the performance decrease in the w/o Repair variant confirms that updated documentation alone is insufficient and that failed code and runtime feedback remain useful for targeted regeneration.
Removing API documentation further reduces performance to 28.32%/32.67% on MonkeyEval and 36.24%/42.57% on BeatNumEval. This confirms that external API documentation remains beneficial overall. On MonkeyEval, however, w/o API Docs achieves a higher pass@5 than w/o Re-retrieval, although its pass@1 is lower. This mixed result suggests that fixed or misaligned retrieved documents may occasionally interfere with subsequent repair, motivating the additional analysis of initial document retrieval in Appendix A.3.

4.4. Sensitivity Analysis

We analyze top-k, the maximum number of iterations, and the number of self-generated execution inputs using Qwen2.5-Coder-7B, with pass@1 as the metric. When one parameter is varied, all others remain at the default values in Section 4.1.3.
To further examine whether the gains of EFRRCoder depend on a favorable retrieval-depth setting, we compare EFRRCoder with DocPrompting under the same top-k values of { 1 , 3 , 5 , 7 , 10 } . All other generation and evaluation settings are kept unchanged. This controlled comparison separates the effect of retrieval depth from the contribution of the proposed execution-feedback mechanisms.
Figure 2 shows that the absolute performance varies with retrieval depth and exhibits dataset-dependent behavior. On MonkeyEval, EFRRCoder achieves pass@1 scores of 20.99%, 27.92%, 33.66%, 32.48%, and 30.50% for top- k = { 1 , 3 , 5 , 7 , 10 } , respectively, whereas DocPrompting achieves 20.00%, 23.76%, 28.32%, 27.52%, and 27.92%. EFRRCoder therefore consistently outperforms DocPrompting across all evaluated top-k values.
Figure 2. Pass@1 comparison between EFRRCoder and DocPrompting under different top-k settings using Qwen2.5-Coder-7B.
On BeatNumEval, EFRRCoder obtains pass@1 scores of 28.51%, 39.80%, 44.16%, 44.75%, and 47.33% compared with 21.98%, 31.88%, 37.03%, 37.43%, and 38.61% for DocPrompting. Notably, Top- k = 5 is not the benchmark-specific optimum on BeatNumEval, since EFRRCoder achieves its highest pass@1 of 47.33% at top- k = 10 .
Although the empirically best retrieval depth differs across datasets, EFRRCoder maintains higher pass@1 than DocPrompting throughout the tested range. These results indicate that the performance gains are not restricted to the default top- k = 5 setting. We therefore retain top- k = 5 as a unified dataset-independent operating configuration rather than tuning the retrieval depth separately for each benchmark.
Figure 3 shows that increasing the maximum number of iterations substantially improves performance in the early rounds, while the gains become marginal after three iterations. On MonkeyEval, pass@1 increases from 25.74% at one iteration to 33.07% at two iterations and 33.66% at three iterations and then changes only slightly to 34.06% at four iterations and 33.86% at five iterations. On BeatNumEval, pass@1 rises from 38.42% at one iteration to 43.96% at two iterations, further increases to 44.16% at three iterations, reaches 44.36% at four iterations, and then decreases to 43.76% at five iterations. These results indicate that multi-round iteration enables candidates to benefit from execution feedback, document updating, and repair, while most of the performance improvement is achieved within the first three iterations. Although the highest pass@1 is reached at four iterations on both datasets, the gains over three iterations are small, amounting to only 0.40 percentage points on MonkeyEval and 0.20 percentage points on BeatNumEval. Therefore, we retain three as the default maximum number of iterations to balance generation performance and inference cost.
Figure 3. Sensitivity analysis of the maximum number of iterations.
Figure 4 shows that the number of self-generated execution inputs has a relatively small and non-monotonic effect on pass@1. On MonkeyEval, the pass@1 scores for 1 to 5 execution inputs are 33.66%, 33.27%, 33.66%, 32.48%, and 32.67%, respectively, with the highest value of 33.66% reached at both one and three inputs. On BeatNumEval, the corresponding values are 44.95%, 44.55%, 44.16%, 43.76%, and 44.16%, with the highest result obtained at one input. Overall, the variation remains small on both datasets, indicating that a small number of execution inputs is already sufficient to expose many major runtime failures. Additional execution inputs do not necessarily yield better performance and may introduce redundant or less informative execution feedback. Considering both effectiveness and inference overhead, we use three self-generated execution inputs as the default setting.
Figure 4. Sensitivity analysis of the number of self-generated execution inputs.

4.5. Cross-Library Generalization

To further examine applicability to different software libraries, we conduct supplementary experiments on NdonnxEval using both Qwen2.5-Coder-7B and Llama-3.1-8B. To examine whether removing the original docstrings affects the comparison, we additionally conduct a controlled experiment in which the original docstrings are retained. All compared methods are evaluated under both docstring-removed and docstring-retained settings using the same generation and evaluation parameters.
As Table 12 shows, EFRRCoder achieves the best performance among the compared methods under both base models and both docstring settings. Under the docstring-retained setting, EFRRCoder achieves 27.69%/33.73% pass@1/pass@5 with Qwen2.5-Coder-7B and 16.69%/26.63% with Llama-3.1-8B. Under the docstring-removed setting, the corresponding results are 25.44%/30.18% and 16.45%/22.49%. These results indicate that the cross-library gains are not restricted to a single base model or to the removal of original docstrings.
Table 12. Experimental results on NdonnxEval under different base models and docstring settings (%).
EpiGEN and CAPIR obtain relatively low performance on NdonnxEval. Both depend on LLM-based task decomposition before retrieval and generation. Some NdonnxEval tasks specify overall functional goals without explicit implementation steps. When the base model lacks sufficient knowledge of ndonnx, decomposition can generate plans inconsistent with the actual target-library interfaces or even introduce nonexistent APIs. Such decomposition errors may subsequently propagate into the retrieval and generation stages, providing one possible explanation for the relatively low performance of EpiGEN and CAPIR on NdonnxEval.

4.6. Efficiency and Iteration Analysis

Unless otherwise stated, the efficiency and trajectory analyses in this section are based on Qwen2.5-Coder-7B under the docstring-removed NdonnxEval setting.
EFRRCoder introduces additional inference cost through self-generated execution-input generation and candidate execution, document re-retrieval, and multi-round repair. On NdonnxEval, EFRRCoder consumes 8322 tokens on average compared with 4682 for DocPrompting, an increase of approximately 77.7%. Its average runtime is 11.58 s, whereas the other methods range from 1.49 to 2.55 s. Figure 5 summarizes these costs. EFRRCoder therefore trades additional inference and execution cost for better code-generation performance through dynamic knowledge updating and repair.
Figure 5. Comparison of computational overhead on NdonnxEval using Qwen2.5-Coder-7B under the docstring-removed setting.
To further examine this trade-off, we compare generation quality with token consumption. On NdonnxEval, EFRRCoder improves pass@1 from 22.72% to 25.44% and pass@5 from 28.40% to 30.18% over DocPrompting, corresponding to gains of 2.72 and 1.78 percentage points, respectively, while increasing the average token consumption from 4682 to 8322 tokens. When normalized by token consumption, the pass@1 scores per 1000 tokens are approximately 4.85 for DocPrompting and 3.06 for EFRRCoder. Thus, EFRRCoder does not improve token efficiency; rather, it trades additional inference cost for higher absolute generation accuracy. This trade-off may be acceptable in correctness-oriented scenarios, whereas one-shot methods remain more suitable when latency or inference budget is the primary concern.
We further analyze 845 candidate trajectories produced on NdonnxEval. Of these, 582 trajectories terminate after one round (68.88%), 162 execute two rounds (19.17%), and 101 reach the third round (11.95%), giving an average of 1.43 iterations. Thus, although the maximum is three, most candidates do not use all rounds; only candidates that continue to expose problems proceed to later iterations.
To further understand when multi-round iteration is useful, we divide the trajectories according to their first-round execution state and final benchmark outcome. Among the 582 trajectories that terminate after one round, 401 (68.90%) complete all self-generated execution inputs without exceptions in the first round. Moreover, among the 186 single-round trajectories that ultimately pass the official benchmark tests, 161 (86.56%) belong to this category. Thus, single-round successful trajectories mainly correspond to candidates that are already executable without additional repair.
In contrast, all 263 trajectories that proceed to later rounds expose an execution failure in the first round. Their initial failures are dominated by AttributeError (164 trajectories, 62.36%) and TypeError (69 trajectories, 26.24%), while the remaining 30 trajectories (11.41%) contain other error types. Among the 29 multi-round trajectories that ultimately pass the official benchmark tests, 22 (75.86%) start with an AttributeError, six (20.69%) with a TypeError, and one (3.45%) with a RuntimeError. This indicates that successful multi-round correction is concentrated primarily on candidates for which their initial execution exposes concrete API-use or interface-related failures.
We further distinguish successful multi-round trajectories according to whether document re-retrieval is used. Of the 29 benchmark-successful multi-round trajectories, 16 (55.17%) invoke document re-retrieval, spanning six different tasks, whereas the remaining 13 are corrected using execution feedback with the current document context. Among the 16 successful re-retrieval trajectories, 14 (87.50%) expose an API-selection-related AttributeError in the first round; the remaining two expose such a failure in a later round. This pattern suggests that re-retrieval is most useful when execution reveals a missing or incorrectly selected API symbol, where the runtime failure provides new lexical evidence for retrieving a more relevant API document. In contrast, failures that can be corrected using the existing API context, such as argument, indexing, or implementation errors, can often be handled by direct execution-feedback-guided repair without updating the documents.
Table 13 summarizes the characteristics of multi-round trajectories according to their first-round failure types.
Table 13. Characteristics of multi-round trajectories on NdonnxEval.
A representative successful re-retrieval trajectory occurs in a task that requires column-wise centering of a two-dimensional array. The initial candidate invokes x.mean(axis=0), but execution produces AttributeError: ’Array’ object has no attribute ’mean’. The initially retrieved top-five documents do not contain the corresponding reduction API. EFRRCoder extracts the failed symbol mean from the exception and uses it to update the retrieval query. The next retrieval introduces ndonnx.mean, after which the candidate is repaired by replacing x.mean(axis=0) with ndx.mean(x, axis=0). The repaired candidate subsequently passes the self-generated execution inputs and the official benchmark tests. This example illustrates the setting in which re-retrieval is particularly useful: execution exposes an API-knowledge gap that was not resolved by the initial task-based retrieval.
By contrast, 13 of the 29 benchmark-successful multi-round trajectories are corrected without document re-retrieval, using execution feedback together with the current document context. These cases indicate that not all execution failures require external-knowledge updating. Failures related to arguments, indexing, data types, or implementation logic may be resolved through direct execution-feedback-guided repair when the current API-document context is sufficient.
The iterative process already incorporates early stopping rather than executing all three rounds unconditionally. Across the 845 trajectories, a fixed three-round strategy would require 2535 candidate rounds, whereas the observed stopping behavior results in only 1209 rounds. Therefore, the current stopping mechanism avoids approximately 52.31% of the potential iteration rounds. This does not imply an equivalent reduction in token consumption because different rounds have different inference costs, but it demonstrates that conditional termination substantially limits unnecessary iterations. Further cost reduction could be achieved through more adaptive iteration policies, for example by allocating additional repair rounds only to failures that are likely to benefit from re-retrieval or execution-guided repair.
Across these trajectories, 730 failed-execution feedback records are observed. Counting is performed per candidate trajectory per iteration: If candidate execution raises an exception on any self-generated execution input in a round, that round counts as one failure record, and the aggregated exception is used for error-type statistics. AttributeError occurs 297 times (40.68%), TypeError 187 times (25.62%), and RuntimeError 137 times (18.77%). Because the current EFRRCoder triggers document re-retrieval only for AttributeError-type nonexistent API calls, 297 of the 730 failure records (40.68%) enter the re-retrieval path, while the remaining 433 (59.32%) are mainly handled by execution-feedback-guided repair. Thus, 59.32% of the observed failure records do not enter the document re-retrieval path. However, this proportion should not be interpreted as the proportion of unresolved external-knowledge gaps. Exception types do not map directly to error causes: Some TypeError and RuntimeError cases may reflect missing knowledge about API signatures, parameter constraints, data types, or API composition, whereas others may result from incorrect application of API knowledge that is already available in the current context. Prior work similarly shows that providing accurate API knowledge does not necessarily guarantee correct API usage [6]. Therefore, indiscriminately expanding re-retrieval to all non-AttributeError failures may not address their underlying causes. More fine-grained error attribution that combines exception type, error message, failed code, current API documents, and execution state is an important direction for future work.
The same task may have multiple functionally similar or equivalent API implementations. Consequently, whether re-retrieval includes the particular API used in a reference implementation does not reliably measure document-update effectiveness. We therefore do not use the target-API hit rate as the primary re-retrieval metric; instead, we analyze re-retrieval triggers, iteration behavior, and final code-generation performance.

4.7. Limitations

Although EFRRCoder improves library-oriented code generation through execution-feedback-based re-retrieval and repair, several limitations remain.
First, the effectiveness of EFRRCoder is still constrained by document-retrieval quality. Although execution feedback enables the framework to update the initially retrieved documents, re-retrieval does not guarantee that the most relevant API documents are ranked at the top. Irrelevant or partially relevant documents may therefore remain in the context and limit the effectiveness of subsequent repair. More accurate execution-aware retrieval and document selection strategies could further improve the quality of external knowledge provided to the model.
Second, the current execution-state routing strategy is relatively coarse-grained. EFRRCoder mainly treats AttributeError caused by nonexistent API calls as evidence of a potential API-knowledge gap and triggers document re-retrieval accordingly, while other execution errors are handled directly through code repair. However, exception types do not correspond one-to-one with underlying error causes. For example, TypeError and RuntimeError may result either from missing knowledge of parameter constraints, data types, or API composition or from incorrect application of API knowledge already available in the current context. More fine-grained error-cause identification is therefore needed to distinguish missing-knowledge failures from API-use failures. Future work will investigate adaptive routing strategies that jointly consider the exception type, error message, failed symbol, failing code, current API-document context, and execution state to determine whether document re-retrieval, direct repair, or other API-use correction strategies are more appropriate.
Third, the selection and scale of the evaluated base models are constrained by the requirement to minimize prior knowledge of the target libraries. EFRRCoder is intended to investigate whether external API documentation and execution feedback can compensate for insufficient target-library knowledge; therefore, the selected models should not already possess substantial knowledge of the evaluated APIs. The current experiments use models for which this condition can be reasonably controlled. For substantially larger models, especially models for which their pre-training data are not fully disclosed, it is difficult to guarantee that the target libraries or their API usage patterns have not already been observed during training. Consequently, the current evaluation does not systematically cover larger-scale models. Future evaluation should consider models of different scales while carefully controlling or assessing their prior exposure to the target libraries.
Fourth, the self-generated execution inputs provide only runtime-failure signals rather than functional-correctness oracles because they contain no expected outputs or assertions. Consequently, a candidate may execute successfully on all generated inputs while remaining semantically incorrect, which can cause premature termination of the repair process. Future work could explore stronger oracle-free semantic verification or automatically generated output constraints while avoiding leakage from benchmark reference tests.

5. Discussion

The experimental results provide several observations about the behavior of EFRRCoder. First, EFRRCoder consistently benefits from combining external API documentation with execution feedback. On MonkeyEval and BeatNumEval, the method improves code-generation performance under both Llama-3.1-8B-Instruct and Qwen2.5-Coder-7B-Instruct. The ablation results further show that removing either document re-retrieval or execution-feedback-guided repair reduces performance, indicating that the two components provide complementary benefits. The sensitivity analysis also shows that the improvement is not restricted to a single retrieval depth or iteration setting.
Second, the results suggest that execution feedback is useful not only for repairing generated code but also for determining when the external document context should be updated. Static document retrieval can provide useful API knowledge, but an initially retrieved document set may be incomplete or misaligned with the API actually required by a candidate. EFRRCoder uses runtime failures as additional evidence for subsequent retrieval and repair. This interpretation is also consistent with the iteration analysis, where successful multi-round corrections are concentrated mainly on candidates for which their initial execution exposes concrete API-use or interface-related failures.
The cross-library experiments further show substantial performance differences among retrieval-based methods. In particular, CAPIR and EpiGEN obtain relatively low scores on NdonnxEval compared with EFRRCoder and several simpler baselines. This is an experimental observation; the current experiments do not directly measure the quality of their intermediate task decompositions and therefore do not establish a causal explanation for this performance difference. One possible interpretation is that both methods introduce an additional LLM-based decomposition stage before retrieval and generation. When the base model has limited knowledge of the target library, errors or unsupported API assumptions introduced during decomposition may propagate to subsequent retrieval and generation stages. Further analyses of intermediate decomposition outputs would be required to verify this explanation.
Finally, the improvement of EFRRCoder comes with additional inference and execution cost. Under the Qwen2.5-Coder-7B docstring-removed NdonnxEval setting, EFRRCoder consumes 8322 tokens per task on average compared with 4682 tokens for DocPrompting, corresponding to an increase of approximately 77.7%. Its average runtime is 11.58 s, whereas the compared methods require approximately 1.49–2.55 s. Thus, EFRRCoder improves absolute generation accuracy rather than token or latency efficiency. This trade-off makes the method more suitable for settings in which generation correctness is prioritized over inference cost, while one-shot retrieval methods may remain preferable under strict latency or computational-budget constraints.

6. Conclusions

This paper presents EFRRCoder, a library-oriented code generation method that combines execution-feedback-based document re-retrieval and code repair. Without additional LLM training, EFRRCoder uses self-generated execution inputs to obtain runtime feedback from candidate programs. When execution reveals a potential API-knowledge gap, the method uses the failed symbol and error information to update the external API-document context; other execution failures are handled through execution-feedback-guided repair with the current documents.
Experiments on MonkeyEval and BeatNumEval show consistent improvements across two base models. With Qwen2.5-Coder-7B-Instruct, EFRRCoder achieves 33.66%/36.63% pass@1/pass@5 on MonkeyEval and 44.16%/48.51% on BeatNumEval. With Llama-3.1-8B-Instruct, it achieves 15.64%/20.79% on MonkeyEval and 20.79%/25.74% on BeatNumEval. Supplementary cross-library experiments on NdonnxEval further show that EFRRCoder consistently outperforms the compared baselines under both Qwen2.5-Coder-7B-Instruct and Llama-3.1-8B-Instruct, with both docstring-removed and docstring-retained settings. Ablation studies show that both document re-retrieval and execution-feedback-guided repair contribute to the final performance.
These improvements introduce additional computational overhead. Under the Qwen2.5-Coder-7B-Instruct docstring-removed NdonnxEval setting, EFRRCoder consumes 8322 tokens per task on average compared with 4682 tokens for DocPrompting, an increase of approximately 77.7%, and requires an average runtime of 11.58 s. Therefore, the method trades additional inference and execution cost for higher absolute code-generation accuracy rather than improving token or latency efficiency.
Future work will focus on finer-grained execution-error attribution, stronger oracle-free execution inputs, more accurate feedback-driven retrieval, adaptive mechanisms that balance generation quality with inference cost, and evaluation under broader software-engineering task formats and more diverse prompting strategies.

Author Contributions

Conceptualization, Y.D.; methodology, M.C.; software, M.C.; validation, M.C.; formal analysis, M.C.; investigation, M.C.; writing—original draft preparation, M.C.; writing—review and editing, Y.D. and S.P.; supervision, Y.D. and S.P. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Key Technology Research and Development Program of Shandong Province (Grant No. 2025CXPT104) and the Fundamental Research Funds for the Central University (Grant No. 26CX05052A).

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The benchmark datasets used in this study are MonkeyEval, BeatNumEval, and NdonnxEval, as described in Refs. [6,8]. No new benchmark dataset was created in this study.

Acknowledgments

During the preparation of this manuscript, the authors used ChatGPT (OpenAI, GPT-5.6) for English translation and language polishing. The authors reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

Appendix A

Appendix A.1. Analysis of Document-Update Strategies

The main EFRRCoder implementation adopts a replacement strategy when document re-retrieval is triggered, where the newly retrieved document set replaces the previous document context. A potential limitation of this strategy is that previously retrieved documents that remain useful may be discarded across iterations. To examine this issue, we additionally implement a relevance-filtered fusion strategy and compare it with the replacement strategy.
Let D ( i ) denote the current document set and D r ( i ) the documents obtained by re-retrieval at iteration i. Under the replacement strategy, the document context is updated as
D ( i + 1 ) = D r ( i ) .
For the fusion strategy, the current and newly retrieved documents are first merged and deduplicated. The resulting document set is then ranked according to its BM25 relevance to the current re-retrieval query q r ( i ) , and only the top-k documents are retained:
D ( i + 1 ) = Retrieve BM 25 q r ( i ) , Dedup D ( i ) ∪ D r ( i ) , k .
This strategy allows potentially useful documents from previous iterations to remain available while limiting uncontrolled document accumulation through relevance filtering.
To isolate the effect of the document-update strategy, all other experimental settings are kept unchanged. Experiments are conducted using Qwen2.5-Coder-7B-Instruct on MonkeyEval and BeatNumEval. Each task generates five candidates, the document-retention parameter is set to top- k = 5 , three self-generated execution inputs are used, and the maximum number of iterations is three.
As shown in Table A1, the effect of document fusion is dataset-dependent. On MonkeyEval, relevance-filtered fusion improves pass@1 from 33.66% to 36.04% and pass@5 from 36.63% to 38.61%, corresponding to gains of 2.38 and 1.98 percentage points, respectively. This suggests that retaining previously retrieved documents can be beneficial when earlier iterations have already acquired useful API knowledge.
Table A1. Comparison of replacement and relevance-filtered fusion document-update strategies (%).
However, the same strategy degrades performance on BeatNumEval. Fusion reduces pass@1 from 44.16% to 41.39%, a decrease of 2.77 percentage points, and reduces pass@5 from 48.51% to 45.54%, a decrease of 2.97 percentage points. One possible explanation is that preserving earlier documents may also retain information that is less relevant to the current execution failure. Even after relevance filtering, such stale or weakly related documents may introduce additional context noise and interfere with subsequent repair.
These results indicate a trade-off between the two update strategies. Replacement keeps the document context focused on the most recent execution failure but may discard previously useful knowledge, whereas fusion preserves cross-iteration information but may also retain irrelevant or outdated documents. Therefore, relevance-filtered accumulation is not universally superior to replacement, and the appropriate document-update strategy can depend on the characteristics of the target library and retrieval results. Developing an adaptive update mechanism that decides whether to preserve or replace previous documents according to their relevance to the current execution state is a promising direction for future work.

Appendix A.2. Reliability and Runtime-Failure Coverage of Self-Generated Execution Inputs

EFRRCoder uses self-generated execution inputs as oracle-free execution inputs rather than functional-correctness tests. These inputs contain only input assignments and do not include expected outputs or assertions. For each task, the same validated input set is reused across candidates and repair iterations so that execution feedback remains comparable.
To examine the reliability and practical utility of these execution inputs, we analyze the relationship between the initial execution-input outcomes and the benchmark’s official evaluation on MonkeyEval and BeatNumEval. The official tests are used only for post hoc analysis and are never exposed to the generation or repair process.
Table A2. Relationship between initial execution-input outcomes and official evaluation.
The results show that successful execution of the generated inputs does not guarantee semantic correctness. Among candidates that pass the initial execution inputs, 43.72% on MonkeyEval and 30.58% on BeatNumEval still fail the official benchmark tests. This confirms that the self-generated execution inputs should not be interpreted as functional-correctness oracles.
At the same time, failures exposed by the execution inputs can provide useful runtime feedback. Among candidates that fail the initial execution inputs, 14.60% on MonkeyEval and 20.91% on BeatNumEval ultimately pass the official benchmark tests after the framework terminates. This shows that an initial execution-input failure should not itself be treated as a definitive correctness judgment. In many cases, such failures provide actionable feedback for subsequent repair, while some failures may also arise from generated execution inputs that are stricter than or different from the official benchmark cases.
Table A3. Exception types exposed by the initial self-generated execution inputs.
The exposed failures are not limited to a single exception category. AttributeError accounts for 250 of 274 (91.24%) initial failures on MonkeyEval and 169 of 263 (64.26%) on BeatNumEval, indicating that the execution inputs frequently expose unavailable or invalid attribute/API usage. They also expose TypeError, ValueError, IndexError, SyntaxError, and other execution failures. Therefore, the execution inputs provide broader execution-failure coverage rather than merely triggering one specific failure type.
However, exception categories alone cannot determine whether a failure is caused by missing API knowledge or by an implementation error. Moreover, because the inputs do not contain expected outputs, they cannot detect all semantically incorrect but executable programs. We therefore regard execution-input coverage as runtime-failure coverage rather than full functional coverage. Developing stronger execution inputs while preserving the oracle-free setting remains an important direction for future work.

Appendix A.3. Effect of Initial Document Retrieval

The ablation results reveal a mixed observation on MonkeyEval: The variant without API documentation achieves a higher pass@5 than the variant without re-retrieval, although its pass@1 is lower. In contrast, this pattern is not observed on BeatNumEval, where w/o Re-retrieval performs better than w/o API Docs on both metrics. This dataset-dependent result motivates a further investigation into whether initial BM25 retrieval is beneficial overall and whether fixed retrieved documents may occasionally interfere with subsequent repair.
To investigate this issue, we conduct an additional controlled experiment with a deferred-initial-retrieval variant. In the original setting, the top-k API documents retrieved by BM25 are provided before initial candidate generation. In the deferred variant, no API document is provided in the first round. Document retrieval is performed only when subsequent candidate execution exposes an API-related failure. All other settings, including the base model, top-k, number of self-generated execution inputs, maximum number of iterations, document replacement strategy, prompts, and evaluation protocol, are kept unchanged.
As shown in Table A4, deferring the initial retrieval reduces pass@1 by 7.92 percentage points on MonkeyEval and 10.10 percentage points on BeatNumEval. The corresponding pass@5 decreases are 5.94 and 8.91 percentage points, respectively. Therefore, the initial BM25 retrieval provides a net benefit on both benchmarks rather than being generally harmful.
Table A4. Effect of initial BM25 document retrieval (%).
The apparently counter-intuitive ablation result may therefore be related to the interaction between initial retrieval and document updating. In the w/o Re-retrieval variant, the initially retrieved documents remain fixed throughout subsequent repair. When the initial retrieval is misaligned with the task, irrelevant or misleading context may continue to affect later generations. In contrast, the w/o API Docs variant avoids this retrieval noise and instead relies on the model’s prior knowledge and execution feedback for repair. This provides a possible explanation for why w/o API Docs can occasionally outperform w/o Re-retrieval, even though initial retrieval is beneficial overall.
These findings suggest that completely removing or deferring initial retrieval is not an effective general remedy. Instead, a more appropriate direction is to retain the benefit of initial retrieval while preventing low-relevance documents from persistently affecting later repair. EFRRCoder addresses this problem through execution-feedback-based document updating, which allows the initial document context to be revised when candidate execution exposes an API knowledge gap. More adaptive retrieval gating or relevance-based filtering of the initial document set could further reduce retrieval-induced interference and is left for future work.

Appendix A.4. Prompt Sensitivity Analysis

To further investigate whether the effectiveness of EFRRCoder depends on the exact wording of the inference-time prompts, we conduct an additional prompt sensitivity experiment. This experiment is motivated by the concern that execution-input generation and execution-feedback-guided repair rely on LLM prompting and that carefully designed prompt wording may therefore affect the reported improvements. In particular, we aim to distinguish the contribution of the proposed execution-feedback framework from the effect of a particular prompt formulation.
It should first be clarified that the term training-free in this work refers to the absence of additional parameter optimization rather than the absence of inference-time prompting. EFRRCoder does not fine-tune the base LLM, perform continued pre-training, train an additional generator, or update model parameters. Instead, the same pretrained LLM is invoked with fixed prompt templates during inference for execution-input generation and execution-feedback-guided repair. In addition, the document re-retrieval operation itself is not performed by the LLM. When an AttributeError indicates a potentially unavailable API, the failed symbol is extracted from the exception using a deterministic rule, and a retrieval query is constructed from the task description, code context, exception type, failed symbol, and error message. The resulting query is then directly submitted to BM25 to retrieve updated API documentation.
To evaluate the sensitivity of the LLM-dependent stages to prompt wording, we construct three semantically equivalent prompt profiles:
  • Detailed (Original): The original prompt templates used in the main experiments. These prompts explicitly describe the available inputs, required output format, execution feedback, and generation constraints.
  • Compact: A shortened version of the original prompts. Redundant explanations are removed while the same task information, execution feedback, API-document context, and output constraints are preserved.
  • Paraphrased: A semantically equivalent reformulation of the original prompts. The wording and sentence organization are changed while preserving the same input information, constraints, and expected output.
No additional task information, API names, reference solutions, execution results, or external knowledge are introduced in the Compact or Paraphrased profiles. Therefore, the three configurations differ primarily in the natural-language formulation of the instructions rather than in the information available to the model.
To ensure a controlled comparison, all non-prompt experimental settings are kept unchanged. We use Qwen2.5-Coder-7B as the base model, retain the top five API documents, generate three self-generated execution inputs for each task, allow at most three iterations, and generate five candidate programs per task. The temperature and top-p are fixed at 0.2 and 1.0, respectively. The original EFRRCoder execution-state routing strategy is also retained: Only nonexistent API calls exposed through AttributeError trigger document re-retrieval, whereas other execution errors retain the current document context and enter execution-feedback-guided repair directly. The replacement strategy is used for document updating. Separate execution-input caches are used for the three prompt profiles so that the effect of changing the execution-input-generation prompt is not hidden by reusing inputs generated under another prompt configuration.
Table A5 reports the results on MonkeyEval and BeatNumEval.
The results show that prompt formulation has a measurable but bounded influence on EFRRCoder. On MonkeyEval, replacing the original Detailed prompt with the Compact version decreases pass@1 from 33.66% to 31.09%, while pass@5 remains unchanged at 36.63%. The Paraphrased profile results in a larger reduction, reaching 29.31% pass@1 and 31.68% pass@5. Relative to the original prompt, the largest absolute decreases on MonkeyEval are therefore 4.35 percentage points for pass@1 and 4.95 percentage points for pass@5.
Table A5. Prompt sensitivity analysis on MonkeyEval and BeatNumEval (%).
The variation is smaller on BeatNumEval. The Detailed, Compact, and Paraphrased profiles obtain pass@1 scores of 44.16%, 41.58%, and 41.39%, respectively. Their pass@5 scores are 48.51%, 45.54%, and 45.54%. The largest reductions relative to the original prompt are 2.77 percentage points for pass@1 and 2.97 percentage points for pass@5. These results indicate that the exact wording of the prompts can influence the model’s ability to interpret execution feedback and produce repaired code, and the degree of sensitivity may differ between target libraries.
Importantly, however, the performance improvement of EFRRCoder is not restricted to the original Detailed prompt. Even under the lowest-performing Paraphrased setting, EFRRCoder still achieves 29.31% pass@1 and 31.68% pass@5 on MonkeyEval compared with 28.32% and 29.70%, respectively, for DocPrompting in the main experiment. This corresponds to improvements of 0.99 and 1.98 percentage points. On BeatNumEval, the Paraphrased profile obtains 41.39% pass@1 and 45.54% pass@5 compared with 37.03% and 42.57% for DocPrompting, corresponding to improvements of 4.36 and 2.97 percentage points. Thus, although prompt wording affects the absolute performance, the advantage over one-shot document retrieval is preserved under all three tested prompt formulations.
The experiment also helps distinguish task-specific prompt instantiation from task-specific prompt engineering. The same prompt template is shared by all tasks within an experimental setting; only placeholders such as the task description, starter code, retrieved API documents, failed candidate, and execution error are instantiated with task-specific information. No prompt is manually redesigned for an individual benchmark task. The observed results therefore suggest that the framework does not depend on manually constructed per-task instructions.
Regarding generalizability across software libraries, the main experiments evaluate MonkeyEval and BeatNumEval, while the cross-library experiments further evaluate EFRRCoder on NdonnxEval. The latter uses a different target software library and is evaluated with both Qwen2.5-Coder-7B and Llama-3.1-8B under both docstring-removed and docstring-retained settings. Together with the prompt sensitivity results above, these experiments provide evidence that the execution-feedback framework can operate across different target libraries and that its effectiveness is not restricted to one exact prompt wording.
Nevertheless, these results should not be interpreted as demonstrating complete prompt invariance or generalization to arbitrary code-generation task formats. The three prompt profiles preserve the same semantic information and differ mainly in wording and instruction granularity, and MonkeyEval, BeatNumEval, and NdonnxEval all primarily follow a library-oriented function-completion setting. More substantial changes in prompt structure, prompting strategy, or task format may produce different behavior. Evaluating EFRRCoder under broader software-engineering tasks and more diverse prompting strategies therefore remains an important direction for future work.

Appendix A.5. Case Study of Multi-Round Re-Retrieval and Repair

To provide a more concrete understanding of when multi-round iteration and document re-retrieval are useful, we further examine a representative successful trajectory from the Qwen2.5-Coder-7B docstring-removed NdonnxEval experiment. The selected case illustrates how execution feedback exposes an API-selection failure that is not resolved by the initial retrieval and how the failed symbol subsequently guides document re-retrieval and code repair.

API-Knowledge Gap Resolved by Re-Retrieval

This case is taken from task subset_3_054 in NdonnxEval. The task requires a two-dimensional numeric array to be centered column-wise by subtracting the column means and then transposed. The initially retrieved top-five API documents are as follows:
  • ndonnx.extensions.is_numeric_dtype;
  • ndonnx.Array.astype;
  • ndonnx.where;
  • ndonnx.extensions.put;
  • ndonnx.extensions.is_nullable_dtype.
None of these documents directly describes the mean-reduction operation. Based on its prior knowledge, the model generates the following initial completion:
  • means = x.mean(axis=0)
  • centered_x = x - means
  • transposed_x = centered_x.T
  • return transposed_x
When this candidate is executed on the self-generated inputs, the first round produces the following exception:
  • AttributeError: ’Array’ object has no attribute ’mean’
EFRRCoder classifies this failure as an API-selection error and extracts mean as the failed symbol. The original task information is then augmented with the execution feedback to construct the re-retrieval query. The updated top-five documents are as follows:
  • ndonnx.mean;
  • ndonnx.Array.to_device;
  • ndonnx.DType;
  • ndonnx.can_cast;
  • ndonnx.Array.astype.
Re-retrieval therefore introduces ndonnx.mean, which was absent from the initial document set. Using the updated documents together with the execution feedback, EFRRCoder generates the second-round completion:
  • means = ndx.mean(x, axis=0)
  • centered_x = x - means
  • transposed_x = centered_x.T
  • return transposed_x
All three self-generated execution inputs subsequently execute successfully, and the final candidate also passes the official benchmark tests. The trajectory can therefore be summarized as
x . mean → AttributeError ( mean ) → re - retrieval → ndonnx . mean → successful repair .
This case illustrates the situation in which re-retrieval is particularly useful. The initial task-based retrieval does not provide the API knowledge required to implement the reduction operation, while program execution exposes a concrete failed symbol. The failed symbol supplies more specific retrieval evidence than the original natural-language requirement and allows the retriever to obtain a relevant API document in the subsequent round.

Appendix A.6. Extension of Re-Retrieval to TypeError

Using Qwen2.5-Coder-7B under the docstring-removed NdonnxEval setting, we further examine whether the execution-feedback-based re-retrieval mechanism can be extended beyond AttributeError. In this additional experiment, TypeError is also treated as a potential trigger for document re-retrieval. In the original EFRRCoder routing strategy, TypeError retains the current API-document context and directly enters execution-feedback-guided repair. In the extended setting, a TypeError exposed by the self-generated execution inputs is instead routed to document re-retrieval before subsequent repair.
Unlike the original AttributeError-triggered re-retrieval query described in Equation (7), the TypeError extension does not directly include the raw TypeError exception message in the BM25 retrieval query. Instead, the query uses the task information, the error type, and the failed API or symbol extracted from the failed candidate. Therefore, the extension does not rely on manually specified exception-message patterns such as unexpected keyword argument; rather, it examines whether treating TypeError more generally as a potential API-knowledge-gap signal can improve generation.
As shown in Table A6, the original AttributeError-focused routing achieves 25.44% pass@1 and 30.18% pass@5, whereas extending re-retrieval to TypeError obtains 24.97% pass@1 and 30.18% pass@5. Thus, the extension decreases pass@1 by 0.47 percentage points and leaves pass@5 unchanged.
Trace analysis further shows that TypeError-triggered re-retrieval is activated 162 times across 120 candidate trajectories from 40 tasks. The observed TypeErrors are heterogeneous and include unsupported operand types, invalid data-type conversions, positional-argument mismatches, unexpected keyword arguments, and other runtime contract violations. This indicates that TypeError does not correspond to a single underlying cause. Some cases may reflect insufficient knowledge of an API signature or parameter constraint, whereas others arise from input types, data-flow decisions, or implementation logic. This observation is consistent with prior findings that providing accurate API knowledge alone does not guarantee that an LLM can correctly apply that knowledge during code generation [6]. Therefore, a TypeError may indicate either missing API knowledge or a failure to correctly use knowledge that is already available, making exception type alone an insufficient signal for deciding whether additional retrieval is necessary.
Extending the routing rule also substantially increases retrieval activity. The number of candidate trajectories in which document re-retrieval is attempted increases from 175 under the original routing strategy to 243 under the TypeError extension. However, this additional retrieval activity does not translate into higher overall accuracy. These results suggest that treating all TypeErrors as API-knowledge-gap signals is overly broad: additional documentation is not necessarily useful when the underlying failure is caused by implementation or data-type logic rather than missing API knowledge.
We therefore retain the more conservative AttributeError-focused routing in the main EFRRCoder framework. More fine-grained error attribution that jointly considers the exception type, failed symbol, failing code, current API-document context, and execution state may provide a better basis for determining whether a TypeError should trigger document re-retrieval.
Table A6. Comparison of the original routing strategy and the TypeError re-retrieval extension on NdonnxEval using Qwen2.5-Coder-7B under the docstring-removed setting.

References

  1. Zan, D.; Chen, B.; Yang, D.; Lin, Z.; Kim, M.; Guan, B.; Wang, Y.; Chen, W.; Lou, J.-G. CERT: Continual pre-training on sketches for library-oriented code generation. In Proceedings of the Thirty-First International Joint Conference on Artificial Intelligence, Vienna, Austria, 23–29 July 2022; International Joint Conferences on Artificial Intelligence Organization: Menlo Park, CA, USA, 2022; pp. 2369–2375. [Google Scholar]
  2. Liu, M.; Yang, T.; Lou, Y.; Du, X.; Wang, Y.; Peng, X. CodeGen4Libs: A two-stage approach for library-oriented code generation. In Proceedings of the 38th IEEE/ACM International Conference on Automated Software Engineering, Luxembourg, 11–15 September 2023; IEEE: New York, NY, USA, 2023; pp. 434–445. [Google Scholar]
  3. Chen, Y.; Chen, M.; Gao, C.; Jiang, Z.; Li, Z.; Ma, Y. Towards mitigating API hallucination in code generated by LLMs with hierarchical dependency aware. In Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering; ACM: New York, NY, USA, 2025; pp. 468–479. [Google Scholar]
  4. Li, S.; Li, S.; Zhang, H.; Li, S.; Chen, K.; Yuan, J.; Cao, Y.; Yang, L. EpiGEN: An efficient multi-API code generation framework under enterprise scenario. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation, Torino, Italy, 20–25 May 2024; ELRA and ICCL: Paris, France, 2024; pp. 6206–6215. [Google Scholar]
  5. Ma, Z.; An, S.; Xie, B.; Lin, Z. Compositional API recommendation for library-oriented code generation. In Proceedings of the 32nd IEEE/ACM International Conference on Program Comprehension, Lisbon, Portugal, 15–16 April 2024; IEEE: New York, NY, USA, 2024; pp. 87–98. [Google Scholar]
  6. Zhang, Y.; Li, C.; Chen, R.; Yang, G.; Jia, X.; Ren, Y.; Li, J. To see is not to master: Teaching LLMs to use private libraries for code generation. arXiv 2026, arXiv:2603.15159. [Google Scholar]
  7. Zhou, S.; Alon, U.; Xu, F.; Wang, Z.; Jiang, Z.; Neubig, G. DocPrompting: Generating code by retrieving the docs. In Proceedings of the Eleventh International Conference on Learning Representations, Kigali, Rwanda, 1–5 May 2023; OpenReview.net: Amherst, MA, USA, 2023. [Google Scholar]
  8. Zan, D.; Chen, B.; Lin, Z.; Guan, B.; Yongji, W.; Lou, J.G. When language model meets private library. In Findings of the Association for Computational Linguistics: EMNLP 2022, Abu Dhabi, United Arab Emirates, 7–11 December 2022; Association for Computational Linguistics: Stroudsburg, PA, USA, 2022; pp. 277–288. [Google Scholar]
  9. Ni, A.; Iyer, S.; Radev, D.; Stoyanov, V.; Yih, W.T.; Wang, S.; Lin, X.V. LEVER: Learning to verify language-to-code generation with execution. In Proceedings of the 40th International Conference on Machine Learning, Honolulu, HI, USA, 23–29 July 2023; PMLR: Brooklyn, NY, USA, 2023; pp. 26106–26128. [Google Scholar]
  10. Chen, X.; Lin, M.; Schaerli, N.; Zhou, D. Teaching large language models to self-debug. In Proceedings of the Twelfth International Conference on Learning Representations, Vienna, Austria, 7–11 May 2024; OpenReview.net: Amherst, MA, USA, 2024; pp. 8746–8825. [Google Scholar]
  11. Zhang, F.; Chen, B.; Zhang, Y.; Keung, J.; Liu, J.; Zan, D.; Mao, Y.; Lou, J.G.; Chen, W. RepoCoder: Repository-level code completion through iterative retrieval and generation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, Singapore, 6–10 December 2023; Association for Computational Linguistics: Stroudsburg, PA, USA, 2023; pp. 2471–2484. [Google Scholar]
  12. Parvez, M.R.; Ahmad, W.; Chakraborty, S.; Ray, B.; Chang, K.W. Retrieval augmented code generation and summarization. In Findings of the Association for Computational Linguistics: EMNLP 2021, Punta Cana, Dominican Republic, 7–11 November 2021; Association for Computational Linguistics: Stroudsburg, PA, USA, 2021; pp. 2719–2734. [Google Scholar]
  13. Wang, Z.; Asai, A.; Yu, X.V.; Xu, F.F.; Xie, Y.; Neubig, G.; Fried, D. CodeRAG-Bench: Can retrieval augment code generation? In Findings of the Association for Computational Linguistics: NAACL 2025, Albuquerque, NM, USA, 29 April–4 May 2025; Association for Computational Linguistics: Stroudsburg, PA, USA, 2025; pp. 3199–3214. [Google Scholar]
  14. Shao, Z.; Gong, Y.; Shen, Y.; Huang, M.; Duan, N.; Chen, W. Enhancing retrieval-augmented large language models with iterative retrieval-generation synergy. In Findings of the Association for Computational Linguistics: EMNLP 2023, Singapore, 6–10 December 2023; Association for Computational Linguistics: Stroudsburg, PA, USA, 2023; pp. 9248–9274. [Google Scholar]
  15. Jiang, Z.; Xu, F.; Gao, L.; Sun, Z.; Liu, Q.; Dwivedi-Yu, J.; Yang, Y.; Callan, J.; Neubig, G. Active retrieval augmented generation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, Singapore, 6–10 December 2023; Association for Computational Linguistics: Stroudsburg, PA, USA, 2023; pp. 7969–7992. [Google Scholar]
  16. Su, W.; Tang, Y.; Ai, Q.; Wu, Z.; Liu, Y. DRAGIN: Dynamic retrieval augmented generation based on the real-time information needs of large language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics, Bangkok, Thailand, 11–16 August 2024; Association for Computational Linguistics: Stroudsburg, PA, USA, 2024; Volume 1, pp. 12991–13013. [Google Scholar]
  17. Chen, B.; Zhang, F.; Nguyen, A.; Zan, D.; Lin, Z.; Lou, J.G.; Chen, W. CodeT: Code generation with generated tests. In Proceedings of the Eleventh International Conference on Learning Representations, Kigali, Rwanda, 1–5 May 2023. [Google Scholar]
  18. He, X.; Zou, J.; Lin, Y.; Zhou, M.; Han, S.; Yuan, Z.; Zhang, D. CoCoST: Automatic complex code generation with online searching and correctness testing. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, Miami, FL, USA, 12–16 November 2024; Association for Computational Linguistics: Stroudsburg, PA, USA, 2024; pp. 19433–19451. [Google Scholar]
  19. Ma, Y.; Shao, Y.; Li, P.; Song, D.; Guo, Q.; Li, L.; Qiu, X.; Chen, K. UnitCoder: Scalable code synthesis from pre-training corpora. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, Suzhou, China, 4–9 November 2025; Association for Computational Linguistics: Stroudsburg, PA, USA, 2025; pp. 5623–5641. [Google Scholar]
  20. Zhang, K.; Li, Z.; Li, J.; Li, G.; Jin, Z. Self-Edit: Fault-aware code editor for code generation. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics Toronto, Canada, 9–14 July 2023; Association for Computational Linguistics: Stroudsburg, PA, USA, 2023; pp. 769–787. [Google Scholar]
  21. Zhong, L.; Wang, Z.; Shang, J. Debug like a Human: A Large Language Model Debugger via Verifying Runtime Execution Step by Step. In Findings of the Association for Computational Linguistics: ACL 2024, Bangkok, Thailand, 11–16 August 2024; Association for Computational Linguistics: Stroudsburg, PA, USA, 2024; pp. 851–870. [Google Scholar]
  22. Yang, J.; Prabhakar, A.; Narasimhan, K.; Yao, S. InterCode: Standardizing and benchmarking interactive coding with execution feedback. In Advances in Neural Information Processing Systems, New Orleans, LA, USA, 10–16 December 2023; Curran Associates, Inc.: Red Hook, NY, USA, 2023; Volume 36, pp. 23826–23854. [Google Scholar]
  23. Shinn, N.; Cassano, F.; Gopinath, A.; Narasimhan, K.; Yao, S. Reflexion: Language agents with verbal reinforcement learning. In Advances in Neural Information Processing Systems, New Orleans, LA, USA, 10–16 December 2023; Curran Associates, Inc.: Red Hook, NY, USA, 2023; Volume 36, pp. 8634–8652. [Google Scholar]
  24. Robertson, S.E.; Walker, S.; Jones, S.; Hancock-Beaulieu, M.M.; Gatford, M. Okapi at TREC-3. In Proceedings of the Third Text REtrieval Conference (TREC-3); National Institute of Standards and Technology: Gaithersburg, MD, USA, 1994; pp. 109–126. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.