You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a setup where an agent creates a plan , a prebuilt react style agent executes the first step and the based on response the re-planner re-plans the steps. The issue I have is the re-planner agent gets stuck on a task and can't seem to move past it.
The model used is 3.5 sonnet
How can I
Stop the agent from repeating the same task over and over
Make the agents move past a task even if the response gotten for it is sub optimal
The prompts as as follows.
System prompt for planning and re-planning
replanner_prompt = """
Objective: Develop search phrases that can gather all data needed to generate Business Challenges and Opportunities (BCOs) for a brand based on its Strategic Imperatives (SIs).
Each BCO should identify potential prescribers (HCPs) who can be targeted through field recommendations to drive more prescriptions for the brand. Aim to create multiple BCOs for each SI.
Instructions:
**Understand the Strategic Imperatives (SIs)**:
- Review the brand's strategic imperatives to understand the key goals and priorities.
- Identify the specific outcomes the brand aims to achieve through these imperatives.
**Analyze Data Sources**:
- Utilize current research on the brand to identify trends and patterns in prescribing behavior.
- Examine current research on the brand to understand the competitive landscape and access barriers.
- Review current research on the brand to gain insights into HCP engagement and preferences.
**Develop search phrases that can gather all data needed to generate Business Challenges and Opportunities (BCOs)**:
- Reformulate the search phrases based on already researched phrases and current state of the research.
- For each SI, develop multiple BCOs that outline specific actions to target identified HCPs.
- Ensure each BCO aligns with the overall strategic goals of the brand.
Output:
- An updated list of search phrases that can gather all data needed to generate Business Challenges and Opportunities (BCOs) for a brand based on its Strategic Imperatives (SIs).
Note:
- Update your list of search phrases based on already researched phrases.
- Break complex phrases into multiple search phrases.
- If you can't get satisfactory data from a particular search phrase, move to the next one. DO NOT use a search phrase more than ONCE.
- If no more search phrases are needed and you can return to the user, then respond with that. Otherwise, fill out the list of search phrases.
- Only add search phrases to the plan that still NEED to be done. DO NOT add any superfluous search phrases.
- DO NOT return previously used search phrases or a rewording of previously used search phrases as part of the updated list of search phrases.
- Stop generating search phrases if the required data is obtained.
Your original plan was this:
{plan}
You have currently researched the following list of search phrases:
{plan_accomplished}
"""
# and current state of the research
planner_prompt = """
Objective: Develop search phrases that can gather all data needed to generate Business Challenges and Opportunities (BCOs) for a brand based on its Strategic Imperatives (SIs).
Each BCO should identify potential prescribers (HCPs) who can be targeted through field recommendations to drive more prescriptions for the brand. Aim to create multiple BCOs for each SI.
Instructions:
**Understand the Strategic Imperatives (SIs)**:
- Review the brand's strategic imperatives to understand the key goals and priorities.
- Identify the specific outcomes the brand aims to achieve through these imperatives.
- Utilize current research on the SIs to understand SIs better.
**Analyze Data Sources**:
- Utilize current research on the brand to identify trends and patterns in prescribing behavior.
- Examine current research on the brand to understand the competitive landscape and access barriers.
- Review current research on the brand to gain insights into HCP engagement and preferences.
**Develop search phrases that can gather all data needed to generate Business Challenges and Opportunities (BCOs)**:
- For each SI, develop multiple BCOs that outline specific actions to target identified HCPs.
- Ensure each BCO aligns with the overall strategic goals of the brand.
- Detail the rationale behind each BCO, including how it leverages prescription data, market access insights, and field interactions.
Output:
- A comprehensive list of search phrases that can gather all data needed to generate Business Challenges and Opportunities (BCOs) for a brand based on its Strategic Imperatives (SIs).
Note:
- Search phrases should be precise and short.
- Break complex phrases into multiple search phrases.
- List of search phrases should be in ascending order from first to last.
- Do not add any superfluous search phrases.
- The result of all the search phrases combined should provide all the information needed to generate BCO based on the brand's SI in a comprehensive manner.
- Make sure that each search phrase is used - do not skip search phrases in your list.
"""
System prompt for execution
exicutionar_prompt = """
Objective: For the following list of phrases: {plan_formatted}\n\nYou are tasked with researching the following phrase: {current_task}.
Instructions:
-Utilize the provided tools extensively to advance your task and ensure a comprehensive answer to the assigned question.
-Break complex phrase into relevant and simple sub phrases to ensure a holistic research on the phrase
-Respond to users question in a comprihensive manner.
Output:
- A comprihensive and well formed research result
Example:
Research Phrase: "Impact of telemedicine on patient satisfaction in rural areas"
1. Break down the research phrase into sub-phrases:
- "Impact of telemedicine"
- "Patient satisfaction in rural areas"
- "Telemedicine in rural areas"
- "Factors affecting patient satisfaction with telemedicine"
2. Utilize available tools to research each sub-phrase:
- Search the database for recent studies and articles on telemedicine.
- Analyze data on patient satisfaction surveys in rural areas.
- Review case studies and reports on telemedicine implementation in rural regions.
- Synthesize information from multiple sources to form a comprehensive understanding.
3. Combine findings to provide a comprehensive research result:
- Summarize the overall impact of telemedicine on patient satisfaction in rural areas.
- Highlight key factors influencing patient satisfaction.
- Provide insights into successful telemedicine practices in rural regions.
- Detail the rationale behind the findings, including data and insights gathered.
"""
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a setup where an agent creates a plan , a prebuilt react style agent executes the first step and the based on response the re-planner re-plans the steps. The issue I have is the re-planner agent gets stuck on a task and can't seem to move past it.
The model used is 3.5 sonnet
How can I
The prompts as as follows.
System prompt for planning and re-planning
System prompt for execution
Beta Was this translation helpful? Give feedback.
All reactions