This commit is contained in:
Paul Gauthier 2024-09-27 10:26:48 -07:00
parent f38ea0c8e2
commit 1acb4da8d0
2 changed files with 72 additions and 12 deletions

View file

@ -72,15 +72,15 @@ top coding models, as compared to their previous "solo" scores (striped bars).
var data = [];
var colorMapping = {
"claude-3.5-sonnet": "rgba(75, 192, 192, 0.2)",
"o1-mini": "rgba(255, 99, 132, 0.2)",
"gpt-4o": "rgba(54, 162, 235, 0.2)",
"o1-preview": "rgba(255, 206, 86, 0.2)"
"gpt-4o": "rgba(255, 99, 132, 0.2)",
"o1-preview": "rgba(54, 162, 235, 0.2)",
"o1-mini": "rgba(255, 206, 86, 0.2)"
};
var borderColorMapping = {
"claude-3.5-sonnet": "rgba(75, 192, 192, 1)",
"o1-mini": "rgba(255, 99, 132, 1)",
"gpt-4o": "rgba(54, 162, 235, 1)",
"o1-preview": "rgba(255, 206, 86, 1)"
"gpt-4o": "rgba(255, 99, 132, 1)",
"o1-preview": "rgba(54, 162, 235, 1)",
"o1-mini": "rgba(255, 206, 86, 1)"
};
var backgroundColors = [];
var borderColors = [];
@ -261,9 +261,9 @@ This Editor LLM can then interpret the solution description and
produce the code editing instructions needed to update
the existing source code file.
Traditional frontier models like gpt-4o and Sonnet also
Traditional frontier models like GPT-4o and Sonnet also
seem to benefit from separating code reasoning and editing like this.
A pair of gpt-4o
A pair of GPT-4o
or a pair of Sonnet models
in Architect/Editor configuration outperform their previous solo benchmark results.
@ -321,7 +321,7 @@ Some noteworthy observations:
The development version of aider
has built in defaults to support Architect/Editor coding with
OpenAI's o1 models, gpt-4o and Anthropic's Claude 3.5 Sonnet.
o1-preview, o1-mini, GPT-4o and Claude 3.5 Sonnet.
Run aider with `--architect` or get started quickly like this:
```
@ -341,6 +341,14 @@ aider --o1-mini --architect
aider --o1-preview --architect
```
## More info
Aider has a number of "chat modes", and "architect" is available as a new chat mode.
The `--architect` switch is a shortcut for `--chat-mode architect`.
For more details, see documentation on
[aider's chat modes](/docs/usage/modes.html).
## Full results

View file

@ -6,15 +6,17 @@ description: Using the chat, ask and help chat modes.
# Chat modes
Aider has 3 different chat modes:
Aider has a few different chat modes:
- `code` - Aider will make changes to your code to satisfy your requests.
- `architect` - Aider will first propose a solution, then ask if you want it to turn that proposal into edits to your files.
- `ask` - Aider will answer questions about your code, but never edit it.
- `help` - Aider will answer questions about using aider, configuring, troubleshooting, etc.
By default, aider starts in "code" mode. As you are talking, you can
send individual messages in a specific mode using `/code`, `/ask`, and `/help` commands:
Using `/code`, `/ask`, and `/help` applies just to that particular message.
send individual messages in a specific mode using
`/code`, `/architect`, `/ask`, and `/help` commands:
Using these `/`-commands applies just to that particular message.
Your next message will go back to the active mode (usually "code" mode by default).
You can switch the active mode in a sticky way
@ -22,11 +24,40 @@ with the `/chat-mode <mode>` command:
```
/chat-mode code
/chat-mode architect
/chat-mode ask
/chat-mode help
```
Or you can launch aider in one of the modes with the `--chat-mode <mode>` switch.
There is also a special shortcut `--architect` to launch in `--chat-mode architect`.
## Architect mode and the editor model
When you are in architect mode, aider sends you request to two models:
1. First, it sends your request to the main active model.
This model is set by `/model`, `--model` or the shortcut switches like `--sonnet`.
After it replies, aider will offer to edit the files based on the response.
2. To edit the files, aider sends a second LLM request, asking for specific code editing instructions.
This request goes to the "editor" model.
Aider has built in defaults to select an editor model based on your main model.
Or, you can choose an editor model yourself with `--editor-model <model>`.
Architect mode produces better results than code mode, but uses two LLM requests.
This probably makes it slower and more expensive than using code mode.
Architect mode is especially useful with OpenAI's o1 models, which are strong at
reasoning but less capable at editing files.
Using an o1 architect with an editor model like GPT-4o or Sonnet will
give the best results.
See this article on
[aider's architect/editor mode](/2024/09/26/architect.html)
for more details.
## Examples
<div class="chat-transcript" markdown="1">
@ -63,5 +94,26 @@ print(factorial(5)) # Output: 120
This function uses recursion to calculate the factorial. It's been added to your code.
#### /architect Can we make this simpler?
Yes, you could replace the `factorial()` function with a call to the `math.factorial()`
builtin.
This way you don't have to maintain a custom factorial implementation,
and the builtin function is well optimized.
> Edit the files? (Y)es/(N)o [Yes]: Yes
```python
<<<<<<< SEARCH
def factorial(n):
if n == 0 or n == 1:
return 1
else:
return n * factorial(n - 1)
=======
from math import factorial
>>>>>>> REPLACE
```
</div>