This commit is contained in:
Paul Gauthier 2024-09-26 19:06:01 -07:00
parent c063bdb039
commit c742642df2

View file

@ -281,19 +281,18 @@ to allow LLMs to specify edits to local source files.
All of aider's editing formats require the LLM to return source code edits in a specific text All of aider's editing formats require the LLM to return source code edits in a specific text
format, so that aider can process the edits and apply them to the local source files. format, so that aider can process the edits and apply them to the local source files.
Normally, aider asks the model to solve a coding problem by returning a well Normally aider asks the model to solve a coding problem in one prompt,
formatted series of file edits. asking the LLM to explain the solution and return
Aider encourages "chain of thought" by asking the model to explain the solution a well formatted series of file edits.
before diving into code edits. Because this all happens in a single prompt/response round trip to the LLM,
But this all happens in a single prompt/response round trip to the LLM, the model has to split its attention between
and the model has to split its attention between solving the coding problem and conforming to the edit format.
solving the coding problem and confirming to the edit format.
The Architect/Editor approach splits this into two round trips, possibly The Architect/Editor approach splits this into two inference steps, possibly
using two different LLMs: using two different LLMs:
- Ask how to solve the coding problem (Architect). 1. Ask how to solve the coding problem (Architect).
- Turn the proposed solution into a series of well formed code edits (Editor). 2. Turn the proposed solution into a series of well formed code edits (Editor).
The Architect/Editor approach allows the Architect to focus on solving the coding problem The Architect/Editor approach allows the Architect to focus on solving the coding problem
and describe the solution however comes naturally to it. and describe the solution however comes naturally to it.