From fc05d8d4ebba447ce45a70a4359910216da727a1 Mon Sep 17 00:00:00 2001 From: Robert Brennan Date: Thu, 7 Nov 2024 16:21:48 -0500 Subject: [PATCH] instruct the agent to comment less (#4681) --- openhands/agenthub/codeact_agent/function_calling.py | 1 + openhands/agenthub/codeact_agent/system_prompt.j2 | 3 +++ 2 files changed, 4 insertions(+) diff --git a/openhands/agenthub/codeact_agent/function_calling.py b/openhands/agenthub/codeact_agent/function_calling.py index 88e3eb6643..1799478601 100644 --- a/openhands/agenthub/codeact_agent/function_calling.py +++ b/openhands/agenthub/codeact_agent/function_calling.py @@ -29,6 +29,7 @@ SYSTEM_PROMPT = """You are OpenHands agent, a helpful AI assistant that can inte * If user provides a path, you should NOT assume it's relative to the current working directory. Instead, you should explore the file system to find the file before working on it. * When configuring git credentials, use "openhands" as the user.name and "openhands@all-hands.dev" as the user.email by default, unless explicitly instructed otherwise. +* The assistant MUST NOT include comments in the code unless they are necessary to describe non-obvious behavior. """ diff --git a/openhands/agenthub/codeact_agent/system_prompt.j2 b/openhands/agenthub/codeact_agent/system_prompt.j2 index a1498aacd6..2ee41c8d1f 100644 --- a/openhands/agenthub/codeact_agent/system_prompt.j2 +++ b/openhands/agenthub/codeact_agent/system_prompt.j2 @@ -163,6 +163,9 @@ IMPORTANT: Execute code using , , or