
Share
Aider革新了代码编辑流程,采用双模型架构--一个负责问题解决思路的建筑师模型和一个执行具体编码修改的编辑器模型,从而在代码编辑基准测试中达到顶尖水平。
Aider, a leading AI coding assistant, has introduced an innovative approach to code editing by splitting the task into two distinct phases: reasoning and editing. This new method leverages two models-an Architect model for describing how to solve the problem and an Editor model for generating specific code edits. The result? State-of-the-art (SOTA) performance on Aider's code editing benchmark.
This separation has led to significant improvements in both accuracy and efficiency. For instance, using OpenAI's o1-preview as the Architect with either DeepSeek or o1-mini as the Editor produced an impressive SOTA score of 85%.
The motivation behind this approach stems from the release of OpenAI’s o1 models. These models excel at reasoning but often struggle to produce properly formatted code editing instructions. By letting the Architect describe the solution in its preferred manner and then passing that output to a more traditional LLM (the Editor), Aider can achieve better results.
In the traditional method, Aider asks a single model to solve a coding problem within one prompt. This model must:

This approach requires the model to balance solving the problem and adhering to the edit format, which can be challenging.
The new method splits the task into two steps:
Architect Phase:
Editor Phase:
Aider's benchmarking results show a clear advantage of the Architect/Editor approach:
This new approach not only improves the quality of code edits but also enhances the user experience. By leveraging the strengths of different models, Aider can provide a more interactive and efficient coding assistant that closely mimics pair programming with an AI partner.
The Architect/Editor model approach represents a significant step forward in AI-assisted code editing. By separating reasoning from editing, Aider has achieved state-of-the-art results, making it a powerful tool for developers looking to enhance their productivity and code quality.
Tags
Original Sources
About the author
Kai built ML infrastructure at a Bay Area startup before developing an obsession with transformer architectures and inference optimisation that eventually pulled him out of product work entirely. A stint at a compute research lab sharpened his instinct for what actually matters in a model release versus what is marketing. He writes from the inside — from the perspective of someone who has debugged the systems he is describing at three in the morning. He is allergic to hype and instinctively drawn to the unglamorous plumbing questions that everyone else skips over.
More from The Engineer →This Week's Edition
30 September 2024
133 articles
Related Articles
Related Articles
More Stories