diff --git a/docs/2. Onboarding/01. Glific Onboarding Toolkit.md b/docs/2. Onboarding/01. Glific Onboarding Toolkit.md index 653cd5db3..79618e87d 100644 --- a/docs/2. Onboarding/01. Glific Onboarding Toolkit.md +++ b/docs/2. Onboarding/01. Glific Onboarding Toolkit.md @@ -55,7 +55,7 @@ ___ ``` https://staging.tides.coloredcow.com/ Phone number: +917834811114 -Password: secret1234 +Password: Secret1234! ``` Please don't use this to build extensive flows and testing on live numbers. We update the account every week so any work you do is likely to be removed. Please only use it to view the platform and check out the features. diff --git a/docs/2. Onboarding/03. Setup an organisation on GupShup.md b/docs/2. Onboarding/03. Setup an organisation on GupShup.md index 13450e40f..fff792a0e 100644 --- a/docs/2. Onboarding/03. Setup an organisation on GupShup.md +++ b/docs/2. Onboarding/03. Setup an organisation on GupShup.md @@ -131,11 +131,13 @@ a) Disable Automated opt-in message. 23. After verification, you will be live on Gupshup. -24. To set up Glific, you’ll need to send us the following details at [https://cc.tides.coloredcow.com/organization-registration](https://cc.tides.coloredcow.com/organization-registration) +24. To set up Glific, you’ll need to send us the following details at https://prod.glific.com/organization-registration 25. App Name 26. GupShup account phone number -27. API key +27. API key - Go to Gupshup, Click on the right corner top click on it and copy the API key and paste it in the Glific form + +Screenshot 2024-02-15 at 9 29 44 AM Click on `continue` button. diff --git a/docs/3. Pilot Essentials.md b/docs/3. Pilot Essentials.md new file mode 100644 index 000000000..40e690d5b --- /dev/null +++ b/docs/3. Pilot Essentials.md @@ -0,0 +1,39 @@ +> ### **3 minute read                                                                                                                         `Beginner`** + +Designing chatbots is an iterative process, and with every launch or pilot, you learn new things and make changes. But if you are launching your chatbot for the first time with your users, here are 15 quick things you need to check. It shouldn't take you more than 15 minutes to ensure everything is in order. + +Disable the automated opt-in message on Gupshup. This will prevent your users from receiving additional default messages from Gupshup, which might confuse them. To do this, click on your app on Gupshup, go to the Opt-ins tab, click on the Onboarding mechanisms dropdown arrow, and scroll down to disable the toggle. + + + +The first message that a user receives upon joining the bot should be a consent message. Here are a few guidelines for designing your consent message: +Clearly mention the name of the organization and the purpose of the bot. +Clearly ask the user if they would like to receive messages from the bot (You can provide an interactive message with a "Yes" or 👍🏼 button). +Users should have an option to opt out. Therefore, add the keyword in the footer through which users can opt out from the bot. + + + +Other pointers to remember- +It is recommended to have the first message sent by the user to the chatbot, instead of you broadcasting the message to users, even if you have user details. Broadcasting messages might lead to user reporting or blocking the bot, which can affect the overall health of the bot. Unless you have obtained user consent outside the bot (on your app or manually), the first message should always be user-initiated. +Create a separate flow for users who type "STOP" and add them to a collection for future reference. + +3) Update the Opt-in settings post-user consent. It is mandatory to update a contact's settings with Opt-in after their consent. + + +4) Important user information collected during registration, such as Name, Language, Training group, City, etc., should be updated in the contact profile. This will be helpful for you to refer in any flow in future + +5) Confirm important information (like Name, Language, etc.) before updating the contact. Sometimes, users might enter incorrect information, which can impact the user experience throughout. + +For example, sharing a name as "My name is Krishna Priya" instead of just "Krishna Priya" can lead to the bot referring to the user with the incorrect name every time. Additionally, a user choosing the wrong language preference by mistake might discourage them from using the bot. + +6) Set default and new contact flows through Settings → Flows to ensure that new users receive the intended flow. +7) Add content in all nodes for all languages, if multiple languages are used for the bot. +8) Add users to relevant collections based on how you want to communicate with them in the future. +9) Use interactive messages wherever you want the user to choose from given options or when answers are predictable (e.g., grade, Yes/No, Gender, etc.). +10) If a flow is triggered from your end to the user, the first message of the flow should be an HSM message (because we don't know if the users are in the active session window or not). +11) Add labels for both outgoing and incoming messages for all the data you want to capture and check in the future. +12) Use appropriate names for Flows, Keywords, and Result names to make it easy to track them in the future. +13) Use emoticons, bold, italics, and media as needed. +14) Ensure the user does not encounter any dead ends in the bot, especially in the case of interactive messages. Make sure there is also an option for the user to send free text apart from the button options you provide, and clarify what the user is expected to do. Connect the user's response back to the main question and wait for their response so the flow can proceed. + +15) Testing, Testing, Testing: Test the chatbot internally with at least 3 to 5 people on mobile phones before sharing it with actual users. diff --git a/docs/3. Product Features/01. Chats.md b/docs/3. Product Features/01. Chats.md index 04b6172f8..74059581f 100644 --- a/docs/3. Product Features/01. Chats.md +++ b/docs/3. Product Features/01. Chats.md @@ -1 +1,48 @@ -To be filled \ No newline at end of file +###**3 minute read                                                                                                                         `Beginner`** + + +**Chats**: This section on the left side is highlighted, indicating that the user is currently viewing the chat interface. + +**Chat Window**: The central part of the interface shows an ongoing conversation with a particular contact. + +**Contacts**: On the right side, there is a section titled 'Contacts' listing different contacts who have been interacted. + + + +Screenshot 2024-02-13 at 12 06 06 PM + +**Collection**: Collections in Glific are like folders where you can gather a bunch of users together. Once you have them in a collection, you can send messages to everyone in that collection all at once. It is a handy way to keep things organized and communicate efficiently with different groups of users.You can find more details + [here](https://glific.github.io/docs/docs/Product%20Features/Others/Collections/) + + +**Saved Searches** : The saved searches are visible. + +Screenshot 2024-02-13 at 12 22 06 PM + + +All - Shows all contacts. +Not Replied - Shows contacts list whose messages were read but not replied to yet. +Not Responded - Shows contacts who have not responded yet to the messages. + +You can read more about this [here](https://glific.github.io/docs/docs/Product%20Features/Searches/#search-contacts) + + +**Session Timer** : You can also come to know the session timer for a particular contact in top right corner of the screen + +Screenshot 2024-02-13 at 12 22 50 PM + +**Shortcuts**: + +The handy shortcuts like Speed Send, Templates, and Interactive Messages are present in the bottom part of the chat screen. These shortcuts make messaging quicker and easier. +Speed Send helps you send messages faster, Templates let you use pre-made message formats, and Interactive Messages allow you to engage users more dynamically. They are like quick buttons that save you time and effort while communicating with users. + + +**Preview Button**: + +Screenshot 2024-02-13 at 12 22 32 PM + + +A green phone-like icon towards the right bottom end is present which acts as a preview button. When you click on it, you can see how your chats will actually look on a phone screen. It is like a sneak peek feature that lets you visualize how your messages will appear to users, helping you fine-tune your communication for a better user experience. + + +Screenshot 2024-02-13 at 12 23 13 PM diff --git a/docs/3. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md b/docs/3. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md index eac05eadf..1ab1be87a 100644 --- a/docs/3. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md +++ b/docs/3. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md @@ -249,7 +249,9 @@ ___ ## Note -To handle blank cells in between the Google Sheet use [Split by Expression](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Split%20By/Custom%20Expression/) +- This functionality can be used to write upto 30 columns in google sheets +- To handle blank cells in between the Google Sheet use [Split by Expression](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Split%20By/Custom%20Expression/) + ___ ## Advanced Feature Webinar diff --git a/docs/4. Integrations/ChatGPT Integration via Jugalbandi.md b/docs/4. Integrations/ChatGPT Integration via Jugalbandi.md index d8ed0f256..62f2291ae 100644 --- a/docs/4. Integrations/ChatGPT Integration via Jugalbandi.md +++ b/docs/4. Integrations/ChatGPT Integration via Jugalbandi.md @@ -1,4 +1,4 @@ -> ### **3 minute read                                                                                                                         `Advanced`** +> ### **3 minute read                                                                                                                         `Advanced`** **Leverage the capabilities of GPT models developed by OpenAI by using Jugalbandi APIs. Jugalbandi APIs is enhancing Glific by providing Retreival Augemented Generation or in simple words, enabling NGOs to use custom knowledge base for GPT models to answer from.** @@ -39,17 +39,29 @@ The function is then called with three key-value pairs as the function body ![image](https://github.com/glific/docs/assets/40158831/7f509016-f7fd-43c8-83c1-b133dd95a7dc) -`url:` URL depends on which model we use to process the response as Jugalbandi offers +`url:` URL is referencing a given end point from the [Jugalbandi APIs](https://api.jugalbandi.ai/docs) some examples are given below -1. GPT3.5: `https://api.jugalbandi.ai/query-with-langchain-gpt3-5` -1. GPT4: `https://api.jugalbandi.ai/query-with-langchain-gpt4` -1. Langchain: `https://api.jugalbandi.ai/query-with-langchain` -1. GPTindex: `https://api.jugalbandi.ai/query-with-gptindex` +_below is picture showing the list of end points_ + +Screenshot 2024-02-13 at 8 05 22 PM + +following shows how to use these end points in the webhook call parameter: + +1. to use GPT3.5: `https://api.jugalbandi.ai/query-with-langchain-gpt3-5` +1. to use GPT4: `https://api.jugalbandi.ai/query-with-langchain-gpt4` +2. to use GPT4 using custom prompt: `https://api.jugalbandi.ai/query-with-langchain-gpt4-custom-prompt` `uuid_number:` The "uuid_number" is a special code assigned to a file when it is uploaded through the [jugalbandi API](https://api.jugalbandi.ai/docs#/Document%20Store/upload_files_upload_files_post) then this `UUID` is used to find the relevant information from the knowledge base and gives it back to you. `query_string:` user query asked in flow +additionally, an extra parameter can be passed called `prompt:` in the API end points which end with `custom-prompt`. This is a system prompt that can be passed to the model. This enables NGOs to experiment with prompt engineering. Generally it can be used to provide guidelines or steps or explicit instructions for the LLM to process the 'query_string' being passed, like +- to limit the length of response generated, +- decline to answer if the question asked is outside the scope of the documents uploaded (this prevents what is termed as hallucination by the LLMs) +- generate in a specific tone, ex catering to a student below the age of 15 etc. +- anything else under the ambit of prompt engineering which allows one to get creative in eliciting responses from LLMs + + Additionally, you can use [Google sheet](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Link%20Google%20Sheets/) feature to store response into google sheet as this data can later be analyzed to evaluate each model's accuracy and effectiveness and help you make a decision. Using the [webhook logs](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Call%20a%20webhook/#checking-webhook-logs), you can view the logs of questions asked and responses received by ChatGPT. diff --git a/docs/4. Integrations/ChatGPT using OpenAI APIs.md b/docs/4. Integrations/ChatGPT using OpenAI APIs.md new file mode 100644 index 000000000..ab96aaef9 --- /dev/null +++ b/docs/4. Integrations/ChatGPT using OpenAI APIs.md @@ -0,0 +1,64 @@ +> ###**3 minute read                                                                                                                         `Advanced`** + +## Using ChatGPT within Glific using the OpenAI APIs + +_**Leverage the capabilities of GPT models developed by OpenAI by using OpenAI APIs.**_ + +## Pre-requisites +1. Create an account in OpenAI platform [platform](https://openai.com/product) +2. Create new API keys +3. Make sure there is enough credit in OpenAI account to allow usage. +4. Pricing for API calls is as per OpenAI platform [pricing](https://openai.com/pricing) + +Screenshot 2024-02-07 at 10 50 58 AM + +_Above is a representative image from the OpenAI platform account_ + +## How it will work + +1. Question is asked by the user after the flow is initiated +2. OpenAI API call is made using webhooks within the flow +3. Model being called to generate responses is `gpt-3.5-turbo-16k` +4. The response to the question is then sent to the user + +## Steps to follow to set up OpenAI API in Glific platform +1. Go to `Settings`, find `OpenAI (ChatGPT) (Beta)` +2. Click on `is active` and paste the OpenAI API key from your OpenAI platform account + +Screenshot 2024-02-07 at 10 48 51 AM + +## Using the webhook for OpenAI API call in a Glific flow + +Screenshot 2024-02-07 at 9 59 24 AM + +_Representative image to explain the steps in OpenAI API calls in a simple flow_ + +[Sample flow](https://drive.google.com/file/d/1jl0NWn73YlK1qMRedaPnGCQwDKHfG_7j/view?usp=drive_link) + + +1. Get the user question +2. In `call a webhook` node, select `function` and paste function name as `parse_via_chat_gpt` + + Screenshot 2024-02-07 at 10 52 49 AM + +3. Share the following function body + ` { + "contact": "@contact", + "results": "@results", + "question_text": "@results.question" + }` + +here `question_text` is the parameter name corresponding to user question. + +Screenshot 2024-02-07 at 10 53 21 AM + +4. The response from GPT is shown as `@results.webhookresultname.parsed_msg`, in the given example `gpt_response` is the webhook result name. + + +## Limitations +1. At present, this is simple question answer with the GPT model `gpt-3.5-turbo-16k` +2. Selection of GPT model is not yet customizable from org Glific instances +3. Additional system prompt is not yet customizable from org Glific instances +4. Parameters like temperature, top P etc are not yet customizable from org Glific instances + +_Reach out to the Glific team to flag any further customizations within this functionality_