acceptable-kangaroo-64719
08/23/2023, 12:09 PMacceptable-kangaroo-64719
08/23/2023, 12:09 PMmd
Analyze the provided chat transcript and try to answer the following four questions:
1. What is the user's name?
2. What is the user's email address
3. Why does the user want an appointment?
4. When does the user prefers to be contacted (either morning, afternoon, or evening)
Understand what the user said and make a plan. Make sure you include all four pieces of information in your plan. Then execute the plan, paying attention to synonyms and common sense. When information is present, save it to the appropriate variable. Only change a variable's value if it is empty.
Always end by writing a relevant follow up using the next question. Ask questions one at a time.
When all questions are answered, write a confirmation message including all information.
Pros:
* Really cool! 😎
Cons:
* Very fragile to changes like:
* New or different survey questions
* Updated GPT model
* Out-of-scope questions or dynamic follow-ups
* Multilingual responses
* Hard to fine-tune
* Difficult to extract niche info like SKUs or brand namesacceptable-kangaroo-64719
08/23/2023, 12:09 PMjs
class UserName {
name = 'name'
value = 'Undefined'
description = 'the users name'
constructor(value) {
this.value = value
}
}
Then, pass the data class's description to an AI task to generate a prompt:
md
You are a friendly AI that is asking users survey questions. Use the provided chat transcript for details (like their name) that can make the next question more personalized.
Write a personalized, kind follow up question based on the direction. Pay attention, and make sure you follow the direction.
Finally, we use a second AI task to extract the data, using both the data class and the chat transcript as inputs:
md
Extract the required information from the `userMessage`, paying special attention to the information emphasized in the input.
When you find information, save it to the appropriate variable. If there is no information available, leave the variable empty. Finally, if you find additional relevant information you may extract it, too.
Pros:
* More reliable than AI task alone
* AI can answer out-of-scope questions and ask relevant follow-ups
* Easy to add knowledge base, custom analytics
* Less complicated to add new questions
Cons:
* Fragile to GPT model changes (but not as much as AI Task only)
* Code-heavy and inscrutible to non-programmers
* Can grow in complexity for larger surveys
The bot is attached to this post. Happy Bot-building 🙌acceptable-kangaroo-64719
08/23/2023, 12:10 PMwonderful-wall-19410
08/23/2023, 9:04 PMacceptable-kangaroo-64719
08/24/2023, 10:15 AMworried-actor-72929
08/27/2023, 8:32 AMquiet-raincoat-89190
08/30/2023, 12:29 AMlate-computer-91611
10/01/2023, 2:03 AMmicroscopic-lifeguard-11844
10/11/2023, 7:52 PMmicroscopic-lifeguard-11844
10/11/2023, 7:53 PMmicroscopic-lifeguard-11844
10/11/2023, 7:54 PMmicroscopic-lifeguard-11844
10/11/2023, 7:54 PMrhythmic-cpu-56836
11/19/2023, 4:14 AMrhythmic-cpu-56836
11/19/2023, 4:15 AMrhythmic-cpu-56836
11/21/2023, 2:39 AMmicroscopic-lifeguard-11844
11/22/2023, 9:03 PMjolly-policeman-82775
12/01/2023, 3:32 PM