3 ms·
It is difficult to get the AI models to get everything right every time. I noticed too that it would sometimes remove comments etc when re-writing code. The wa
by campers 2y ago
It is difficult to get the AI models to get everything right every time. I noticed too that it would sometimes remove comments etc when re-writing code.
The way to get better results is with agentic workflows that breakdown the task into smaller steps that the models can iteratively come to a correct result.
One important step I added to mine is a review step (in the reviewChanges.ts
file) in my workflow at
https://github.com/TrafficGuard/nous/blob/main/src/swe/codeEditingAgent.ts https://github.com/TrafficGuard/nous/blob/main/src/swe/codeE...
This gets the diff and asks questions like:
- Are there any redundant changes in the diff?
- Was any code removed in the changes which should not have been?
- Review the style of the code changes in the diff carefully against the original code.
Maybe try using that, or the package that I use which does the actual code edits called Aider https://aider.chat/ https://aider.chat/