Skip to content

Instantly share code, notes, and snippets.

@kitsuya0828
Created September 21, 2024 17:42
Show Gist options
  • Save kitsuya0828/bd02b0be17a21b24a9b9defb7db40113 to your computer and use it in GitHub Desktop.
Save kitsuya0828/bd02b0be17a21b24a9b9defb7db40113 to your computer and use it in GitHub Desktop.
Results of the Multiple Customer Queries Version from https://docs.mem0.ai/examples/customer-support-agent Using GPT-4o
Python 3.12.5 (main, Aug 30 2024, 11:27:26) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from main import CustomerSupportAIAgent
>>> support_agent = CustomerSupportAIAgent()
>>> support_agent.handle_query("I haven’t received the item I ordered yet. Can you help me?", user_id="jane_doe")
I'm sorry to hear that you haven't received your item yet. I'd be happy to assist you. Could you please provide me with your order number and any additional details about your order? This will help me locate your shipment and provide you with an update.
>>> support_agent.handle_query("Can you help me with my account? I can’t log in.", user_id="john_smith")
I'm sorry to hear that you're having trouble logging in to your account. I'd be happy to assist you. To get started, could you please provide me with some additional details?
1. Are you seeing any specific error messages when you try to log in?
2. Have you tried resetting your password?
3. Are you using the correct email or username associated with the account?
4. Are you trying to log in through a web browser or a mobile app?
Once I have more information, I'll be able to guide you more effectively.
>>> support_agent.handle_query("The order number is #12345. The tracking information hasn’t been updated.", user_id="jane_doe")
I'm sorry to hear that you're experiencing this issue with your order. Let me assist you in resolving it.
Could you please provide me with the following information to better assist you:
1. The date you placed the order.
2. The current status shown in the tracking information.
3. Your shipping address, just to ensure there were no issues with the provided address.
Once I have this information, I can look into your order and provide further assistance.
>>> support_agent.handle_query("I’m getting an ‘Incorrect Password’ message, but I’m sure my password is right.", user_id="john_smith")
I'm sorry you're having trouble logging in. Here are a few steps to help you resolve this issue:
1. **Double-check Your Password:**
- Ensure that CAPS LOCK is not on since passwords are case-sensitive.
- Make sure you are entering the password exactly as you originally set it up, including any special characters and case sensitivity.
2. **Reset Your Password:**
- If you still can't log in, you may need to reset your password. Look for a "Forgot Password" link on the login page and follow the instructions to reset your password.
3. **Clear Browser Cache:**
- Sometimes, clearing your browser’s cache and cookies can resolve login issues. Go to your browser’s settings to clear this data.
4. **Try a Different Browser:**
- Attempt logging in using a different web browser to see if the issue persists.
5. **Check for Account Lockout:**
- If you’ve tried logging in multiple times unsuccessfully, your account might be temporarily locked for security reasons. Wait a few minutes and try again, or check your email for instructions on how to unlock your account.
6. **Contact Support:**
- If none of the above steps resolve your issue, please reach out to customer support for further assistance. Provide any error messages you’re seeing and any steps you’ve already taken to troubleshoot.
Would you like assistance with resetting your password or have any other questions?
>>> support_agent.handle_query("One of the items I received is damaged. How can I return it?", user_id="jane_doe")
I'm sorry to hear that you received a damaged item. I can help you with the return process. Here's what you need to do:
1. **Check the Return Policy:** Before proceeding, please review our return policy to ensure your item is eligible for return.
2. **Prepare Your Order Information:** Have your order number and details about the damaged item ready. This information will be necessary for processing your return.
3. **Contact Customer Support:** Reach out to our customer support team by [providing your preferred method such as chat, email, or phone]. You'll need to provide:
- Your order number
- A description of the damage
- Photos of the damaged item if possible
4. **Return Authorization:** Once you contact us, we'll issue a return authorization and provide instructions on how to return the item. This may include a prepaid return label or arrangements for item pickup.
5. **Pack the Item:** Carefully pack the damaged item in its original packaging (if available) along with any accessories, manuals, or other items that came with it.
6. **Ship the Item:** Follow the instructions provided by customer support to send back the item.
7. **Receive Replacement or Refund:** Once we receive the damaged item, we will inspect it and process your return. You will then receive a replacement item or a refund, depending on your preference and our policy.
If you have any specific questions or need immediate assistance, please let me know your order number and other relevant details, and I'll be happy to assist you further.
>>> support_agent.handle_query("I reset my password and can log in now. Thanks! Can you check if my order has shipped?", user_id="john_smith")
I'm glad to hear you were able to reset your password successfully! I'd be happy to check the status of your order for you. Could you please provide me with your order number or any other relevant details that might help me locate your order?
>>> support_agent.handle_query("I completed the return process. When will I receive the refund?", user_id="jane_doe")
Thank you for completing the return process! Refund processing times can vary depending on several factors, such as the method of payment and the specific policies of our company.
Generally, once we receive the returned item and it passes our inspection:
- For credit/debit card purchases, refunds usually take 5-10 business days to appear on your statement.
- For PayPal transactions, refunds are typically processed within 3-5 business days.
- For other payment methods, it might vary, but you can generally expect a refund within 7-10 business days.
If you have any further questions or need more detailed information, feel free to provide your order number, and I'll be happy to assist you further!
>>> support_agent.handle_query("My order number is #67890. Has it shipped yet?", user_id="john_smith")
I can help with that! I just need a bit more information for verification purposes. Could you please provide me with the email address or phone number associated with your order?
>>> support_agent.handle_query("I received the refund, thank you. By the way, has there been any update on my order #12345?", user_id="jane_doe")
I'm glad to hear that you received your refund! Let me check the status of your order #12345 for you. Could you please provide me with your email address or the name associated with the order?
>>> support_agent.handle_query("The email associated with my order is john@example.com.", user_id="john_smith")
Thank you for providing your email address. How can I assist you with your order today? Are you having issues with tracking, payment, or something else?
>>> support_agent.handle_query("The email associated with my order is jane@example.com.", user_id="jane_doe")
Thank you for providing your email address. How can I assist you with your order today, Jane?
>>> support_agent.get_memories(user_id="jane_doe")
[{'id': '0afcee6e-c6db-4d79-8389-0aed2db21d59', 'memory': 'Inquired about the update on order #12345', 'hash': '78dfd92ea69ab2da13a096c7bdeb9121', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:54:57.764083-07:00', 'updated_at': None, 'user_id': 'jane_doe'}, {'id': '19da4312-b975-43bd-a717-72c827f44152', 'memory': "User hasn't received the item they ordered", 'hash': '94beff5ea350d7d12a7149a5764fe4e2', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:17:38.819065-07:00', 'updated_at': '2024-09-21T09:45:37.916913-07:00', 'user_id': 'jane_doe'}, {'id': '1cc50a71-eebb-4bd5-9eff-85198c775d3f', 'memory': "Tracking information hasn't been updated", 'hash': '6717c12e55ec309a67ca261fc5a5f5a8', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:48:07.253811-07:00', 'updated_at': None, 'user_id': 'jane_doe'}, {'id': '373014a2-579b-4ff8-9005-f91f424323cb', 'memory': 'Received the refund', 'hash': '788b7fd7dd38afa6333851a9213f50ae', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:54:57.527531-07:00', 'updated_at': None, 'user_id': 'jane_doe'}, {'id': '4265360e-b0cd-451c-87bc-27d2a85c7b71', 'memory': 'Received a damaged item and wants to return it', 'hash': '4cde002065734792fe1bef228a3a6254', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:50:19.104036-07:00', 'updated_at': None, 'user_id': 'jane_doe'}, {'id': '7e482d00-fa79-40ec-b557-4b42b7e871a6', 'memory': 'Email associated with order is jane@example.com', 'hash': 'bd24409513d20d0fe5fa86f07e590324', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:57:01.996970-07:00', 'updated_at': None, 'user_id': 'jane_doe'}, {'id': '8edbc6c2-8b46-48d2-8cbb-dbbb6ed17afb', 'memory': 'Order number is #12345', 'hash': 'b019ad7fb47cf53dcc34955c6d337cff', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:48:06.742294-07:00', 'updated_at': None, 'user_id': 'jane_doe'}, {'id': 'ac23f1ea-e115-4ec4-a8b7-0fed51a1ce83', 'memory': 'Completed the return process', 'hash': '8a0e6a0ec3ace1c12a8ca4b7bc6ad973', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:53:03.878676-07:00', 'updated_at': None, 'user_id': 'jane_doe'}, {'id': 'd9ad56cf-427c-49ae-8de6-c248edb65e78', 'memory': 'Inquiring about refund timeline', 'hash': '53fc004c2bda289aa5c1543699c027ad', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:53:04.237565-07:00', 'updated_at': None, 'user_id': 'jane_doe'}]
>>> support_agent.get_memories(user_id="john_smith")
[{'id': '0689da33-071a-4058-b30e-88d2907ef0e3', 'memory': 'User is sure their password is right', 'hash': '35cf52b3b1e36d47800eaefb5ccf28b2', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:49:12.687383-07:00', 'updated_at': '2024-09-21T09:49:11.985513-07:00', 'user_id': 'john_smith'}, {'id': '5f46904a-765b-4fcb-848c-2560883bcc3c', 'memory': 'Requested to check if order has shipped', 'hash': '4cebe6ae787b1095349d4a3c059a9548', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:51:52.253116-07:00', 'updated_at': None, 'user_id': 'john_smith'}, {'id': '9e2e8193-fac6-46fc-832a-8816eeb0edb8', 'memory': 'Reset password and can log in now', 'hash': '3ab93d5259733142ca8ef0f47f68b8ea', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:51:52.015685-07:00', 'updated_at': None, 'user_id': 'john_smith'}, {'id': 'a49a158b-6045-4bfc-9006-e69330c43b95', 'memory': 'Order number is #67890', 'hash': '542f4e5ed04409f79cba5acac44ee671', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:54:07.394982-07:00', 'updated_at': None, 'user_id': 'john_smith'}, {'id': 'dd5a462b-eb7b-469d-827e-44c1f9dd8516', 'memory': 'Email associated with order is john@example.com', 'hash': '380026b22a7fb9fd1401e5adccf6e39c', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:56:00.865120-07:00', 'updated_at': None, 'user_id': 'john_smith'}, {'id': 'eff9ca59-3d1c-4cf8-bde5-f2f1badeaa70', 'memory': "User is getting an 'Incorrect Password' message", 'hash': '6251bed0fb14fc344dab0a5fac95a66c', 'metadata': {'app_id': 'customer-support'}, 'created_at': '2024-09-21T09:47:09.503118-07:00', 'updated_at': '2024-09-21T09:49:11.985513-07:00', 'user_id': 'john_smith'}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment