let's see what you will get by the end of this video we will build together this chat assistant bot an AI agent to answer questions 247 and you can see it's on a WordPress website so I will show you how to set up WordPress locally in 1 minute to test and build this for free and how to add this chatbot without coding and how to implement the Q&A system the intelligence system behind this chatbot for example example if I tell this this AI agent I want a discount instead of answering dummy answers with AI this
chatbot is thinking and answering from my own database look at this and you can see it gives my link with Hass request discount and this answer is based on my fax database you can see here I have a Google sheet containing questions and answers and we have different questions with different answers and and the question doesn't need to match exactly this question here we are talking about AI intelligence system that can understand the meanings and the semantics of these questions so you can see here I talk about discounts this way do you provide discounts and
this is the answer so here I said I want a discount it's somehow a similar question the AI will understand that is related to this question here and grab the answer answer and use it to answer the user's question here you can ask anything so for example what is a power memberhip for example these are all questions based on my own website and you can see here it will tell the user what is power members on my website they have access to 4,000 PowerPoints the links and so on so it's like having your own support
chatbot 24/7 intelligent and can answer all the questionss related to your business this is super interesting and one of the most requested Services by website owners today and businesses so now it's the time to learn this skill in case you want to build for your own business or in case you want to sell as a freelancing service online so if you are ready let's get started okay so step number one is to build the back end that is powering our AI agent as you mentioned we are going to build it with no code tools and
one of the best platforms out there is relevance AI allows you to build AI agents without coding starting totally for free without any cards so today everything is free all you have to do is to focus follow up with us and more importantly try it yourself it's totally free and you can learn this in a couple of minutes right now today so go to relevance ai.com and sign up for a new account in my case I have already an account I will log in in after you log in you will find a templates section here
that has a lot of readymade templates AI agents and tools that we can UT and use directly you can filter by category Marketing sales operations whatever but now in our case we want to build something special we want to build a customer support AI agent and more importantly we want to integrate inside WordPress easily with this customized chatbot that I buil for you so to get started in the description below you'll find a link to clone the customer support agent template I did this to make things easy for you you can follow up directly without
starting from scratch so this is agents and you can see here learn with Hassan support agent let's clear everything delete delete and you can see here this is my agent it's a chatbot inside relevance AI for example if I ask now the chatbot here do you offer discounts whatever you will see now that one step performed in the background so the chatbot checked my knowledge my database of questions before answering it's now checking and perfect we got the answer from our database so this is the agent inside relevance and I will show you now how
to configure and set up this in a couple of seconds but what's really exciting today is how we connect this no code agent with our website as I mentioned so let's start with creating this agent understanding how to build these agents on relevance if we go to our agent back here and open this configure when you clone it you'll be able to configure this chatbot so you can give it a name like in my case is Le Hassan support agent you can give it a description so like this fact followup agent answers a question it
checks see if there is already answer and so on simple description then we have the core instructions this is important and I already added this template for you so here you explain the instructions and give an example of how the agent will work in my case the agent will receive a question it will retrieve the answers from my database you can see here using this tool it's called check knowledge for answer we will see now how to configure this tool also so if the agent doesn't know the answer it will ask me it will send
me a notification to my email to slack whatever you will see this live right now and I can update my question answer database live using this agent then the agent will carry on in the flow and simply applies with the answer again to sum up the workflow of this agent users will interact with it ask it questions if they find the answer in database they will answer if not they will escalate this question to me using email or slack or whatever Channel you want so you can update with the answer so the agent later on
can answer this question this new question anyway so let's see what do we have here also we have the flow Builder we didn't use it here we can build using this flow adding steps and so on then we have the tools section it's very important what tools does this agent use if you watch my building agents video here on my channel you know an agent is simply a language model an AI like chpt or whatever an AI model connected with tools so now this agent is connected or has the ability to use two tools one
is to check my database for answers and to update my database you can see here check knowledge for answer and add a new fact or a new question question answer to my knowledge so updating database and retrieving answers from database two tools attached to this agent then we have some other options that we didn't use in our case now I want to show you how to configure your database of question answers in the tool section here you will see this check knowledge for answer first I set here to auto run without approval so the agent
can directly use this database or this tool and and if we click on this button here this link we will open the tool itself so this is the check Knowledge from my database you can see we can answer we can ask questions here for example what is a power member run tool so you can build tools and attach to your agents giving your agent superpowers to use managing your business you can see here the question and this is the answer so you can test the tool before adding to your agent you can see also we
can access to the API you can run in bul if you want to test multiple questions anyway so this is the tool how to configure it go here to the left corner and click on build and you will see now how this Tool Work internally we have full access on the workflow of this tool so you can see we have a question you can see a question which is a string which is required by the way and then here we will pass the question to an llm to language model and this language model has a
prompt this one this prompt will also be given with the template so we can see you world class customer service blah blah blah and we have a question and we pass the question as a parameter and you get the answers from this fact table from this database this CSV of question answers hope you got the idea it's somehow simple so we have a question we give it to the language model the language model is connected with a database to answer questions from and this is what we call rag retrieval augmented generation in the world of
prompt engineering and language models if you are following up so rag simply is the technology we are using here we are connecting a language model with a database containing questions and answers so the language model can use this specific database to answer questions and it will not generate any dummy response if it doesn't find the answer in this specific database this is called rag R A so here you can select also the model you want to use we have open AI entropic Azure perplexity we have all these models integrated inside this tool within relevance which
is super powerful and this is the answer here so also you can test this here click on run tool and now it's running combining the prompt and your question answer databases it will generate The Final Answer perfect the question and the answer from my database now how to add a database of questions you can see here we have FAQs database this is my the name of my CSV file or my database go here to this icon database icon and you'll see we have this database I added this you can add knowledge click on this button
if you don't have one you can upload a CSV file you can connect from a website import and so on you need to add knowledge here from a CSV file and you'll have the knowledge attached so if you have it in a Google sheet just file and then download CSV file and import it inside the knowledge here and you just get the name of your knowledge DB and add it inside your prompt here and save that's it this is how we can build the agent to answer questions from our Q&A database using gance that's it
so let's close this so we have this tool that retrieves answers from our database now we have another tool which is adding fact to knowledge which is adding a new answer to our knowledge database we will see this in a little bit but before that let me show you how to connect this agent here that we build inside relevance this one here how we connect to our WordPress website step number one is you are going to install this application called local WP this allows you to install WordPress locally easily to test anything on WordPress so
just download install it's super simple you can see here I'm running it with a lot of instances and this is the rag chat bot that I'm testing right now so just click on plus here install a new website and you'll have WordPress up and running now if you want to test on your live website if you have one it's okay also if not you can test with this application and run WordPress locally so this is my local rack chatbot WordPress instance let's go to my dashboard here and the second step is to go here to
plug ins and add a new plugin and simply click search here for Snippets and install this plugin here code Snippets this one just install and activate it's super simple and you will have it here in the in the dashboard Snippets then you need to add two new Snippets click on adding you and you will call this chatbot UI which is the user interface of the chatbot and inside here select first HTML and paste this script here don't worry you'll find everything in description below just download them and paste here and click on activate perfect now
again let's add a new snippet the last one and I will call chatbot backend logic so this snippet here will connect with relevance AI using the API so again here select functions and paste the second snippet that's it just paste it and click on activate Perfecto so we configured our WordPress website with our chatbot to connect with relevance AI let me delete this from here to see this in action delete delete and now if we go again here to our website and now if you go here to Pages all pages just create a new sample
page to test the chatbot with I created this one here edit the page so you can see now we have two Snippets inside our plugin chatbot UI and the chatbot backend logic one last step is to go open this snippet again the UI and if you want the chat but to appear in all your website on all pages just make sure to display inside head if you want to insert with a short code you can use this option here I will now display in all my website display in the site head section and then save
changes and let's go here to pages and Open my my sample page so you can see now the chatbot is on my website if you go just let me show you this if we now disable this and refresh the agent will disappear you can see the chatbot will disappear enable it again and refresh the page and here we have the chatbot perfect and by the way if you click F12 you will see that this chat B is fully responsive if you open it on mobile it will take the full screen it's like any professional chatbot
now please look at this if I go back to elevance you will see here we don't have any chats you see let me go to my website again and I will ask the same question what is a power membership now if we go back to elevance you will see if you refresh you will see we have a new chat open a new thread so what we are doing here simply is we are interacting with relevance through the API so we have this chat bot connect connected to elevance and as a website owner you can monitor
and track all the chats and what's going on exactly so everything will be our shift inside relevance and this is very important so you can track the progress and performance and efficiency of your agent so you can see here is the answer and we got the answer here in the chatbot window perfect now how I connected this chatbot just in case you want to do this yourself from scratch if you go back here to agents and click here on on configure you will see here we have Integrations and we have here an API to build
your own triggers you connect with the web hook with zappier or with API click on API and you will see the end point that interacts with your chatbot now to make things easy for you I build everything you just need to copy and paste and generate your own API key here and copy it and go back to our Snippets and click on the chat bot backend logic and all you have to do is to configure these parameters here the project ID authentication token the agent ID and the region ID so how we get this the
token of the API key is clear now the project ID agent ID and region ID where do where do we find this let's back go back to 11 if you look at your url here you will see agents slash and this first parameter this is the region ID so you copy this and paste in the region ID here the next parameter here copy and simply paste in the project ID so the second parameter is the project ID and the third one is the agent ID so again region ID project ID agent ID somehow obvious region
project agent and API key copy them and paste in this snippet here and your chat bot will be to connect with your specific agent now we still have two important things to show you number one is how we can update this chatbot interface maybe you want to change something add features I will show you a little trick I use to change this if you don't know how to code I build this responsive it's simple clean modern you can use it directly but in case you want to change I will show you some tricks to do
this and number two how we can update our database of knowledge database database of questions and answers in our agent automatically and manually so let's start with updating manually so let's go back here to the configuration section and open tools again and you will see the check knowledge let's open the tool again build database and you can see here we have a link to open our database so the first time you import you'll find all the questions and Sensers here from the CSV file you imported if you want to add columns here you can add
if you want to import data you can import if you want to add manually you can click on add a row and simply add an answer the question and if you want to automate this process with the agent as we mentioned we can use this tool add a new fact to knowledge and if you open this tool here you can simply add a question and an answer let's say how can I support Hassan creating more videos like this for example and simply the answer will be smash the like button don't forget smash the like button
so let's say you want to add this question but before we do this let's go back here again to the build section and database and we need to make sure that we connected our knowledge database so add knowledge and simply select our database here we already have and that's it so now how we can support Hassan you can smash the like button let's run this tool run it waiting and now inserted this new record so if we go back here and ask this question to the chat bot let's add a new chat ask and awesome
you can see to support Hassan smash the like button you see but in case in case you didn't get answer directly you can go back to your database here and click on sync so you can sync all data again with your agent so it can answer all questions so this is how you can add knowledge manually or using the automated tool here but I want to show you practically now an example what happens if the agent doesn't have the answer so this is my main AI agent window again let's go to my website on new
chat and now I will ask it something weird like which is the best book in 2025 look what will happen here so we have this new look at this what happens at the back end is that the chatbot didn't find an answer you can see here we didn't find the answer escalated the task to me so here I can I can answer this question directly in relevance and reply to the agent to update the database for this question and what's really awesome that whenever this happens the agent can ping you can send you a notification
on slack on email and so on if you open now Slack here you will see that the agent relevance AI send me that this this question doesn't have an answer so I can reply inside relevance I have a link to open and reply to this question and update the question database automatically so how to do this again if you go back here you will see that this agent in the main page here we have Integrations if you go here to abilities you will find that escalate to humans you can add slack in my case I
add slack Channel my own channel or you can add an email for example let's add this email and save changes so now the task will be escalated to me to my email and to my slack Channel now it comes the fun part how we can update this chatbot and let me reveal a secret here I'm not perfect in developing user interfaces so I used AI to build this chatbot now what you can do simply is go here to Snippets again go here to the UI chatbot UI and copy this snippet as it is copy it
and what I use usually is Cloe from entropic this AI agent in my experience with the clo it helped me a lot with coding and developing tools and user interfaces so I have a good experience with it so what we can do here simply is tell clo that I built a u for my chatbot I will I will provide you with the code and I want to ask for some updates okay now Cloe will confirm this and it you'll tell Cloe what do you want for example let's say we want to add an avatar beside
the messages like AI Avatar and the user Avatar I want to add Avatar icons beside the messages here is my code enter and now Cloe will take your code and update based on your own needs and regenerate the new code for you let's see if it works for the first time and see the magic of AI in developing user interfaces now sometimes what happens it will generate the full code and it will skip some parts like this it will tell you the rest of the code is the same just copy it and paste it if
you don't want to mess up with this simply say please generate the full snippet again without skipping anything so I can copy and paste directly now let's wait a little bit for the new snippet then just make sure to copy and go here to your snippet crl a and replace with the full code save changes let's see what happens now refresh hope it works works and perfect we have the icon let's say how are you and we have the user Avatar too perfect so this is how we can update and add features to your user
interface in case you want to the Same by the way the same you can do with the second snippet in case you want to update or learn more about it now it's your turn to implement step by step what we did today and if you face any problem don't forget we have a free Community where you can submit your questions and chat together almost every day so join us and let's learn together now in case you want to move to the next level in building AI agents and understanding them from scratch go now and watch
this video on building AI agents with python totally from scratch don't forget all links tools codes in the description below if you learn something new today smash the like button and see you in the upcoming video iOS