instruct the agent to comment less
End-user friendly description of the problem this fixes or functionality that this introduces
- [x] Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below CHANGELOG: modified agent instructions to include fewer redundant comments in the code it generates
Give a summary of what the PR does, explaining any non-trivial design decisions
OpenHands constantly puts comments like this:
// greet the user with console.log
console.log('hello!');
These sorts of comments are almost always unhelpful, and they quickly fall out of sync with the code, creating confusion.
Even worse, it'll do stuff like this when editing existing code
// greet the user with console.log
console.log('greetings!'); // our new message instead of 'hello'
This PR instructs the agent to comment less. Not quite sure how to validate, other than manual testing. I'm also slightly concerned it might muck with the LLM-based editing strategy
Link of any specific issues this addresses
To run this PR locally, use the following command:
docker run -it --rm -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock --add-host host.docker.internal:host-gateway -e SANDBOX_RUNTIME_CONTAINER_IMAGE=ghcr.io/all-hands-ai/runtime:622c622-nikolaik --name openhands-app-622c622 ghcr.io/all-hands-ai/runtime:622c622
Is this intended with (a few) function calling LLMs we currently support, or with most LLMs? With function calling, the prompt in use is here.
^^ @enyst is correct - we should probably look into the function calling SYSTEM prompt
@rbren good to merge?
OK fixed the function calling prompt to match