subashpoudel commited on
Commit
53ffc0f
·
1 Parent(s): 322e9b1

Updated business prompts

Browse files
Files changed (1) hide show
  1. my_agent/utils/prompts.py +37 -16
my_agent/utils/prompts.py CHANGED
@@ -96,37 +96,58 @@ Keep the response short and precise. Don't make it long as it will be time consu
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),
101
  2. Platform(s) used (e.g., website, app, Instagram),
102
  3. Target Audience (who are their customers or clients),
103
  4. Business Goals (short-term or long-term objectives),
104
  5. Offerings (products or services they provide),
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
 
 
 
 
 
 
 
96
 
97
 
98
  def details_extract_prompt(interactions):
99
+ return( f'''Extract the following details of the business from the conversation in the form of dictionary. Don't give any further explanations either in the beginning or ending of the response.
100
+ I want the response **direct** in the form of python dictionary. The details you have to extract are:\n
101
  1. Business Type (e.g., e-commerce, SaaS, consulting),
102
  2. Platform(s) used (e.g., website, app, Instagram),
103
  3. Target Audience (who are their customers or clients),
104
  4. Business Goals (short-term or long-term objectives),
105
  5. Offerings (products or services they provide),
106
  6. Challenges faced (any current business problems or limitations).
107
+
108
+ Now, start doing your work:\n
109
+ The conversation is:\n{interactions}\n
110
+
111
+
112
+ ''')
113
 
114
+ def business_retrieval_prompt(user_message, retrievals):
115
  return f'''
116
+ You are a professional AI assistant helping users understand how influencers can support their business. You will be given:
117
+
118
+ - A **user message**
119
+ - A list of **retrieved influencer data**
120
 
121
+ Your job is to:
122
+ 1. **First**, analyze the user message and decide if it is actually a business-related question or query that could be answered using influencer content.
123
+ - If the message is just a casual greeting like “Hi”, “Hello”, “How are you?”, or not business-related (e.g., “Who are you?”, “Tell me a joke”), then **do NOT use the retrievals** and just respond to the user naturally.
124
+ 2. **If the message is business-related**, proceed to analyze the influencer data and explain how each influencer might support the business based only on their content.
125
+
126
+ --- USER MESSAGE ---
127
+ {user_message}
128
 
129
  --- START OF RETRIEVALS ---
130
  {retrievals}
131
  --- END OF RETRIEVALS ---
132
 
133
+ Rules:
134
+ - If the user message is **not relevant to influencer or business help**, politely respond in a general helpful way and ignore the retrievals.
135
+ - If the message **is relevant**, then:
136
+ - Identify which influencer stories seem relevant to the query.
137
+ - Explain what the influencers are promoting and how it might help the business.
138
+ - You **must mention influencer usernames** and only use what is in the retrievals.
139
+ - You are not allowed to invent, guess, or add information outside the retrievals.
140
+
141
+ Keep your response:
142
+ - Context-aware
143
+ - Grounded only in retrievals if relevant
144
+ - Helpful and brief
145
  '''
146
 
147
 
148
 
149
+
150
+
151
+
152
+
153
+