Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize move or remove file -- use command line instead of SEARCH/REPLACE #1563

Closed
quocdat-le-insacvl opened this issue Sep 16, 2024 · 3 comments

Comments

@quocdat-le-insacvl
Copy link

Issue

Currently, aider uses SEARCH/REPLACE to move or remove files. Which is very slow an unoptimized. We may prompt engineer to suggest rm or mv instead.

Version and model info

Aider v0.56.0
Main model: claude-3-5-sonnet-20240620 with diff edit format, infinite output
Weak model: claude-3-haiku-20240307
Git repo: .git with 77 files
Repo-map: using 1024 tokens, auto refresh

@fry69
Copy link
Collaborator

fry69 commented Sep 16, 2024

Currently, aider uses SEARCH/REPLACE to move or remove files. Which is very slow an unoptimized. We may prompt engineer to suggest rm or mv instead.

LLMs work in not very intuitive ways. More tokens help them think and less/shorter tokens make prompts more ambiguous and create problems. So your suggestions to "optimize" may actually backfire. But feel free to test this out and prove me wrong. LLMs are still probabilistic machines and sometimes results can be surprising.

The relevant code is here:
https://github.com/paul-gauthier/aider/blob/main/aider/coders/editblock_coder.py
https://github.com/paul-gauthier/aider/blob/main/aider/coders/editblock_prompts.py

If you mean by rm/mv to replace whole files, there is already the whole coder/edit format.
See also -> https://aider.chat/docs/usage/modes.html

@quocdat-le-insacvl
Copy link
Author

quocdat-le-insacvl commented Sep 16, 2024

@fry69 I see you point, thank you 🤗!

@paul-gauthier
Copy link
Owner

I'm going to close this issue for now, but feel free to add a comment here and I will re-open. Or feel free to file a new issue any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants