TaoZewen commited on
Commit
56e29c4
·
1 Parent(s): 211a5f3

prompt change

Browse files
Files changed (1) hide show
  1. gemini_agent.py +2 -2
gemini_agent.py CHANGED
@@ -554,7 +554,7 @@ Focus on:
554
  TOOLS:
555
  ------
556
  You have access to the following tools:"""
557
-
558
  FORMAT_INSTRUCTIONS = """To use a tool, use the following format:
559
 
560
  Thought: Do I need to use a tool? Yes
@@ -562,7 +562,7 @@ Action: the action to take, should be one of [{tool_names}]
562
  Action Input: the input to the action
563
  Observation: the result of the action
564
 
565
- When you have a response to say to the Human, or if you do not need to use a tool, you MUST use the format:
566
 
567
  Thought: Do I need to use a tool? No
568
  Final Answer: [your response here]
 
554
  TOOLS:
555
  ------
556
  You have access to the following tools:"""
557
+ # Tightened format instructions: when giving a final answer, output exactly one line with the answer.
558
  FORMAT_INSTRUCTIONS = """To use a tool, use the following format:
559
 
560
  Thought: Do I need to use a tool? Yes
 
562
  Action Input: the input to the action
563
  Observation: the result of the action
564
 
565
+ When you have the final answer, you MUST use exactly one line with this format (no extra text, no lists):
566
 
567
  Thought: Do I need to use a tool? No
568
  Final Answer: [your response here]