NeFut Logo NeFut
Admin Login

[CS.AI] Line-Anchored Feedback: Reducing Costs and Improving Accuracy in AI Code Editing

Published at: 2026-07-16 22:00 Last updated: 2026-07-17 08:45
#algorithm #AI #Open Source

In generative AI (GAI) code editing, generated tokens directly impact cost, latency, and energy consumption. This study shows that the format of feedback can affect all three factors. We compared two delivery methods: a holistic prompt (control) versus a structured, line-anchored export (treatment) provided by FileMark, a VSCodium extension for inline comments on any file.

In a paired experiment, line anchoring reduced generated tokens by 22% (Claude Opus) and 58% (Claude Sonnet), achieving a reduction of 24%-80% for files with over 100 lines. Four out of seven models generated significantly fewer tokens after multiple-testing correction. Accuracy improved where models had headroom: a pooled increase of 2.0 points and 5 to 7 points for three of five local models.

An exploratory experiment indicated that when the burden of edit application is lifted from the GAI model to the harness, the correctness benefit grows further, with local model accuracy roughly tripling on files over 100 lines under anchoring. Line-anchored feedback reduces the token expenditure of stronger models while improving the accuracy of weaker models.

Blogger's Review: This article highlights the potential of line-anchored feedback in AI code editing, significantly reducing token generation and enhancing model accuracy, which effectively lowers costs and energy consumption. This approach offers valuable insights for the optimization of future coding tools and AI models, warranting further investigation and application.

Original Source: https://arxiv.org/abs/2607.12713

[h] Back to Home