Aider Implements New Architect/Editor Approach for AI-Assisted Coding

Aider Implements New Architect/Editor Approach for AI-Assisted Coding

Aider announced the implementation of a new Architect/Editor approach in their AI coding assistant. This update introduces a two-model system designed to improve code generation and editing accuracy.

Architect/Editor Approach

The new approach separates the coding process into two steps:

  1. An Architect model focuses on problem-solving and solution design.
  2. An Editor model translates the Architect’s solution into specific code edits.

This separation allows each model to specialize in distinct aspects of the coding process.

Benchmark Results

The Architect/Editor approach was evaluated using Aider’s code editing benchmark:

  • Achieved a score of 85%, the current highest on this benchmark
  • Demonstrated improvements across various model combinations
  • Allowed for flexible pairing of different models as Architect and Editor

Key Findings

  • OpenAI’s o1-preview model, paired with either DeepSeek or o1-mini as Editor, achieved the highest benchmark scores
  • Anthropic’s Claude 3.5 Sonnet performed effectively as both Architect and Editor
  • DeepSeek showed strong performance as an Editor model, enhancing multiple Architect models

Technical Details

The Architect/Editor approach addresses two distinct challenges in AI-assisted coding:

  1. Code Reasoning: The Architect model focuses on understanding the problem, designing a solution, and describing the necessary changes.
  2. Code Editing: The Editor model interprets the Architect’s solution and generates specific, well-formatted code editing instructions.

This separation allows the use of models optimized for different tasks. For example, models strong in reasoning can be used as Architects, while models proficient in code manipulation can serve as Editors.

Performance Considerations

  • The two-step process may introduce additional latency compared to single-model approaches
  • Using o1-preview as Architect with DeepSeek or o1-mini as Editor produced the highest benchmark scores but may not be optimal for interactive use due to processing time
  • Pairing OpenAI’s o1-preview with Anthropic’s Claude 3.5 Sonnet as Editor offers a balance of performance and speed

Implementation

The Architect/Editor approach is available in the development version of Aider. It currently supports integration with the following models:

  • o1-preview
  • o1-mini
  • GPT-4o
  • Claude 3.5 Sonnet

Developers can experiment with different model combinations to optimize for their specific use cases.

Access

You may need to install aider from source:

# Clone the repository
git clone git@github.com:paul-gauthier/aider.git

# Navigate to the project directory
cd aider

# It's recommended to make a virtual environment

# Install aider in editable/development mode, 
# so it runs from the latest copy of these source files
python -m pip install -e .

# Run the local version of aider
python -m aider

How to use it with architect mode:

pip install -U aider-chat

# Change directory into a git repo
cd /to/your/git/repo

# Work with Claude 3.5 Sonnet as the Architect and Editor
export ANTHROPIC_API_KEY=your-key-goes-here
aider --sonnet --architect

# Work with OpenAI models, using gpt-4o as the Editor
export OPENAI_API_KEY=your-key-goes-here
aider --4o --architect
aider --o1-mini --architect
aider --o1-preview --architect

See aider’s website for more information on accessing the new Architect/Editor approach.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top