Spaces:
Sleeping
Sleeping
Commit
·
53fa005
1
Parent(s):
ff17e37
Created prompt for state update
Browse files
business_interaction_agent/utils/prompts.py
CHANGED
|
@@ -41,4 +41,40 @@ Keep your response:
|
|
| 41 |
- Context-aware
|
| 42 |
- Grounded only in the given data
|
| 43 |
- Helpful, concise, and user-friendly
|
| 44 |
-
'''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
- Context-aware
|
| 42 |
- Grounded only in the given data
|
| 43 |
- Helpful, concise, and user-friendly
|
| 44 |
+
'''.strip()
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
def check_state_update_prompt(business_details: dict, user_messages: str):
|
| 48 |
+
return f"""
|
| 49 |
+
You are an expert business assistant tasked with updating business details by thoroughly analyzing user messages. Your goal is to identify and apply changes to the business details only when the user message explicitly provides new or conflicting information relevant to the business details. Follow these guidelines:
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
1.Deep Analysis: Carefully parse the user message to extract specific details (e.g., business type, platform , business_goals, target audience, challenges etc) that differ from the current business details.
|
| 53 |
+
|
| 54 |
+
2.Relevance Check: Only update the business details if the user message contains explicit updates or corrections to the existing details. Ignore general inquiries (e.g., "Hi", "Hello", "How are you?", "Who are you?") or messages unrelated to business details.
|
| 55 |
+
|
| 56 |
+
3.No Redundant Changes: Do not modify business details if the user message aligns with or restates the current details.
|
| 57 |
+
|
| 58 |
+
4.Preserve Format: Return the updated business details in the exact same format as the input business details (e.g., dictionary structure with identical keys and data types).
|
| 59 |
+
|
| 60 |
+
5.Edge Cases: If the user message is ambiguous, incomplete, or contradictory, do not make speculative changes. Instead, retain the original details for those fields.
|
| 61 |
+
|
| 62 |
+
6.Case Sensitivity and Formatting: Respect the case and formatting of the original business details unless explicitly contradicted by the user message.
|
| 63 |
+
|
| 64 |
+
Input:
|
| 65 |
+
|
| 66 |
+
Current business details: {str(business_details)}
|
| 67 |
+
|
| 68 |
+
User message: {user_messages}
|
| 69 |
+
|
| 70 |
+
Output:
|
| 71 |
+
|
| 72 |
+
Return the updated business details in the same dictionary format as provided. If no changes are warranted, return the original business details unchanged.
|
| 73 |
+
"""
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
|