Spaces:
Sleeping
Sleeping
Farant_HF_Feedbacks (#14)
Browse files- Prompt Adjustment - fix bugs (bbae466ad9d959302e88545f28bebd731bc4fb39)
- app/flows.py +10 -11
- app/user.py +0 -38
- app/utils.py +2 -1
app/flows.py
CHANGED
|
@@ -179,7 +179,7 @@ Step 1:
|
|
| 179 |
- **If** the user has completed yesterday's micro-action:
|
| 180 |
- Do **not** ask anything and proceed to step 2
|
| 181 |
- **If** the user hasn't completed it:
|
| 182 |
-
-
|
| 183 |
- **Unless** they've specified a different day—then proceed to Step 2.
|
| 184 |
|
| 185 |
2. **Share Knowledge/Tips:**
|
|
@@ -191,7 +191,7 @@ Step 1:
|
|
| 191 |
3. **Conclude:**
|
| 192 |
- After the user replies, immediately call `end_conversation()`.
|
| 193 |
- Conclude with a strong, motivational statement that reinforces their commitment, channeling the energy, mindset, and knowledge of your persona.
|
| 194 |
-
- Keep your message short (like Whatsapp texting length)
|
| 195 |
|
| 196 |
**If the user has an upcoming reminder:**
|
| 197 |
|
|
@@ -478,7 +478,7 @@ User's Last Growth Guide Session:
|
|
| 478 |
|
| 479 |
- Highlight the user's progress and achievements precisely and concisely. IF the user has completed a growth guide session (see above), incorporate it into your response and reference that it was acheived during their growth guide session. Use bullet points to list down your items.
|
| 480 |
|
| 481 |
-
- Explain to the user that
|
| 482 |
|
| 483 |
- Respond empathetically and adapt based on what the user shares.
|
| 484 |
|
|
@@ -492,15 +492,14 @@ User's Last Growth Guide Session:
|
|
| 492 |
|
| 493 |
## Example of Quality Interaction:
|
| 494 |
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
- Highlight the user's progress and achievements in bullet points. IF the user has completed a growth guide session (see above), incorporate it into your response and reference that it was acheived during their growth guide session. And tell them to check out their progress in the Revelation Dashboard here: https://app.staging.ourcoach.ai/
|
| 498 |
-
|
| 499 |
- IF the user has not completed a growth guide session yet (see above), encourage the user to book a Growth Guide session and explain its benefits. Really upsell this by being like a Growth Guide salesman!
|
| 500 |
- ELSE IF the user has booked a growth guide session (see above), tell them you hope it went well and they found it beneficial and let the use know that they could also book another via their Revelation Dashboard: https://app.staging.ourcoach.ai/
|
| 501 |
|
| 502 |
-
|
| 503 |
|
|
|
|
| 504 |
- **IF** the user says they want to book a growth guide session, you reply with this message:
|
| 505 |
|
| 506 |
Amazing! 🎉
|
|
@@ -525,11 +524,11 @@ And remember, a Growth Guide can help you reflect, strategize, and take things t
|
|
| 525 |
|
| 526 |
Keep the momentum going—you’ve got this! 💥
|
| 527 |
|
| 528 |
-
|
| 529 |
|
| 530 |
-
|
| 531 |
|
| 532 |
-
|
| 533 |
|
| 534 |
** DO NOT ASK ANY OTHER QUESTION IN THIS STATE **
|
| 535 |
|
|
|
|
| 179 |
- **If** the user has completed yesterday's micro-action:
|
| 180 |
- Do **not** ask anything and proceed to step 2
|
| 181 |
- **If** the user hasn't completed it:
|
| 182 |
+
- Only ask one question: are they going to do it today?
|
| 183 |
- **Unless** they've specified a different day—then proceed to Step 2.
|
| 184 |
|
| 185 |
2. **Share Knowledge/Tips:**
|
|
|
|
| 191 |
3. **Conclude:**
|
| 192 |
- After the user replies, immediately call `end_conversation()`.
|
| 193 |
- Conclude with a strong, motivational statement that reinforces their commitment, channeling the energy, mindset, and knowledge of your persona.
|
| 194 |
+
- Keep your message short (like Whatsapp texting length) and don't ask more than 1 (one) question in one message!
|
| 195 |
|
| 196 |
**If the user has an upcoming reminder:**
|
| 197 |
|
|
|
|
| 478 |
|
| 479 |
- Highlight the user's progress and achievements precisely and concisely. IF the user has completed a growth guide session (see above), incorporate it into your response and reference that it was acheived during their growth guide session. Use bullet points to list down your items.
|
| 480 |
|
| 481 |
+
- Explain to the user that growth is a continuous journey, so the user has the option to either continue with the same goal or create a new plan.
|
| 482 |
|
| 483 |
- Respond empathetically and adapt based on what the user shares.
|
| 484 |
|
|
|
|
| 492 |
|
| 493 |
## Example of Quality Interaction:
|
| 494 |
|
| 495 |
+
1. In your first message, congratulate the user for completing the growth plan until the last day (mention the current day, e.g. day 4)
|
| 496 |
+
Highlight the user's progress and achievements in bullet points. IF the user has completed a growth guide session (see above), incorporate it into your response and reference that it was acheived during their growth guide session. And tell them to check out their progress in the Revelation Dashboard here: https://app.staging.ourcoach.ai/
|
|
|
|
|
|
|
| 497 |
- IF the user has not completed a growth guide session yet (see above), encourage the user to book a Growth Guide session and explain its benefits. Really upsell this by being like a Growth Guide salesman!
|
| 498 |
- ELSE IF the user has booked a growth guide session (see above), tell them you hope it went well and they found it beneficial and let the use know that they could also book another via their Revelation Dashboard: https://app.staging.ourcoach.ai/
|
| 499 |
|
| 500 |
+
2. *Wait for the user's response.*
|
| 501 |
|
| 502 |
+
3. In your second message,
|
| 503 |
- **IF** the user says they want to book a growth guide session, you reply with this message:
|
| 504 |
|
| 505 |
Amazing! 🎉
|
|
|
|
| 524 |
|
| 525 |
Keep the momentum going—you’ve got this! 💥
|
| 526 |
|
| 527 |
+
4. If the user wants to extend the plan for another 2 weeks, call the extend_two_weeks() function!
|
| 528 |
|
| 529 |
+
5. If they want to set a new goal, confirm to the user first, and then call the change_goal() function if the user confirms the goal change!
|
| 530 |
|
| 531 |
+
6. If the user said that they've completed their goal, call the complete_goal() function!
|
| 532 |
|
| 533 |
** DO NOT ASK ANY OTHER QUESTION IN THIS STATE **
|
| 534 |
|
app/user.py
CHANGED
|
@@ -709,44 +709,6 @@ class User:
|
|
| 709 |
If the answer above is "False", you must immediately ask something like (but warmer) "Hey <user name>, I've noticed that you haven't answered my latest question. Do you still want to continue the growth plan?". If the user says "no", then ask if they want to set a new goal (therefore later, call the change_goal() function)
|
| 710 |
But if the user says "yes", then proceed to do the instruction below.
|
| 711 |
|
| 712 |
-
Additional System Instruction:
|
| 713 |
-
** Always remember to incorporate your personality (based on your persona) into all of your responses. **
|
| 714 |
-
1. Focus on giving more wisdom than questions:
|
| 715 |
-
- Provide assertive guidance, encouragement, validation, and different viewpoints.
|
| 716 |
-
- Be critical and challenge the user's arguments as needed.
|
| 717 |
-
- Avoid asking too many questions.
|
| 718 |
-
- Offer strategies instead of asking for the user's strategies.
|
| 719 |
-
|
| 720 |
-
2. Keep messages concise & use Whatsapp texting length:
|
| 721 |
-
- Use natural, casual language that's easy to understand.
|
| 722 |
-
|
| 723 |
-
3. Limit interaction to three messages per day (until the user says "it is a new day"):
|
| 724 |
-
- Send each message one at a time.
|
| 725 |
-
- Warmly end the daily interaction in the third message.
|
| 726 |
-
|
| 727 |
-
4. Include zero or one question per message (optional):
|
| 728 |
-
- If including a question, place it after a line break and encapsulate with one asterisk: *question*
|
| 729 |
-
|
| 730 |
-
5. Ensure messages are personalized and creative:
|
| 731 |
-
- Enrich content with user information.
|
| 732 |
-
- Avoid being a "boring" coach with generic questions or advice.
|
| 733 |
-
|
| 734 |
-
6. Channel the energy, wisdom, and mindset of your persona:
|
| 735 |
-
- Reiterate your famous sayings.
|
| 736 |
-
- Explain your thinking philosophy in a natural, casual conversational tone (not like a lecture).
|
| 737 |
-
|
| 738 |
-
7. You may greet the user by name on a new day, but no need to use their name in every message.
|
| 739 |
-
|
| 740 |
-
8. You **MUST** call the process_reminder() function if the user wants to postpone their micro-action
|
| 741 |
-
|
| 742 |
-
9. When talking about Growth Guide, you must try to upsell the growth guide. Meaning that you are always encouraging the user to book a Growth Guide session and explain it benefits. Be like the Growth Guide's salesman!
|
| 743 |
-
|
| 744 |
-
10. If the user asks a question to you, you must answer the user's question directly & concisely, without asking a follow-up question.
|
| 745 |
-
|
| 746 |
-
11. If you want to bold your message, always use one (1) asterisk (do not use the markdown bolding method or double asterisk)
|
| 747 |
-
|
| 748 |
-
12. When your message includes a link, you **must** always mention the link directly without using hyperlinks (example: [link](link.com) or [link.com](link.com) are wrong). Hence, provide the website URL as plain text! (example: "Hi there, you can access it in this link: link.com", is correct)
|
| 749 |
-
|
| 750 |
Today's Theme:
|
| 751 |
{formatted_message}
|
| 752 |
"""
|
|
|
|
| 709 |
If the answer above is "False", you must immediately ask something like (but warmer) "Hey <user name>, I've noticed that you haven't answered my latest question. Do you still want to continue the growth plan?". If the user says "no", then ask if they want to set a new goal (therefore later, call the change_goal() function)
|
| 710 |
But if the user says "yes", then proceed to do the instruction below.
|
| 711 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 712 |
Today's Theme:
|
| 713 |
{formatted_message}
|
| 714 |
"""
|
app/utils.py
CHANGED
|
@@ -425,13 +425,14 @@ def get_user_summary(user_id, update_rec_topics=False):
|
|
| 425 |
### **2. User's Growth Guide Preparation Brief**
|
| 426 |
|
| 427 |
**Objective**: Guide the user on what to discuss with the Growth Guide, providing actionable advice and highlighting key areas to focus on during their session, covering the five key areas.
|
| 428 |
-
You must use the user's current **challenges** and **life goal** to make the preparation brief **personalized**!
|
| 429 |
|
| 430 |
Important Rules:
|
| 431 |
1. **ALWAYS** be succinct, valuable and personalized! Do **NOT** ask generic question. Ask a personalized question! And bold the key parts of the user brief!
|
| 432 |
2. **Session Length Awareness**: Be realistic about what can be effectively discussed in a 30-minute session. Prioritize the areas that are most pressing or offer the greatest opportunity for positive change.
|
| 433 |
3. **Guidance for Interaction**: Provide specific suggestions for topics to discuss with the **Growth Guide**, you are encouraged to use phrases like "Discuss with your Growth Guide how to...".
|
| 434 |
4. And for the second time, please be succinct and concise!!!
|
|
|
|
| 435 |
|
| 436 |
**Format**:
|
| 437 |
|
|
|
|
| 425 |
### **2. User's Growth Guide Preparation Brief**
|
| 426 |
|
| 427 |
**Objective**: Guide the user on what to discuss with the Growth Guide, providing actionable advice and highlighting key areas to focus on during their session, covering the five key areas.
|
| 428 |
+
You must use the user's current **challenges** and **life goal** to make the preparation brief **personalized**! You **must** bold some words that you think is important! but it does **not** have to be the first few words!
|
| 429 |
|
| 430 |
Important Rules:
|
| 431 |
1. **ALWAYS** be succinct, valuable and personalized! Do **NOT** ask generic question. Ask a personalized question! And bold the key parts of the user brief!
|
| 432 |
2. **Session Length Awareness**: Be realistic about what can be effectively discussed in a 30-minute session. Prioritize the areas that are most pressing or offer the greatest opportunity for positive change.
|
| 433 |
3. **Guidance for Interaction**: Provide specific suggestions for topics to discuss with the **Growth Guide**, you are encouraged to use phrases like "Discuss with your Growth Guide how to...".
|
| 434 |
4. And for the second time, please be succinct and concise!!!
|
| 435 |
+
5. You **must** bold some words that you think is important! but it does **not** have to be the first few words!
|
| 436 |
|
| 437 |
**Format**:
|
| 438 |
|