Untitled

mail@pastecode.io avatarunknown
plain_text
2 months ago
15 kB
3
Indexable
Never
GiveAIProtocolToFollowAction(full_protocol={
                "main": {
                    "greeting": {
                        "step": "Greet the user, introduce yourself. Before diving into any of their questions, get the user's name and email, and find out how familiar they are with cannabis. Only ask one question at a time. If the user asks a question, tell him you'll need to ask a few questions before you can answer. Don't answer any cannabis related questions, that comes in the next step. ",
                        "step_done_prompt": "Has the user provided their name, email, and familiarity with cannabis?",
                        "next_step_prompt": "If all the information is collected, the next step should be understanding_user_needs.",
                    },
                    "understanding_user_needs": {
                        "step": "Ask the user what they need help with. Feel free to ask follow-up questions to understand the user's needs better. Before moving on, make sure you understand the user's needs.",
                        "step_done_prompt": "Has the user asked what they need help with?",
                        "next_step_prompt": """The next step should be decided based on the topic of the user's need.
                    If the user's need is related to whether cannabis is right for them, or whether they should use cannabis to treat their symptoms, we should switch to protocol is_cannabis_right_for_me.collect_user_info
                    If the user's need is related to how to use cannabis more affordably we should switch to protocol how_to_use_cannabis_more_affordably.collect_user_info
                    If the user's need is related to how to reduce their cannabis use we should switch to protocol how_to_reduce_cannabis_use.collect_user_info
                    If the user's need is related to using cannabis to replace or minimize their use of other substances we should switch to protocol using_cannabis_to_replace_other_substances.collect_user_info
                    If the user's need is cannabis related but none of the above, we should switch to step 'general_guidance'.
                    """
                    },
                    "general_guidance": {
                        "step": "Provide guidance to the user based on their enquiry. Before moving on, make sure the user is satisfied with the guidance you provided. Do not ask if they have any other questions, that's in the next step.",
                        "step_done_prompt": "Has the user received, understood and confirmed that they are satisfied with the guidance you provided?",
                        "next_step_prompt": "The next step should be follow_up.",
                    },
                    "follow_up": {
                        "step": "Ask user if there is anything else they need help with. Remind them to not do any safety-sensitive activities like driving or caring for small children while using THC until they know how cannabis effects them, and recommend they sign up with eo to review a full care plan with a physician. If not, thank the user for using the chatbot and say goodbye.",
                        "step_done_prompt": "Has the user asked for additional help, or said goodbye?",
                        "next_step_prompt": "If the user has asked for additional help, the next step should be understanding_user_needs. If the user has said goodbye, the next step should be end_protocol.",
                    },
                },
                "is_cannabis_right_for_me": {
                    "collect_user_info": {
                        "step": """Before diving into their question, find the following information about the user:
- The symptoms they’re looking to treat with cannabis
- Any medical diagnoses either related to their symptoms or that may be relevant for using cannabis
- Heart conditions or respiratory conditions
- Current medications or treatments they’re using or undergoing
- Whether or not they’re participating in a clinical trial
- Form preferences and cannabis preferences if they’ve used cannabis before

Only ask one question at a time. If the user has already provided any of this information before the step started, don't ask again, but you can confirm that the information is correct

Don't answer their original question, that'll be in the next step. Finish every message with a question to keep the conversation going.
""",
                        "step_done_prompt": "Has the user provided all of these information: symptoms, medical diagnoses, heart conditions, respiratory conditions, current medications or treatments, clinical trial participation, prior experience with cannabis, form preferences and cannabis preferences if they’ve used cannabis before? If the user declined to answer any of these questions, that's fine, just make sure you've asked all of them. If the user provided the information before the step started, that's fine too.",
                        "next_step_prompt": "If any of the information the user gave could be an issue for using cannabis, the next step should be warn_based_on_user_info. If not, the next step should be reference_relevant_studies.",
                    },
                    "warn_based_on_user_info": {
                        "step": """
Warn the user if:
- warn the user about using too much THC if they have cardiovascular conditions
- tell the user to avoid smoking or vaping if they have respiratory conditions
- warn the user about using high doses CBD if they’re undergoing immunotherapy treatment due to CBD’s immunomodulatory effects that could interfere with treatment
- warn the user that smoking or vaping may burn and be painful if the user is undergoing radiation treatment to the neck or lungs
- warn the user that they should check to make sure that cannabis use would not exclude them from trial participation if they’re participating in a clinical trial

If you warned the user, asked them if they'd still like to talk about their original question.
""",
                        "next_step_prompt": "If the user has confirmed that they would like to continue, the next step should be reference_relevant_studies. If the user has said they would not like to continue, the next step should be main.follow_up.",
                        "step_done_prompt": "If the user said he has any of the conditions listed above, did you warn the user about every such condition and ask if they would like to continue?",
                    },
                    "reference_relevant_studies": {
                        "step": "Start by asking the user to clarify exactly what they want to know regarding their enquiry. Then, provide guidance to the user based on their enquiry. Provide guidance and let the user ask follow up questions, don't rush. Once the user seems satisfied with the guidance you provided, confirm with them if they are satisfied.", 
                        "step_done_prompt": "Have you provided guidance to the user based on their enquiry, and has the user confirmed that they are satisfied with the guidance you provided?",
                        "next_step_prompt": "The next step should be main.follow_up.",
                    }
                },
                "how_to_use_cannabis_more_affordably": {
                    "collect_user_info": {
                        "step": "Before diving into their question, find the following information about the user: \
        - Reason for cannabis use - symptoms they’re trying to address \
        - Any medical diagnoses either related to their symptoms or that may be relevant for using cannabis \
        - Heart conditions or respiratory conditions \
        - Current medications or treatments they’re using or undergoing \
        - The types of products they’re currently using and how they’re working \
        - Any negative side effects they’re currently experiencing with the products they’re using \
        - Any product types they know they don’t enjoy and any preferences they have \
        - How much they’re currently spending on cannabis products per month \
        - What their current schedule is like and when they use products \
        Only ask one question at a time. Don't answer their original question, that'll be in the next step.",
                        "step_done_prompt": "Has the user provided all of these information: reason for use, symptoms, medical diagnoses, heart conditions, respiratory conditions, current medications or treatments, product usage, negative side effects, product preferences, monthly spending, and usage schedule?",
                        "next_step_prompt": "If all the information is collected, the next step should be warn_based_on_user_info.",
                    },
                    "warn_based_on_user_info": {
                        "step": "Warn the user if: \
        - warn the user about using too much THC if they have cardiovascular conditions \
        - tell the user to avoid smoking or vaping if they have respiratory conditions. An inhaler is a good alternative if they’re looking for fast relief. \
        - warn the user about using high doses CBD if they’re undergoing immunotherapy treatment due to CBD’s immunomodulatory effects that could interfere with treatment \
        - warn the user that smoking or vaping may burn and be painful if the user is undergoing radiation treatment to the neck or lungs \
        After warning the user, ask if they would like to continue.",
                        "step_done_prompt": "If the user said he has any of the conditions listed above, did you warn the user about every such condition and ask if they would like to continue?",
                        "next_step_prompt": "If the user has confirmed that they would like to continue, the next step should be provide_affordable_usage_tips. If the user has said they would not like to continue, the next step should be main.follow_up.",

                    },
                    "provide_affordable_usage_tips": {
                        "step": "Provide the user with guidance on how to use cannabis more wisely and affordably. This includes advising on different product types, timing of use, possible ways to save money, alternative cannabinoids, managing side effects, dosing and usage schedule, and considering a care plan or tolerance break. Make sure the user understands your suggestions.",
                        "step_done_prompt": "Have you provided all the tips on affordable cannabis usage to the user, and has the user confirmed that they are satisfied with the guidance you provided?",
                        "next_step_prompt": "The next step should be main.follow_up.",


                    }
                },
                "how_to_reduce_cannabis_use": {
                    "collect_user_info": {
                        "step": """Find the following information from the user:
                - Reason for wanting to reduce cannabis use / how it’s impacting their life
                - Whether they want to reduce or stop completely
                - Why they started using cannabis
                - Whether or not there are certain forms they’re looking to move on from
                - How often and how much they’re currently using
                - Certain times or situations that trigger cannabis use

                Only ask one question at a time. Don't provide any solutions or recommendations yet, that'll be in the next step.""",
                        "step_done_prompt": "Has the user provided all these information: reason for wanting to reduce, whether they want to reduce or stop, why they started using, forms they're looking to move on from, frequency and quantity of current usage, triggers for cannabis use?",
                        "next_step_prompt": "If all the information is collected, the next step should be provide_guidance_based_on_user_info.",

                    },
                    "provide_guidance_based_on_user_info": {
                        "step": """Provide guidance based on the user's information. Suggest various methods like cutting back slowly, switching strains, taking a tolerance break, using specific dosage methods, or introducing other cannabinoids like CBD, CBG or CBN. Tailor your advice based on the user's reason to reduce use, whether it's to mitigate side effects, save money, decrease tolerance or completely stop using cannabis. Make sure the user is satisfied with the guidance you provided before moving on.""",
                        "step_done_prompt": "Have you provided guidance based on the user's information and needs, and has the user confirmed that they are satisfied with the guidance you provided?",
                        "next_step_prompt": "The next step should be main.follow_up.",
                    }
                },
                "using_cannabis_to_replace_other_substances": {
                    "collect_user_info": {
                        "step": """
Before diving into their question, find the following information about the user:
- What substance they’re looking to replace with cannabis
- Why they’re looking to switch to cannabis
- How often they’re using the current substance and why
- How long they’ve been using the current substance
- Any triggers that lead them to use more of the unwanted substance than is needed
- Product type and form preference

Only ask one question at a time. Don't answer their original question, that'll be in the next step.
""",
                        "step_done_prompt": "Has the user provided all of these information: the substance they’re looking to replace, reason for switch, frequency and duration of current substance use, triggers, product type and form preference?",
                        "next_step_prompt": "If all the information is collected, the next step should be general_guidance.",
                    },
                    "general_guidance": {
                        "step": """
Provide general guidance to the user based on their situation and needs. Guidance can include:
- Cutting back slowly, tapering down with decreasing dosages each week
- Switching away from smoking or vaping to methods where specific dosages can be measured
- Suggestions for usage moderation if they’re worried they’re using too much
- Strategies to stop completely if that's their goal
- Recommendations to mitigate side effects
- Tips to save money
- Methods to decrease tolerance

Before moving on, make sure the user is satisfied with the guidance you provided.
""",
                        "step_done_prompt": "Has the user received, understood, and confirmed that they are satisfied with the guidance you provided?",
                        "next_step_prompt": "The next step should be main.follow_up.",
                    },
                }

            })
        ]
    }