ResearchPod Summary
This study investigates how the structure of feedback provided to generative AI (GAI) models impacts their performance in code editing tasks. The author compares two delivery methods: a traditional holistic prompt (control) and a structured, line-anchored format generated by the FileMark VSCodium extension (treatment). The experiment uses a paired design across 36 task instances, ranging from under 10 to over 1,000 lines of code, evaluating five local open-weight models and two frontier models (Claude Opus and Sonnet). The study measures two primary outcomes: token efficiency (the number of tokens generated) and correctness (the ability to successfully implement requested changes).
Line-anchored feedback acts as a powerful lever for efficiency. Frontier models showed substantial reductions in token generation, with Claude Sonnet achieving a 58% reduction and Claude Opus a 22% reduction. These gains were even more pronounced on larger files (100+ lines), where token savings reached up to 80%. Regarding correctness, the structured format provided a performance boost for models with sufficient headroom, with three of five local models seeing a 5 to 7 percentage point increase in correctness. An exploratory experiment revealed that when the burden of applying edits is removed from the model, the correctness benefits of line anchoring for local models increase significantly.
As GAI-assisted coding becomes standard, the costs associated with inference—latency, energy, and monetary expense—have become critical concerns. This research demonstrates that developers can optimize these costs without sacrificing performance simply by changing how they structure their feedback. By moving away from holistic prompts toward granular, line-anchored communication, organizations can improve the reliability of smaller, local models while reducing the operational overhead of larger, frontier models.
AI-generated third-party summary by ResearchPod. Not official content or an endorsement by the paper authors or affiliated organizations.