Pith. sign in

REVIEW 5 cited by

Teaching Code LLMs to Use Autocompletion Tools in Repository-Level Code Generation

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2401.06391 v3 pith:G6H5FJOX submitted 2024-01-12 cs.SE

classification cs.SE
keywords codetoolgengenerationautocompletionrepository-leveldependencyfunctionsllms
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Code large language models (LLMs) face limitations in repository-level code generation due to their lack of awareness of repository-level dependencies (e.g., user-defined attributes), resulting in dependency errors such as undefined-variable and no-member errors. In this work, we introduce ToolGen, an approach that integrates autocompletion tools into the code LLM generation process to address these dependencies. ToolGen comprises two main phases: Trigger Insertion and Model Fine-tuning (Offline), and Tool-integrated Code Generation (Online). During the offline phase, ToolGen augments functions within a given code corpus with a special mark token, indicating positions to trigger autocompletion tools. These augmented functions, along with their corresponding docstrings, are then used to fine-tune a selected code LLM. In the online phase, ToolGen iteratively generates functions by predicting tokens step-by-step using the fine-tuned LLM. Whenever a mark token is encountered, ToolGen invokes the autocompletion tool to suggest code completions and selects the most appropriate one. We conduct comprehensive experiments to evaluate ToolGen's effectiveness in repository-level code generation. To facilitate this evaluation, we create a benchmark comprising 671 real-world code repositories and introduce two new dependency-based metrics: Dependency Coverage and Static Validity Rate. The results demonstrate that ToolGen significantly improves Dependency Coverage by 31.4% to 39.1% and Static Validity Rate by 44.9% to 57.7% across the three LLMs, while maintaining competitive or improved performance in widely recognized similarity metrics such as BLEU-4, CodeBLEU, Edit Similarity, and Exact Match. On the CoderEval dataset, ToolGen achieves improvements of 40.0% and 25.0% in Pass@1 for CodeT5 and CodeLlama, respectively.

Discussion (0). Sign in to comment.

Forward citations

Cited by 5 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Models

    cs.SE 2026-07 conditional novelty 7.0 of 10

    RepoReasoner is a repository-level code-reasoning benchmark with output-prediction and call-chain tasks; the best LLM reaches only 69.1% Pass@1 even with oracle context, with low recall in dependency tracing.

  2. Enhancing Project-Specific Code Completion by Inferring Internal API Information

    cs.SE 2025-07 conditional novelty 6.0 of 10

    A retrieval-augmented code completion method that infers project-internal APIs from a rough draft and a static knowledge base, beating existing repo-level baselines.

  3. A Deep Dive into Retrieval-Augmented Generation for Code Completion: Experience on WeChat

    cs.SE 2025-07 conditional novelty 5.0 of 10

    On WeChat's closed-source codebase, similarity-based RAG with combined BM25 and GTE-Qwen retrieval improves open-source LLM code completion more than identifier-based retrieval, with gains growing for larger models.

  4. Accelerating Automatic Program Repair with Dual Retrieval-Augmented Fine-Tuning and Patch Generation on Large Language Models

    cs.SE 2025-07 conditional novelty 4.0 of 10

    A dual-retrieval, threshold-gated, full-parameter fine-tuned code LLM (SelRepair) reports state-of-the-art exact-match patch generation on Tufano and VulRepair benchmarks.

  5. LLM-Based Agentic Systems for Software Engineering: Challenges and Opportunities

    cs.SE 2026-01 unverdicted novelty 2.0 of 10

    A survey of LLM-based multi-agent systems across the software development life cycle, plus a research agenda for orchestration, human coordination, cost, and data.

Pith tools