#this is cool, did you do this with a CX
1 messages · Page 1 of 1 (latest)
Roll my own, simple JSON document defining the tasks, sample:
{
"name": "welcome",
"steps": [
{
"name": "start",
"task_type": "choose",
"task": "Get the user to the first question",
"initial_messages": [
{
"text": "As mentioned in our invitation email to you, we'll start with a self-assessment that {sponsor_first_name} will review before your first session together."
}
],
"suggested_replies": [
{
"prompt": "Sounds good!",
"next_step": "first_name"
},
{
"prompt": "I have questions",
"next_step": "first_name"
}
]
},
{
"name": "first_name",
"task_type": "llm",
"task": "Determine the user's preferred first name.",
"next_step": "greet"
},
{
"name": "greet",
"task_type": "llm",
"task": "Greet the user by their preferred first name.",
"next_step": "about"
},
{
"name": "about",
"task_type": "choose",
"task": "Inform the user about this survey",
"initial_messages": [
{
"text": "We'll use this dialogue to get to know you a bit better so you can have quality time when you meet {sponsor_first_name} for your first 1:1."
},
{
"text": "Don't overthink or wordsmith your responses. Just share whatever comes to your mind. After you're finished, you’ll have the chance to look back and make tweaks, if needed."
}
],
"suggested_replies": [
{
"prompt": "Got it",
"next_step": "5_adjectives"
},
{
"prompt": "I have questions",
"next_step": "5_adjectives"
}
]
},
{
"name": "5_adjectives",
"task_type": "llm",
"task": "Determine what 5 adjectives a best friend would use to describe the user.",
"next_step": "free_time_thinking"
},
how did you develop this? did you use any library/framework?
The app stack is Flutter -> Firebase -> Python Cloud Functions -> Langchain . Here is the main Python file that receives a "bot request" (Firebase doc, trigger function on doc creation) and then uses the metadata on the request to load the Playbook and current step and then invokes the LLM to advance. https://gist.github.com/andy-tmpt-me/683177530a7e23a732d8f962dbe1b42e
Main class in my LLM "Playbook" implementation--not complete but gives an idea of what's going on - playbook.py
How it looks in practice (still in stealth / prototyping phase) https://www.youtube.com/watch?v=d1Un2wJiTwo
The user experience for applying to a community in Tmpt, which is a chat interface driven by a playbook
I guess, in a very quick and dirty sort of way? I should certainly learn CX. However it seemed like more than I need at the moment ("optimized for enterprise") and since still prototyping I didn't want to get tunnel vision on a large platform.
this is pretty cool