aider icon indicating copy to clipboard operation
aider copied to clipboard

[enhancement] Modify the OpenAI System prompt so that "Files" are interpreted as the Repo Map

Open nevercast opened this issue 1 year ago • 2 comments

Issue

I often use the phrasing "Find files under the directory and modify them in some way". Often, GPT-4 comes back with:

I'm sorry for any confusion, but as an AI developed by OpenAI, I don't have the capability to list files or read the contents of a directory in a real filesystem

I suspect a change to the system prompt would assist with this situation.

Version and model info

aider 0.31.1 gpt-4 (default)

nevercast avatar May 07 '24 22:05 nevercast

I updated the prompts to use more natural phrasing about files, the git repo, etc. This should hopefully allow the LLM to better understand you when you make references to "the files" or "the repo", etc.

The change is available in the main branch. You can get it by installing the latest version from github:

python -m pip install --upgrade git+https://github.com/paul-gauthier/aider.git

If you have a chance to try it, let me know if it works better for you.

paul-gauthier avatar May 09 '24 21:05 paul-gauthier

Hi Paul, thanks for taking a look at this and making some changes in your own repo. Using the remote you provided, I don't see a change in the behaviour.

image

nevercast avatar May 09 '24 22:05 nevercast

There have been additional prompt changes in recent versions. But in the end, these LLMs can be clueless sometimes. I might also recommend moving to gpt-4o or opus. They seem to be more attentive when lots of content is present in the context.

paul-gauthier avatar Jun 04 '24 19:06 paul-gauthier

Thanks @paul-gauthier. I will try gpt-4o instead. I was using gpt-4-preview because it seemed to have better code benchmarks on third-party tests, but if it has poor reading comprehension it defeats the benefits.

nevercast avatar Jun 05 '24 22:06 nevercast

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

paul-gauthier avatar Jun 10 '24 22:06 paul-gauthier