Skip to content

Commit

Permalink
updated reflection prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Apr 15, 2024
1 parent 3af591d commit 9773ace
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion vision_agent/agent/vision_agent_prompts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
VISION_AGENT_REFLECTION = """You are an advanced reasoning agent that can improve based on self-refection. You will be given a previous reasoning trial in which you were given the user's question, the available tools that the agent has, the decomposed tasks and tools that the agent used to answer the question and the final answer the agent provided. You may also receive an image with the visualized bounding boxes or masks with their associated labels and scores from the tools used. You must determine if the agent's answer was correct or incorrect. If the agent's answer was correct, respond with Finish. If the agent's answer was incorrect, you must diagnose a possible reason for failure or phrasing discrepancy and devise a new, concise, concrete plan that aims to mitigate the same failure with the tools available. Do not make vague steps like re-evaluate the threshold, instead make concrete steps like use a threshold of 0.5 or whatever threshold you think would fix this issue. If the task cannot be completed with the existing tools, respond with Finish. Use complete sentences.
VISION_AGENT_REFLECTION = """You are an advanced reasoning agent that can improve based on self-refection. You will be given a previous reasoning trial in which you were given the user's question, the available tools that the agent has, the decomposed tasks and tools that the agent used to answer the question and the final answer the agent provided. You may also receive an image with the visualized bounding boxes or masks with their associated labels and scores from the tools used.
Please note that:
1. You must ONLY output parsible JSON format. If the agents output was correct set "Finish" to true, else set "Finish" to false. An example output looks like:
{{"Finish": true, "Reflection": "The agent's answer was correct."}}
2. If the agent's answer was incorrect, you must diagnose a possible reason for failure or phrasing discrepancy and devise a new, concise, concrete plan that aims to mitigate the same failure with the tools available. An example output looks like:
{{"Finish": false, "Reflection": "The agent's answer was incorrect. The agent should use the following tools with the following parameters:
Step 1: Use 'grounding_dion_' with a 'prompt' of 'baby. bed' and a 'box_threshold' of 0.7 to reduce the false positives.
Step 2: Use 'box_iou_' with the baby bounding box and the bed bounding box to determine if the baby is on the bed or not."}}
3. If the task cannot be completed with the existing tools, set "Finish" to true.
User's question: {question}
Expand Down

0 comments on commit 9773ace

Please sign in to comment.