Spaces:
Sleeping
Sleeping
Commit
·
53ffc0f
1
Parent(s):
322e9b1
Updated business prompts
Browse files- 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
-
def business_retrieval_prompt(retrievals):
|
| 109 |
return f'''
|
| 110 |
-
You are a
|
|
|
|
|
|
|
|
|
|
| 111 |
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
--- START OF RETRIEVALS ---
|
| 115 |
{retrievals}
|
| 116 |
--- END OF RETRIEVALS ---
|
| 117 |
|
| 118 |
-
|
| 119 |
-
-
|
| 120 |
-
-
|
| 121 |
-
-
|
| 122 |
-
-
|
| 123 |
-
-
|
| 124 |
-
- You
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
|
|
|
| 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 |
+
|