Search papers, labs, and topics across Lattice.
This study investigates the impact of line-anchored feedback on the efficiency and correctness of generative AI (GAI) code editing by comparing traditional holistic prompts with a structured approach using the FileMark extension. The results indicate that line anchoring significantly reduces the number of generated tokens鈥攂y 22% to 58%鈥攚hile simultaneously enhancing correctness, particularly for local models, which saw improvements of up to 7 points. These findings suggest that line-anchored feedback not only lowers operational costs but also boosts the performance of weaker models in code editing tasks.
Line-anchored feedback can slash token generation costs by up to 58% while simultaneously improving correctness in AI code editing tasks.
Generated tokens are a direct driver of the cost, latency, and energy of generative AI (GAI) code editing. We show the format of feedback is a lever on all three. We compare two deliveries of the same requested changes: a holistic prompt (control) versus the structured, line-anchored export of FileMark (treatment). FileMark is a VSCodium extension for inline comments on any file. In a paired experiment line anchoring cut generated tokens by 22% (Claude Opus) and 58% (Claude Sonnet), reaching 24%-80% on files of 100 lines or more, with four of seven models generating significantly fewer tokens after multiple-testing correction. Correctness rose where models had headroom: +2.0 points pooled and +5 to +7 points for three of five local models. An exploratory experiment in which the harness, not the GAI model, applies function-level patches shows the correctness benefit grows further when the edit-application burden is lifted: local-model correctness on 100+ line files roughly triples under anchoring. Line-anchored feedback reduces what stronger models spend and improves what weaker models get right.