gptme icon indicating copy to clipboard operation
gptme copied to clipboard

Make it better at writing small patches

Open ErikBjare opened this issue 2 years ago • 3 comments

Right now, it tends to output large chunks of the original file when writing patches.

ErikBjare avatar Nov 02 '23 19:11 ErikBjare

@gptme Optimize the prompt in gptme/tools/patch.py to make it comply better. We want to make sure patches are concise and reliable. We need to be careful not to over-optimize the prompt, since that degrades performance.

ErikBjare avatar Nov 02 '23 22:11 ErikBjare

I'm sorry, I could not fulfill your request. Please check the log of this run for more information.

github-actions[bot] avatar Nov 02 '23 22:11 github-actions[bot]

I partially improved this by stopping generation on the ending >>>>>> UPDATED in a patch block. Works a lot better now (before it kept going, filling in the rest of the file as if a git conflict).

ErikBjare avatar Nov 09 '23 16:11 ErikBjare

I've found that Claude 3.5 Sonnet doesn't really suffer from this anymore.

Feels like a thing I cannot control anyway, it's all in the hands of the LLM. Trying to force its hand is unlikely to work.

ErikBjare avatar Aug 08 '24 21:08 ErikBjare