根据开发者反馈动态调整代码建议时机,提升采纳率并节省75%推理开销。
Optimizing LLM Code Suggestions: Feedback-Driven Timing with Lightweight State Bounds
- 用接受率和认知状态预测动态调节建议延迟时间。
- 采纳率从4.9%提至18.6%,盲拒率从8.3%降至0.36%。
- 适合追求高效实用的开发工具团队与工程化落地者。
大语言模型(LLMs)已改变代码自动补全,能生成上下文感知的建议。然而何时呈现建议仍缺乏研究,常导致干扰或无效推理调用。本文提出一种自适应时机机制,根据实时开发者反馈动态调整建议延迟。方法结合近期接受率的逻辑变换与有限延迟范围,以高层二值预测开发者认知状态为锚点。在两个月的真实部署中,系统将建议采纳率从无延迟时的4.9%提升至静态延迟下的15.4%,再增至自适应时机的18.6%;同时盲拒率从8.3%降至0.36%。整体使采纳率提升并减少75%的无效推理调用,显著提高基于LLM的代码助手效率与成本效益。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have transformed code auto-completion by generating context-aware suggestions. Yet, deciding when to present these suggestions remains underexplored, often leading to interruptions or wasted inference calls. We propose an adaptive timing mechanism that dynamically adjusts the delay before offering a suggestion based on real-time developer feedback. Our suggested method combines a logistic transform of recent acceptance rates with a bounded delay range, anchored by a high-level binary prediction of the developer's cognitive state. In a two-month deployment with professional developers, our system improved suggestion acceptance from 4.9% with no delay to 15.4% with static delays, and to 18.6% with adaptive timing-while reducing blind rejections (rejections without being read) from 8.3% to 0.36%. Together, these improvements increase acceptance and substantially reduce wasted inference calls by 75%, making LLM-based code assistants more efficient and cost-effective in practice.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。