paper-with-me

Papers

From Context to Intent: Reasoning-Guided Function-Level Code Completion

2025-08-13 · Yanzhou Li, Tianlin Li, Yiran Zhang, Shangqing Liu, Aishan Liu, Xianglong Liu, Yang Liu arxiv

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 context, we propose a reasoning-based prompting framework that guides LLMs to utilize these contextual cues to infer intent step by step. To incentivize LLMs to reason through the preceding code and infer intent, we further curate a dataset of 40k examples, each annotated with intermediate reasoning traces and corresponding docstrings. Extensive experiments on DevEval and ComplexCodeEval demonstrate consistent performance improvements across multiple models, achieving over 25% relative gains in pass@1 for both DeepSeekCoder and CodeLLaMA families. Building upon our framework, we further develop an intent-interactive platform that supports lightweight human feedback. This platform allows developers to select from a set of candidate intentions or edit the intent to better guide the model. Our experiments show that this interactive approach leads to further performance improvements.

📄 PDF Abstract BibTeX arXiv:2508.09537

Code (0)

등록된 구현이 없습니다.

Tasks

Code Completion

Similar Papers 제목 키워드 기반

Think Before You Act: Intention-Guided Reasoning for LLM-Based Location Prediction

2026-06-06 · Qingxiang Liu, Anqi Liang, Zhuoyang Jiang, Yutian Jiang 외 arxiv

Predicting a user's next Point-of-Interest (POI) based on their historical check-in records is a fundamental task in location-based services. While recent methods incorporating large language models have shown strong rea…

Beyond Function-Level Search: Repository-Aware Dual-Encoder Code Retrieval with Adversarial Verification

2025-10-16 · Aofan Liu, Shiyuan Song, Haoxuan Li, Cehao Yang 외 arxiv

The escalating complexity of modern codebases has intensified the need for retrieval systems capable of interpreting cross-component change intents, a capability fundamentally absent in conventional function-level search…

Natural Language Queries

CogGuide: Human-Like Guidance for Zero-Shot Omni-Modal Reasoning

2025-09-08 · Zhou-Peng Shou, Zhi-Qiang You, Fang Wang, Hai-Bo Liu arxiv

Targeting the issues of "shortcuts" and insufficient contextual understanding in complex cross-modal reasoning of multimodal large models, this paper proposes a zero-shot multimodal reasoning component guided by human-li…

Multimodal Reasoning

IntentMiner: Intent Inversion Attack via Tool Call Analysis in the Model Context Protocol

2025-12-16 · Yunhao Yao, Zhiqiang Wang, Haoran Cheng, Yihang Cheng 외 arxiv

The evolution of Large Language Models (LLMs) into Agentic AI has established the Model Context Protocol (MCP) as the standard for connecting reasoning engines with external tools. Although this decoupled architecture fo…

Semantic Parsing

LLM-Guided Semantic Relational Reasoning for Multimodal Intent Recognition

2025-09-01 · Qianrui Zhou, Hua Xu, Yifan Wang, Xinzhi Dong 외 arxiv

Understanding human intents from multimodal signals is critical for analyzing human behaviors and enhancing human-machine interactions in real-world scenarios. However, existing methods exhibit limitations in their modal…

Multimodal Intent RecognitionRelational Reasoning