Using Botpress To Build Custom Trained AI ChatBots (2023 Full Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys today I want to show you how to build a custom trained AI chatbot inside of Bot press let's do it okay so a few weeks ago I showed you guys the easiest way to build a custom trade AI chatbot by using a tool called custom GPT now while that is definitely the fastest way to get a custom trained bot live on your website there is a better alternative an alternative that gives us more utility and functionality for the custom trained AI chat bots on our website and that is a tool called bot press so in this video I want to do two things firstly I want to show you how we can build just a good run-of-the-mill standard chat bot inside of Bot press and then two I want to show you how we can take that standard chat bot and turn it into a custom trained AI chat bot that you can then Deploy on your websites all right so let's hop right into it alright so I am in bot press right now you need to go sign up for an account it's totally free and the first thing we want to do is we want to create a chat bot so I'm just going to create chatbot here let this bad boy load congratulations I've created my new chatbot I'll hit edit and that will launch our studio now I'll have a couple options here to kind of launch our chat bot with I'm going to start from template and then just kind of start with this basic empty chat bot here just all the way down to the bones and launch it like that all right cool so we're in our workspace now and you can see that we have a starting node and an ending node basically every other node every other piece of logic we add to our chatbot is going to happen between the start and the ending node obviously no duh alright so for the sake of this video we're going to be pretending to be a travel agency and we are building a custom trained AI chatbot that can serve as a personalized travel agent to the visitors of our website that can basically recommend to them different places around the world to travel to and then answer any questions they have about those locations by pulling from its custom knowledge base so that's what we're building today all right so in my head there are really three important sub elements inside of press that we need to understand in order to get started building out our chat Bots the first is called a node the second is called a card and the third is called an expression okay so let's start off with notes to add a node I'm just going to right click and add a standard node right here okay so these are basically the building blocks of our chat bot all right so I'm gonna give this a name this is going to be my introduction node just like that all right and I'm going to link my start to my introduction node by adding a little line just like that so this is the first node that our user will see when they are interacting with our custom chatbot now in order to give this node any meat any content we need to add something called a card our second most important element so from Insider node we're going to add a card and you can see here all the cards that we can add so we can either you know send messages in different formats to our user or we can collect different information from a user from down here all right so I'm just going to start off with a little text card here and I'm going to send a message to our user that says something like hey Welcome to our travel agency I am your personalized travel agent today something like that so that'll be the first message that our user sees when they interact with our chatbot now the next thing I want to do is for the sake of this video I want to capture some information from my visitor so I want to ask my visitor how big of a group are you traveling with and then use that information to kind of Route them down different Paths of my chat flow let me show you what I'm talking about all right so I want to ask my user the size of the group they're traveling with so in order to do that I'm going to grab a number card and drag it in right right under my text card and I'm going to ask another question so how big of a group are you traveling with all right make sure that I'm capturing a number I'm asking this question and then when I come down here I'm going to create a variable and I'm going to call it something like group size something like that I'm going to hit enter and so now what that allows us to do is from within our chat bot we can capture the group size or capture different pieces of information that our visitor inputs into the chatbot and we can store that information to either use later in the workflow or to create conditional logic in branches chatbot off into different paths that we can go down so let me show you what I'm talking about so we're capturing the group size from our visitor and then based on that group size we want to Route them to different locations around the world so if they have I don't know they're traveling with four people or less we can send them to Niagara Falls if they're traveling with five to ten we can send them I don't know to London and then if they're traveling with 10 or more people will send them to the great pyramids in Egypt okay something like that I'm making this up as I go but in order to do that we are going to have to add our third important element from inside a bob press something called an expression all right so I'm going to drag three Expressions into my very first introduction node all right now the reason I'm doing three is because I'm going to have three potential New Paths that my chat bot can take our visitor Down based on what their response is to this group size question so for example I can come into this first expression right here I can come over here and give it a condition now a lot of this is AI driven which is pretty awesome so look I can say something like um if group size is less than five and I hit enter and you can see that automatically bot press has given this expression some logic or condition so basically if that if that variable that I created group size is less than five well I can route this path to another node all right I'm gonna come to my second expression I'm going to do the same thing if group size is more than five but less than 10. hit enter all right and it gave me a little bit of logic there perfect for my second expression I'm going to do my third expression which is the same thing if group size is more than 10. perfect workflow.group size is more than 10. sweet so we have our node which houses our cards which give us in the form of Expressions logic that we can then use to build different paths for our chatbot so now that we have our conditional expressions in here I'm going to add another node and this one I'm going to call I don't know Niagara Falls I think that's how you spell it maybe not I don't know whatever and I'm going to basically map that first expression if the group size is less than five I'm going to map that to my Niagara Falls node I'm going to add a card tracking some text and say perfect your group size is and then I'm going to do at group size so it's going to pull in that that variable because we're storing their answer in that variable I'm now going to present that number back to them so they know I'm listening I'm going to add another text card here and it's going to say something like for a group that size we recommend going to Niagara Falls all right cool so now I'm going to create two more nodes here and one is going to be uh I don't know London and one is going to be uh the Great Pyramids and we're gonna do the exact same thing so we're going to connect if the group size is more than five but less than 10 we're going to send them to London and if it's more than 10 we're going to send them to the pyramids just like that okay and we're just going to add some text cards and do the exact same thing all right cool so we have our introductory node now which asks our visitor their group size we use that group size to then route our visitor down different Paths of our chat flow and then we are presenting our visitor with three different options based on their group size input now what do we want to do after this after this we want to send all of our users to a question node basically once we give them hey you're going to Niagara Falls I want to ask our user hey do you have any more questions for me all right so in order to do that I'm going to add another node I'm going to give it a name questions node and I'm going to add a card and I'm going to use something called a single Choice Card so essentially I'm going to ask the user do you have any questions and with a single Choice field it essentially gives them a button or two buttons at the bottom of the question will say yes or no so I'll I'll add a choice yes and I'll add one more choice no and they'll have to click either yes or no and then based on what they click we can send them down different Paths of the chat flow now we need to go back and we need to connect our three nodes to this question node right here and in order to do that we need to go back to our nodes here and add an expression so I'll go to my card and drop an expression now remember our expression is essentially just the vehicle we use to get from one node to another either by conditional logic or Not by conditional logic so back here we use three Expressions to kind of divvy up and send our users down different paths here we don't want any conditional logic we just want our Expressions to always send from Niagara Falls every single time to the questions or every single time from our London node to our question node or from our pyramids node to our question node so in order to do that I don't want to give this any condition I just want to say always just always send once they're done with the Niagara Falls node go to the questions node and then I can connect just like this all right and I want to add an expression here as well same thing no condition just always send perfect a little node pops up and we can send it to our questions node and then the same thing for our pyramids we're going to add an expression card give it a condition of always and send it to our questions node and again that just means that every single time our user gets through these nodes they'll be sent to our questions node where they will be asked if they have any more questions okay so that is that let's go test our chat bot now make sure everything is working right so I'll come down here I'll type in hello and we can see hey Welcome to our travel agency I'm your personalized travel agent today how big of a group are you traveling with so you can see we just hit this first node right here I'm going to type in an answer I'm going to say uh just me and my friend so just two all right perfect your group size is two we're using our variable there so it's pulling that in for a group that size we recommend going to Niagara Falls perfect so our logic is working for lesson five we come here do I have any questions all right that that's working we'll do one more chat here just to make sure our conditional logic is working hello how big of a group are you traveling with I'll say seven we should be recommended London cool perfect your group size is seven for a group that size we recommend going to London perfect this is working all right so that is the high level bot press overview remember we're dealing with nodes with cards and with expressions and by using all three of those in harmony you can start to see how complex these chat Bots can get now in the second part of this video I want to show you how we can transform this standard chat bot into a custom trained AI chat bot by creating our own knowledge base that it can learn from and then pull from to answer the questions from our website visitors so let's do that right now all right so we're always going to ask our user this question right here which is do you have any questions if they don't have any questions we're done but if they do have a question I want to Branch them up here and then have our chatbot pull from a custom knowledge base to answer their questions so how can we do that well I'm going to add a standard node and I'm just going to call this I don't know AI knowledge base or something like that okay whatever I'm going to add in a card I'm going to do a single Choice Card I'm going to say what would you like to know and then I'm actually I'm going to change that single choice to Raw input so just text so the user can ask any question they want in a string I'm going to create a variable that just says I don't know question just in case we need that later we probably won't but you know it's just good habit now how can we turn this node into a custom trained AI node that can answer our users questions in order to do that I'm going to come over here and click this little button here called add knowledge base I'm going to give it a name travel knowledge base okay give it a description blah blah blah blah blah whatever all right and then I'm going to hit knowledge base source and you can do a bunch of different things here you can either upload text into this knowledge base you can upload a document with a bunch of information from your website or your company into this knowledge base or you can just do a web search and Link straight to your domain on your website and it can pull information from across your website to use as its knowledge base that's what I'm going to do today so I'm going to hit web search all right I'm going to search on specific websites and I found this travel blog here some guy named nomadic Matt and I want to pull all my travel information from his website and I want my chat bot to answer my users questions based on the information on nomadic Matt's website so I'm going to copy that and I'm just going to paste that in right here and just get back to the domain all right and that's that so my knowledge base is set up and so in order to turn this on I'm going to come right back here to my node and all I'm going to do is I'm going to click on it just click on the name right here and I'm going to hit enable knowledge answering all right you can see this little book pops up I don't know if you can see that this little book pops up and now we know that this is a knowledge based node so any question that my user asks will basically search this knowledge base and hope to find some information now if my knowledge base does not have the answer to their question I want to basically send them an error message like hey sorry I don't know the answer that question so in order to do that I'm going to add an expression and I want to give it a condition of exclamation point turn dot knowledgeagent dot responded all right so paste that in there so basically if the knowledge agent doesn't respond I'm going to send this to an error node right here that's going to say something like you know hey sorry I don't know the answer that question okay just like that but otherwise if the knowledge agent does respond I essentially just want to return my visitor back to the question node and say do you have any more questions so I'll add another expression here and this one will just be always or true and so anytime I answer their question I always send them back to the questions node right there to ask them again hey do you have any more questions does that make sense I hope it does I also want to add an expression here to my error node that does the same thing so they get this message sorry I don't know the answer that question and then I just bring them always back to do you have any more questions so I'll bring them right back to this question note right here so same thing so from a high level let me zoom out here and show you guys what this looks like now essentially what we'll do is we'll ask them their group size based on their group size we'll route them to different recommendations then we will always send them to this node which will ask them do you have any questions if they say no then the chat is done if they say yes then we bring them to our knowledge base our AI knowledge base where they can ask any question they want and we will search nomadic Matt's Blog for an answer if we have an answer we will then display that answer and then ask them again hey do you have any other questions if they say yes then we just complete the loop and keep going if they say no the chat ends if our knowledge base can't respond if it can't find an answer on nomadic Matt's website we will say oh sorry I don't know that answer and then we will ask them do you have any more questions and that is that so let's test this whole thing out now and make sure AI knowledge base is working and then I think we'll be good to go to get out of here for the day all right so I'll just say hello and it says Hey Welcome to our travel agency I'm your personalized travel agent today how big of a group are you traveling with I'll say 12. all right perfect your group size is 12 for a group that size we recommend going to the pyramids all right do you have any questions if I hit no well the chat is over but I do have questions so I'm gonna hit yes what would you like to know well uh what is there to do in Egypt you'll hit enter it's now searching the knowledge base it's searching nomadic Matt's website and cool we've got some answers here so there are a few helpful tricks to save money in Egypt Memphis tours uh historical sites snorkeling camel writing charm L Chic I don't know how you say that all right cool do we do I have any more questions I do awesome so it brings me right back here what would I like to know uh are aliens real sorry I don't know the answer to that all right cool so that's working I get routed back right here do you have any more questions I'm gonna hit no and that is the end of our conversation so that is how you can build a custom trained AI chat bot from inside of Bot press in a much more complex and functional way than we could in my last video by using custom GPT I hope you guys like this video I hope you guys got a lot of value out of this video if you did go down in the comments and let me know if you like this video smash that like button for me I'd really appreciate it if you want to see more videos like this in the future consider subscribing that would be awesome and I'll see you all on next week's video peace
Info
Channel: Surviving Your 20's
Views: 66,859
Rating: undefined out of 5
Keywords:
Id: tH3oBYzArfw
Channel Id: undefined
Length: 18min 50sec (1130 seconds)
Published: Mon Jul 17 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.