[2508.09537] From Context to Intent: Reasoning-Guided Function-Level Code Completion
About this article
Abstract page for arXiv paper 2508.09537: From Context to Intent: Reasoning-Guided Function-Level Code Completion
Computer Science > Software Engineering arXiv:2508.09537 (cs) [Submitted on 13 Aug 2025 (v1), last revised 24 Mar 2026 (this version, v2)] Title:From Context to Intent: Reasoning-Guided Function-Level Code Completion Authors:Yanzhou Li, Tianlin Li, Yiran Zhang, Shangqing Liu, Aishan Liu, Xianglong Liu, Yang Liu View a PDF of the paper titled From Context to Intent: Reasoning-Guided Function-Level Code Completion, by Yanzhou Li and 6 other authors View PDF HTML (experimental) Abstract:The growing capabilities of Large Language Models (LLMs) have led to their widespread adoption for function completion within code repositories. Recent studies on such tasks show promising results when explicit instructions, often in the form of docstrings, are available to guide the completion. However, in real-world scenarios, clear docstrings are frequently absent. Under such conditions, LLMs typically fail to produce accurate completions. To enable more automated and accurate function completion in such settings, we aim to enable LLMs to accurately infer the developer's intent prior to code completion. Our key insight is that the preceding code, namely the code context before the function to be completed, often contains valuable cues that help the model understand the intended functionality. However, inferring intent from such implicit context is non-trivial and constitutes a core challenge in function-level code completion. To tackle this challenge, inspired by how humans interpret contex...