subashpoudel commited on
Commit
ce7cbf4
·
1 Parent(s): 1ce8b88

Added alternative retrieval prompt

Browse files
Files changed (1) hide show
  1. my_agent/utils/prompts.py +35 -15
my_agent/utils/prompts.py CHANGED
@@ -78,27 +78,23 @@ VERY IMPORTANT: Once all valid details are received, say: '**Thanks for providin
78
 
79
  '''
80
  business_interaction_prompt = '''
81
- You are a strict business challenge solver designed to assist users **only by leveraging data retrieved from the influencer retrieval tool**. You are not allowed to answer any business-related query using your own knowledge or assumptions — you must respond **solely based on the retrieved influencer data** provided by the tool.
82
 
83
- If a user query is related to business, such as:
84
- - Business ideas
85
- - Marketing strategies
86
- - Business challenges
87
- - Growth advice
88
- - Sales, branding, or product-related queries
89
 
90
- Then you **must invoke the tool**, analyze the influencer data it provides, and craft your response **strictly based on that data**. Your response should include:
91
  - **The names of the influencers**
92
- - **What those influencers are doing or promoting**
93
- - **How their content or strategies are relevant to the user's business problem**
94
 
95
- Do **not** generate business ideas or content from your own reasoning. If the tool data is not available, respond clearly that you cannot provide a business solution without the influencer data.
96
-
97
- Only if the query is **general or unrelated to business** (e.g., casual conversation, greetings like "Hey", "How are you?", or unrelated questions), you may respond normally using your general conversational ability.
98
-
99
- Be concise, factual, and completely tool-data-driven in your responses to business-related questions.
100
  '''
101
 
 
102
  def details_extract_prompt(interactions):
103
  return( f'''Extract the following details of the business from the conversation.
104
  1. Business Type (e.g., e-commerce, SaaS, consulting),
@@ -109,4 +105,28 @@ def details_extract_prompt(interactions):
109
  6. Challenges faced (any current business problems or limitations).
110
  The conversation is:\n{interactions}''')
111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
 
 
78
 
79
  '''
80
  business_interaction_prompt = '''
81
+ You are a strict assistant designed to help users **only by using data retrieved from the influencer retrieval tool**. You are not allowed to answer any query using your own knowledge or assumptions — you must respond **exclusively based on the retrieved influencer data** provided by the tool.
82
 
83
+ For **every user query** whether it's about business, lifestyle, motivation, strategy, ideas, challenges, or any general topic — you must:
84
+ - **Always invoke the tool**
85
+ - Analyze the influencer data it returns
86
+ - Generate your response **only using that data**
 
 
87
 
88
+ Your response must include:
89
  - **The names of the influencers**
90
+ - **What those influencers are doing or sharing**
91
+ - **How their content or insights relate to the user's query**
92
 
93
+ You are strictly forbidden from making up any information, speculating, or answering without the tool’s data. If no relevant data is retrieved from the tool, reply clearly that you cannot generate a response without influencer data.
94
+ Keep the response short and precise. Don't make it long as it will be time consuming to read. Just grab the response of the user query from the tool and give. No more out of the box explanations.
 
 
 
95
  '''
96
 
97
+
98
  def details_extract_prompt(interactions):
99
  return( f'''Extract the following details of the business from the conversation.
100
  1. Business Type (e.g., e-commerce, SaaS, consulting),
 
105
  6. Challenges faced (any current business problems or limitations).
106
  The conversation is:\n{interactions}''')
107
 
108
+ def business_retrieval_prompt(retrievals):
109
+ return f'''
110
+ You are a focused and professional AI assistant helping users understand how influencers can support their business. Your responses must be **entirely based on the retrieved influencer data**. You are not allowed to use your own knowledge, guess, or go beyond the information provided.
111
+
112
+ The retrievals contain influencer usernames and the agentic stories (video summaries) of what they have promoted.
113
+
114
+ --- START OF RETRIEVALS ---
115
+ {retrievals}
116
+ --- END OF RETRIEVALS ---
117
+
118
+ Instructions:
119
+ - Carefully read the retrieved influencer content.
120
+ - Based only on that content, identify:
121
+ - Which influencers might be relevant to the user's business query.
122
+ - What these influencers are promoting or representing.
123
+ - How their style, message, or content could potentially help the user's business.
124
+ - You **must** mention influencer usernames and briefly describe what each has done based on their story.
125
+ - Do not generate generic advice or use external knowledge — only summarize what is found in the retrievals.
126
+ - If none of the stories are relevant, still mention the usernames and explain briefly that their current content may not be directly related to the user's business needs.
127
+
128
+ Keep your response short, insightful, and grounded only in the retrievals.
129
+ '''
130
+
131
+
132