How To Create LLM Chatbot Demo 2026 | Build a LLM Chatbot From Scratch | Simplilearn
Key Takeaways
This tutorial teaches how to create a LLM chatbot from scratch using generative AI techniques and tools
Full Transcript
Hey everyone, welcome to the SimplyLearns YouTube channel. In this tutorial, we'll learn how to build an LLM chatbot. Before that, let's take a look at what exactly they are. LLM chatbots are powered by large language models like GPD Gemini and these are intelligent virtual agents capable of understanding and generating humanlike responses. These AIdriven assistants can streamline a wide range of tasks like answering questions, summarizing data, generating content, automating workflows, and even writing code. These make them indispensable in today's digital landscape. Building your own LLM chatbot can boost your productivity and innovation. In this hands-on tutorial, we'll guide you step by step through the entire process. That said, if these are the type of videos you'd like to watch, then hit that like and subscribe buttons and the bell icon to get notified. Also for your information, if you want to upskill yourself, master generative AI and artificial intelligence skills and land your dream job or grow in your career, then you must explore simply learn code of various generative AI courses and certifications. Simply learn offers various certification programs in collaboration with some of the world's leading universities. Through our courses, you will gain knowledge and work ready expertise in skills like advanced Python, machine learning, generative AI, and over a dozen others. That's not all. We also get the chance to work on multiple projects and learn from industry experts working in top tier data and product companies and also academicans from top universities. After completing these courses, thousands of learners have transition into an AI and machine learning role as a fresher or moved onto a higher paying job and profile. If you are passionate about making your career in this field, then make sure to check out the link in the pin comment and description box below to find a generative AI program that fits your experience and areas of interest. Now, without further delay, let's go through the agenda for today's session. We will get started by a brief introduction to LLMs and chatbots. Later we will dive into setting up the development environment. Then we will understand data collection and preparation. Followed by that we will understand the implementation of LLMs. Later we will check into chunking and embedding for vector search or rag. Followed by that we will learn implementing query processing and recommendations. Next we have zeroshot text classification. And lastly the sentiment analysis with LLMs. Hope I made myself clear with the agenda. Now handing over the session to our experts. Hi, welcome all. Welcome to simply learn session on how to create LLM chatbot. In this course, we are going to talk about what is LLM, what are chatbots. We'll try to see how do we start developing a chatbot using large language models where we'll try to understand how do we set up the environment. Then we talk about how do we collect and prepare the data for LLMs to understand. Then how do we implement LLMs chunk and embedding vectors that is required for retrieval augmentation. So that is an embeddings of the data chunks. I will talk about those things. We'll further talk about how do we implement query processing and recommendation systems. We'll give an understanding on prompt engineering of zeros short text classification which is the type of prompt engineering and we talk about finally with the sentiment analysis with LMS. So we can create multiple types of LLMs and we can create sentiment analysis LM. At the end of the session, we'll try to develop or go through with a piece of code using lang chain to create a chat model using open AI APIs and we will work on that and try to put that into production environment using streamllet. That would be the agenda for the day. So how do we create LLM chatbots and we'll start with what is an LLM? LLMs are nothing but large language models which are trained on very huge amount of text and they have the capability of generating humanlike test. So they are slightly enhanced version of the natural language processing tools that we have seen before in the deep neural network architectures wherein those architectures using LSTM models or GRU models or similar models with respect to or the RNN models. These models were able to understand the text and give an understanding of those text that what exactly is the inherent meaning about those text messages. However, the large language models are a step ahead of the previous versions and they are able to gener not only understand the text but they are able to generate the text based upon the information given to them. So that is what we call as a large language models. These are primarily trained on a very huge amount of data. They do not have any kind of predefined resources. They they trained on a very humongous amount of data. Now how they work? If I talk about how LLM works, LLM typically takes up the huge amount of text and breaks it down into the pieces we call them as the tokens. Now what is the tokens? as a very small level a very basic level I can say that tokens are nothing but the words at a very broader perspective you can understand tokens as words so words in any context in any paragraph let's say you have 10 words or 20 words or 1,000 each word can be considered as one token at times we can also consider a entire sentence as a word as a token so that is dependent upon which kind of modeling technique being used. We are using sentence tokens or we are using word tokens. But yes, at a very basic level, at a very grassroot level, you can think of tokens as simple words which are leotized or stem. So stemmed or words stemming and lematization are the basic concepts which are coming from the natural language processing part where we try to cut down the words to a basic root level grassroot level words. So that is the idea behind stem so that we get similar words for every problem. Just for an example you can think of a simple example if I write down few words for you. I can write down a word break. So we were talking about how LLM works. So in general terms, if we talk about how LLM works, LLM will be trying to process my entire text data and create tokens out of it. So out of those tokens, the tokens can be considered as single words or sentences at times depending upon the mechanism that is being used. But you can at a very broader level we can consider tokens as the piece of words which are at a root level words. For example, breaking will become break or into will remain into or breaks will also become break. So depending which are the root words which generates other words. We'll try to contextualize all words into a single entity which are of similar nature. The word transformer might become a transform. Architectures might become just an architect. So depending upon different kind of words, you might have some basic root words that will come to the picture. That is what we call as a tokenization, stemming and natural language processing. So that's what we try to do. After tokenization, we get smaller words as I've mentioned you words or sub words and we try to convert them into a vector representation and we call them as numerical representation of those words. Let's say every single word in my entire word dictionary I will give them a particular number. Let's say a is at number one, B is at two, lamb is at three, so on and so forth. So each particular word out of my entire contextual words will have a number associated with them. I'm giving a random example and with that we can assume that those numbers I can represent in different form maybe in hex code form or in in a binary coded form or some other form I can represent them and we can use that numerical representation of each word in order to understand those words in numerical form because it would be the numerical representation of the data that will help in making things clearer and understandable right after this LLMs once we got the relevant tokens then we it uses the attention mechanism now what is an attention mechanism there's a famous research paper on this which is attention is all you need published in 2017 from Google brain team that paper talks about a self attention mechanism which is the primary source of all transformer models LLMs also use transformer modeling approach. So that is where it contains of a self attention layer and mask multi attention layers. So that's the basic underlying principle behind all the LMS. So we have an encoder block and we have a decoder block and we work on those two blocks together in order to understand what is the input being given and what could be the potential text that could be generated for the given input. That is what attention mechanism allows us to do. We can discuss the cell pot rotation mechanism in detail in another separate video. That's what transformer talks about. So these are very different deep learning architectures which actually does not use a neuron kind of thing. If you have studied about deep learning architectures, you would have seen that every deep learning architecture at the hidden level has certain neurons at the center which takes the input and processes it and gives the output. In LMS we use a self attention mechanism module where we replace those neurons by self attention blocks. The self protection blocks has two important portions. One is an encoder, other one is a decoder. And again certain LLMs may be just coder module. Certain LMS might be just a decoder module. Certain would be a combination of ports. All the generative ones are the models that are combination of both encoding and decoding part. Yeah, if I talk about types of chat bots, the chat bots is another example of using large language model. What does chatbot do for us? We ask the question, we put up a prompt, we put up a query in front of a machine and then machine is able to respond back based on the query being put up. There can be two classification of the chat post based upon these two versions. The first is a rule-based chatbot and second one is AI based chatbot. What are the rulebased chatbots? So rulebased chatbots are those where they have a defined set of rules and pre-written scripts for a particular question. Let's say how are you? If I have mentioned already or defined if someone asks you how are you it'll give me a particular answer. If that question is not into the vocabulary it will say that sorry I'm not able to answer that question. I'm not trained under that part. So those are called as rulebased chatbot or rule based LLMs. Typically these kind of rule-based LLMs use decision algorithms or random forest autobased algorithms in order to understand and create rules and then give the answers. Typically that's the underlying logic world that goes behind the rule-based chat bots. Typically not into practice too much these days. We have AI powered chat bots which are much more responsive and much more better. So we'll use in this class as well we will work on AI based chatbot the rule based chat bots which are very simple to implement and very easy to put up through they will not be able to handle very complex wordings because you will not be able to give sufficient amount of examples right then you have AI based chat bots you can put up any kind of queries I'm pretty much sure most of us would have used AI based chat bots like chat GPT or entropic right or Gemini you would have used some of you might have used those some common names that I've taken out so all these are AI based chat bots right depending upon my requirement what requirement that we have what kind of chatbot should I use is very much important because I need to look at many factors like how much customization is required what is the cost involved how do We are I'm on a deployment. What is my deployment requirements? How much opensource do I want it make make it to be open source availability for this? Last and most most important factor is how much is a private data that means a data which is not available publicly for open AI models or opensource models to learn from. So do I want to include that data or not? That is also an important factor. If I have to include the data, the type of AI based chatbots will also vary because there will be two types of AI based chatbot. One that we use with the pre-trained models which will work in this class and the one the other one that uses pre-trained models along with that it also takes up a chunk of data or it can also get trained from some other data as well that is we call as rag approach retrieval augmented approach. All right. So this is what we have seen so far. Now setting up the development environment. In order to create development environment, we can choose many things. There are multiple APIs which are available. But in this particular section, we will use OpenAI API. It is easily and freely available. Right? So we require a coding environment. I'm going to use Jupyter Lab for it. Some libraries to name few of them. I'm going to use streamllet. We are going to use lang chain. What else? that would be more than sufficient. Numpy and mapplot lab would also be required. That's it. So these are the few libraries. Whether I want to do a cloud-based deployment or onremism deployment depends that dependency needs to be understand because cloud-based deployments would require a little more resources. We need to ensure about the correct API access. The API access that I'm going to use is my own personal OpenAI access. So you will I would mention OpenAI key at the place of the code where it is required to put up the OpenAI key. All right. Thank you. We'll require understanding of basic Python understanding. How do we write Python scripts? How do we integrate APIs with the Python scripts? Two important things. We'll use Jupyter notebook in this case and VS code or either you can use any technology because we are going to write down a py file. So whatever you're comfortable with Jupyter notebook, VS Code or just Python working environment, I'm okay with that Python editor. So API access can be requested from OpenAI coher or hugging face. I'm going to use OpenAI in this class. So I'll show you how to gain open AI access. You can go to platform.openai.com register yourself and you can generate your openai API key right so transformers I can use blank chain will which will require me to develop a chatbot logic and that's what we're going to do. We can use llama index for data retrieval or you can use fast API grio that can allow fast API and gradio will allow me to put the deployment part but we're not going to use that. You can use cloud-based services like AWS, Azure or cloud. We're not going to cover that too as well because that's not within this call. So data collection and preparation part. So we need to collect the data in the form of either CSV, JSON or web scrapping data. Go to numpy, pandas, create the data and refine the data. But in this particular section, we are not going to deal with NLT or spacy library. We are not going to train the model as of now. We're going to use pre-trained models from OpenAI API. So how do we create LLM chatbots? So that will be really practical parts. Then we'll try to understand how do we can create LLM chatbots. What we require is few understanding. If I'm going to train up a model for example, I'm going to train up an LLM model. We need a model architecture which can be implemented which can be downloaded from transfer learning methodologies. You can get all those models either from hugging face or directly from transformers library or directly from tensorflow or pytorch whichever way you're trying to implement. We can get them from there. Apart from that, what kind of model is required? That is also an important thing because if I'm doing a sentiment analysis, I'll require a sentiment analysis. If I'm looking for a question answering approach, I would require a question and answering approach. If I'm requiring general question answers, generic models, so I can use generic model like chart. So depending upon my requirement, I would have to choose the correct model and correct APIs accordingly. That is must first important task that we need to do. Right? That's we have talked about if I'm trying to use different LLMs are required different kind of things for general versatility GP is good open source customization lamas are good mistral for efficiency falcon for scalability so right model will depend on many factors like performance cost and deployment needs we can get right models whatever models that you want from hugging face or API based models API based models would include like I have open API access and on open API We have the chat GPTs 40 mini version which is available for access with me. So I'll use that. Now how to create an LM chatbot? For this we need to understand what is retrieval augumented generation. So what is that retrieval augmented generation? Suppose I'm trying to do a search for example I typed in a query what is the role of Python? Just a simple word what is the role of Python. In this scenario, it will try to find out out of my entire context that I have given, what is the role of Python. It will try to find out what are the most relevant words with respect to the question being asked, the meaning that it has and based upon that it creates a architecture of most important keywords and that keyword is called as R A or retrieval argumented generation. So after that it finds out what are the most important keywords and based upon that it performs the extensive search through the data that it has and finds out the correct responses matching keywords from different resources then from all different resources learn everything and then come back with my solution. So that is what it is going to do for us. What it allows us to do is the rag approach is my model or my LLM is not going to give me random vague answers. It's not only create or generate answers without any context. We'll always try to find out some semantic information and give good contextual answers. Same thing happens with the chunking and numbering in vector search. It it tries to break down the entire text into small little manageable pieces. We call them tokens again converted to numbers are called as vectors. Again it can be done through many other libraries like chunking and embedding can be done by lang chains character text splitter we can do through NLTK or we can do it from tick token. Tick token is not to be misunderstood with tick tock. It's a different entity algether. Token is a library that allows us to tokenize my text. Then we have transformers like transformers available which are allows me to create the vectors. Vectors means again numerical representation of my text. Then we store that in the database. Any simple database can work for us. Then we look for the similarity scores like cosine similarity, ukidian similarity scores or product similarity scores to find out what kind of matching architectures as I've told you rag uses this approach finds out similar context words. So from there it'll try to get me those similarity words and find out similar contextual information. Then we talk about the implementation of query processing and recommendation. In query processing the idea again change is nothing but but it you ask a question LLM works around with that again breaks it down into a text form from text it converts vectors and since it's a question so it becomes a question answer kind of approach. So it will find out 10 answers and try to filter out the best suitable answer for any query that is being done. Now what is zeros short text classification? In a zeros text classification, I do not train my model explicitly. Right? So what that is zero sort classification where I'm not putting up any additional resource. What is that meaning is I have a pre-trained model like GPT that is being trained on very generic knowledge. Very generic knowledge that may not be very specific about the context that I'm asking. Say for example I have chat GP which is trained on almost everything world but it might not be trained on my organization specific issues but I can still ask this question about my organization. It may not be able to give me a very specific answer but it will be able to give me a generic answer. That is what we call a zeros text classification where I'm not training a LLM on a specific data rather I'm just creating an LLM from a pre-trained model and asking it for new data installation right how can you find out some classification models there are lots and lots of available I can just show you very quickly pre-trend classification model you can go on to huggingface.co co that would be a place you can find a lot of pre and classification models available. You can find out models based upon your requirement. You can go to the models and you can click for the task whatever task that you let's say I'm trying to do some text natural language processing let's say zero sort classification I have lot many models here but just for zero sort classification these are the models available I have bought large M& life from Facebook that's one of the zeros classification model you can look at that go to files versions there's the entire model you can see that you can read out this reading.md file and find out the information about it. So there are a lot of models which are available which you can use again it's a GitHub so you can clone this live entire part and you can clone it from directly from hug phase clone the repository and use it locally. Okay. But any model can be used. So B, large, minium, MNLI, that's one classification model that can be used out. There can be a lot of things that can be done in zero sort classification. Apart from that, you can create transform of pipelines wherein I am trying to do one transformation followed by another one followed by another one and so on. So that can be created up. We can use a scitland matrix like procedure and recall or f1 scores to find out we have correct classification. We can implement those two. Finally, we'll talk about the sentiment analysis with LLMs. LMS can also be very much useful in doing the sentiment analysis part. So in sentiment analysis we try to look at how we can determine the emotional tone of any text uh allowing or enabling chat bots to understand the user sentiment. So we try to train the chat bots on uh emotional cont on a on data which contains emotional aspects. We can define it whether it's a positive or emotion or a negative emotion or sad emotion or happy emotion. We can train the elements of that. And based upon that training my alms would be able to tell me whether any particular emotions being reflected is what kind of emotion it is. It may not be able to mimic that emotion but it will be able to tell me what emotion has been reflected in the context. It can be with the audio, it can be with the video or it can text as well. That is the sentiment analysis. Again dist is one of the very good classification model for sentiment analysis. That is what we can use. Sentiment analyzer is available with many other sentiment analyzer is available with distbut, robbert, llama, everywhere we have a sentiment analyzer available. It's a one of the class in a pre-trend model which is available to analyze the sentiments. So this is what we will talk about through the entire understanding of your LLMs theoretically. Let's try to practically look at how do we implement that. So I will open up Let me open up my Anaconda Navigator. So, I'm going to open up Anaconda Navigator. Here I have a pre-written script. I'll walk you through that and I'll explain you each line what it is doing. Hopefully, that helps. So, here it is. I have just got my Anaconda Navigator opened up. I'm going to open up my Jupyter Lab environment from here. Wait for that to open up. should be up and running in a moment from now. So once that opens up, we will be able to start doing the coding part of creating a chart GPT kind of approach where that would be in the implementation of chart GPT through chart GPT op API that we can use at our own local servers or at our own particular end. Essentially that is what replica of chat GPT that you can put up. Okay, I already have this piece of code written down for you. So what are we going to do here? So I'll put down certain piece of quotes here. This file will be made available in the description too or you can copy it from here. Okay. So what is each of these things that we're going to do? So I have named that as I have created a Python script here. For that I've gone to file new and I've used a python file. I went into that option and I create a python file. First thing I wrote down is import stream and st. So this will allow I'll put up certain libraries to be done libraries import prior to that you might be wondering if I don't have those libraries. So you need to install these. I'm putting that as a comment pip install. Uh or if you're using an environment, you need to put that into your environment. So I'll put up that pip install. You need to put up lang chain. I'm using lchain here space. You would require streamlet openi. What else? That should be good. These two will be good. Okay. You need to install these two libraries lchain and streamllet. What I'm using streamllet for lang chain I'm just putting this notes and chain supports or lang chain for the purpose of building chatbot logic okay and streamllet for designing UI. So I'm not going to give too much into designing part. We'll take a simple UI as of now. Idea is not to do the designated designing part. Designing the user interface. Okay. So a web page user interface I'll say that designing a web based user interface. A separate session on streaml can be taken up to design all that part. So streamllet is separate library all together. So we will import streamlate as ST that allows me to import streamllet from langchain chat modules. Now this submodule allows me to open or connect or call up the keys or open API keys from the open AI servers. Okay. So that is a class that is available chat openai that will allow me to create or contain my open AI tools. Then another thing that I need to put up lang chain chains no conversation chain. Now what does that do? It allows me to create a chain of conversations. That means suppose if I ask one question there's an answer given then I can ask a probing question further. So that allows me to remember the previous past as well in context to the current conversation. It allows me to create a conversation chain rather than one question one answer and stops. And so that allows me to repeat things on a simultaneous basis. Langchain memory that allows me to remember the buffer memory. It allows me to remember my previous conversation. Suppose I have started with one conversation and then I want to continue with another conversation. My previous conversation can be saved and used. It can be reloaded. OS I'm using for very generic purpose to create environment variables. If you want to create envir environment variables otherwise it's your choice if you can avoid OS as well if you're not using environment variables. So first thing is to set up your open API API key securely for that I'm creating a variable open AI API key and I'm putting that into my streamlet secrets. Now where are these relet secrets, right? So these are typically stored in a toml file. I'll just show that. So that will be in your default folder where your naconda is installed. You will have a dot stream folder. You need to go into that and install will be in default user account. Inside that you will find a under swim folder you can find there is a file by the name secrets dol. If it is there you can put it up. If it is not there you need to create a new text document like this. Inside this I just open it up. You need to write down anything. I have used the word open AI API key is equal to and you need to mention within quotes your API key whatever you're using it up here and save this document save as and you go to this place select all files and save this document as secret so that allows you to take your key into or transmit it into your network or transmit it to your model with encryption. So that can be saved up. So you can just need to save that file. I have already done that secrets.l. This file contains my API key, right? I already have that file here. So that allows me to tell it streaml go to the secrets and find open API key if it is available in open secrets. If it is available in there else you can get it from the environment variable or else otherwise you can create up here OS environment those who do not want to use that you can put up OS.in in we're on and create up the same variable by the name open. This is an optional thing. So open API key and you can mention is equal to ports your API key whatever you want to use your open AI API key that should work so I'll put a comment this is an option thing right we'll get this this thing works I have put this again a statement. This is for the purpose of else os get environment open API key. So if we do not have a key available in secrets it will try to fetch it from the environment. All right. Now we need to initialize our llm model. How do we initialize my lm model? My llm is equal to chat openai. That's the name of the function that will connect me to openi servers. Open aai. Aapi key is equal to openai. Aapi key. I have kept my API key. If you do not have anything else available, just write down your open AI key directly here. You don't have to create anything at all. Right? You can paste it up directly here as well. That will expose your open key and you may not want to expose that securely. Then the temperature, it's the amount of randomness that we want. Now, what does that mean? It means how much randomly generic answers I want to create. the temperature part higher the number more is the randomness I'm trying to bring into my answers the bigger the temperature value is the better your answers would be okay lastly the model name based upon your access to open API you would be able to access either some of the models I am able to access GPD4 or many model I mentioned that model if you're able to access GPT4 you can just mention GPD4 or whichever model you have an access or 3.5 turbo depending upon your access you can use that particular model. After we have initialized the LLM part, we will move on to the next part where I'll set up the memory part. Now, what is that memory part in this on my streamllet platform? I just wanted to make sure if there is any previous memory available, it should be able to bring that memory for me. If it is not available, I'll start my conversation from a new piece. So I created a variable memory if memory not in session state right dot session state session state is a variable that creates my value and I'm looking for memory but if there would be any memory this flag will be true whether it will be false so if memory not in session state if it is not present I want to create a memory s that I can assign a memory value to it using conversation buffer memory so whatever memory memory that we have. I'll start with that memory. So that will blank at the moment. Then I'll start my conversation. Now this function conversation chain, it actually allows me to create the chain of conversation. The model that I'm going to use is LLA model. The memory is the current memory state that is blank currently blank. So as soon as we keep on moving the memory states gets on updated verbos will try to make sure that if there is any kind of warnings or something in between these are not being displayed that the verbose false that ensures that part. So we do not see any warnings or anything apart from that now we need to design the interface that's the model l model part we will design our interface stet page config. So whatever the web browser page that I'm going to design I want to put the title as llm chatbot page icon if you want to put something let's say put up anything you can put up a gif image or whatsoever you want if I can have name you can leave it I'm writing down one simply I do not have that small images right now so you can put a page icon like this then title now this title will appear up in center of your page right on the first page on your screen the lang chain chatbot by simply learn okay so that will appear up in there now we will now use the same place that will create my interface that means I'll get a web page whose title will be lm chatbot page icon will look like simply l name written on that title would be lang chain chatbot by simply that will appear up somewhere in the center of my screen then I'll put up a blank box to receive user input. So user input is equal to the name of the function is st text input. ST is my streaml library. In text input I'm asking this part to display asking you to it to display the word u followed by key is equal to input. So it will display up a box and the key input will be displayed up within the box. So you get to know that here I have to put in the input value. Then if I get a user input, my response is conversation which is my conversation chain model that we have created here. Conversation.prodict the user input. So based upon the input that I give it will create up a response. Once it gets the response I will add to the memory to the chat memory. So session state memory dot chat memory dot add user message predefined function. So I'll put up user input and add AI message as response. I have added two functions there and then I'm writing up the response. So I'm putting up now on my screen st.right is going to put my response. So I'm writing down a formatted string with a markdown language of bot that will appear in bold and the response. So whatever the response from llm model that is came up that will be printed up here. At the last I'm putting up this is an optional thing completely optional wherein I'm trying to tell you if you want to see the previous histories you can put that up by doing this how so there is a checkbox I'm creating if st checkbox show chat history that will be displayed in front of it there will be checkbox so if I select it this becomes true if I do not select it that remains false for message in SD state memory chat memory messages I will try to See I have added user messages and AI messages. So that is available in my session state memory chat memory right. So I'll go to session state memory chat memory and I want to recollect all messages. So I'll retrieve all messages from there and I'll put up what the role this particular U if message type is human else bot and I'll put down the entire content. So that's what will be printed out on my screen. That completes your entire LLM creation part. Let's try to work around this. Now, for this, you need to save this file as chatbot py. Once you have done this, open up your terminal. I'll open up a terminal. That is nothing but my Windows terminal, PowerShell terminal. And I'll run this command by putting up streamllet space run space name of my Python script. So it's chatbot py that is my python script. When I execute this I press enter key on my keyboard and say that you can now see your streamllet app. I'll just show you this. You can now view your streamllet app. It's starting up the app on the back end but I'll just show you here on your browser. So that has already opened up a app on my browser. I'll show you that. But it says that local URL HTTP localhost 8505 and my network URL is this. So it has gotten an IP address URL as well. I can use either one of those. But if I go to my web browser and see it says that my window title of I show you. You see that LLM chatbot here that's my title on the top put up. I don't I had an emoji to come up but that did not give up. plus but you can see here lang chain chatbot by simply lang that's what I put up here that's the name and it has a context box of you and I have a box to write down I have a show chat history option let's try to search how or what is or let's say today's news I when champions league 2025. Now that's a very generic question. I'm pressing enter to apply. If everything is good, my API is running. I would get an answer. It says I cannot predict the future. So I don't know who will win the Champions League 2025. The tournament is filled with so many talented teams and anything can happen in football. So you can ask me any can ask put up any questions if you don't like can put up a new question here. Tell me the names depending upon how much availability of all participating. So depending upon your prompt you can read up. So it tells me does not know that in the top teams from various leagues including Premier League, La Liga, Sira, Bundesliga and League One along with some lesserknown leagues compete for a spot. So we can see there some team names that can be there. Essentially you can also see below. So show chat history. If I put that on you can look at all the things that has been done in this particular you can see my chat history is available. So that can be viewed. I removed that show chat history. The chart history will be part again depending upon the machine that you're using. It is running on my local server. So depending upon hardware it might be slow or fast. That is how you can do it. The next option that you can do is to deploy this. In order to deploy this you need to go on to deploy option. You have multiple choices available like you can go on stream with community cloud you can go on snowflake or you can deploy on your custom platforms. If I want to go on community cloud I can click on deploy. Now I need to access to my GitHub account. I need to put this code onto GitHub and then I can deploy that can be discussed in a separate session all together. So that would be it one and I would really like you to think of questions and answers. If you have something put them up into your comment section and we'll definitely respond back. Thank you very much. And with that we have reached to the end of the session on how to build LLM chatbots. We hope the session was useful. Should you have any queries or should you require any assistance with PPD data sets or any other resources used in this session then please feel free to let us know in the comment section below and our team of experts will be happy to assist you at the earliest. Until next time, thank you for watching and stay tuned for more from Simply Learn. Staying ahead in your career requires continuous learning and upskilling. Whether you're a student aiming to learn today's top skills or a working professional looking to advance your career, we've got you covered. Explore our impressive catalog of certification programs in cuttingedge domains, including data science, cloud computing, cyber security, AI, machine learning, or digital marketing. Designed in collaboration with leading universities and top corporations and delivered by industry experts. Choose any of our programs and set yourself on the path to career success. Click the link in the description to know more. Hi there. If you like this video, subscribe to the SimplyLearn YouTube channel and click here to watch similar videos. To nerd up and get certified, click here.
Original Description
🔥️🔥 Michigan - Applied Generative AI Specialization - https://www.simplilearn.com/applied-ai-course?utm_campaign=9ggNb_JDOYQ&utm_medium=DescriptionFirstFold&utm_source=Youtube
🔥Professional Certificate Program in Generative AI and Machine Learning - IITG (India Only) - https://www.simplilearn.com/applied-generative-ai-course?utm_campaign=9ggNb_JDOYQ&utm_medium=DescriptionFirstFold&utm_source=Youtube
🔥Advanced Executive Program In Applied Generative AI - https://www.simplilearn.com/applied-generative-ai-course?utm_campaign=9ggNb_JDOYQ&utm_medium=DescriptionFirstFold&utm_source=Youtube
In this tutorial on how to build LLM Chatbot by Simplilearn, you’ll learn how to build a powerful chatbot using Large Language Models (LLMs). We’ll start by understanding what LLMs are and how chatbots use them. Next, you'll set up your development environment and collect the right data to train or fine-tune your model. You'll learn how to prepare this data and use techniques like chunking and embeddings for efficient vector-based search (RAG). We’ll then implement smart query processing and recommendation logic. The tutorial also covers zero-shot text classification to handle unseen queries and sentiment analysis to make your chatbot more emotionally aware. By the end, you’ll have a working LLM chatbot that’s both intelligent and adaptive.
Following are the topics covered in this tutorial on How to an Build LLM Chatbot:
00:00:00 Introduction to How To Create LLM Chatbot Demo 2026
00:03:45 What are LLMs and Chatbots
00:14:09 Setting Up the Development Environment
00:16:26 Data Collection & Preparation
00:16:51 Understanding & Implementing LLMs
00:18:36 Chunking & Embeddings for Vector Search (RAG)
00:21:05 Implementing Query Processing & Recommendations
00:21:35 Zero-Shot Text Classification
00:24:21 Sentiment Analysis with LLMs
⏩ Check out More AI and ML Videos By Simplilearn: https://www.youtube.com/playlist?list=PLEiEAq2VkUULyr_ftxpHB6DumOq1Zz2hq
#GenerativeAI #llm #LLMCha
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Simplilearn · Simplilearn · 23 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
▶
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Ethical Hacking Full Course 2026 | Ethical Hacking Course for Beginners | Simplilearn
Simplilearn
AWS Full Course 2026 | AWS Cloud Computing Tutorial for Beginners | AWS Training | Simplilearn
Simplilearn
Data Structures And Algorithms Full Course | Data Structures and Algorithms Tutorial | Simplilearn
Simplilearn
SQL Full Course 2026 | SQL Tutorial for Beginners | SQL Beginner to Advanced Training | Simplilearn
Simplilearn
Microsoft Azure Full Course 2026 | Azure Tutorial for Beginners | Azure Training | Simplilearn
Simplilearn
Shopify Tutorial For Beginners 2026 | Shopify Course | shopify dropshipping | Simplilearn
Simplilearn
Six Sigma Full Course 2026 | Six Sigma Green Belt Training | Six Sigma Training | Simplilearn
Simplilearn
🔥Feeling Stuck? How Upskilling Can Boost Your Career! #shorts #simplilearn
Simplilearn
Growth Hacking In Marketing | Learn Growth Hacking Marketing Strategies | Simplilearn
Simplilearn
🔥Cracked 3 Job Offers with One AIML Course! | 20–30% Salary Hike #shorts #simplilearn
Simplilearn
Top 10 Must-Have Figma Plugins for UI/UX Designers in 2026 | Figma Plugins | Simplilearn
Simplilearn
Business Analytics Full Course 2026 | Business Analytics Tutorial For Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | Getting future-ready with course in Artificial Intelligence | Roopam’s story
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
Full Stack Developer Course 2026 | Full Stack Java Developer Tutorial for Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | How David Went From Seasoned Engineer to AI Innovator #GetCertifiedGetAhead
Simplilearn
Complete Social Media Marketing Strategy for 2026 | Social Media Marketing Strategy | Simplilearn
Simplilearn
🔥Top 4 Cybersecurity Certifications You Need! #simplilearn #shorts
Simplilearn
🔥Cloud Engineer Salary in India 2026 | City-Wise Breakdown #shorts #simplilearn
Simplilearn
Digital Marketing Full Course 2026 | Digital Marketing Tutorial For Beginners | Simplilearn
Simplilearn
Full Stack Java Developer Course | Full Stack Java Developer Tutorial for Beginners | Simplilearn
Simplilearn
Social Media Marketing Full Course | Social Media Marketing Tutorial For Beginners | Simplilearn
Simplilearn
How To Create LLM Chatbot Demo 2026 | Build a LLM Chatbot From Scratch | Simplilearn
Simplilearn
Digital Supply Chain Management Certification | Supply Chain Management Course | Simplilearn
Simplilearn
AI Agents Full Course 2026 | AI Agents Tutorial for Beginners | How to Build AI Agents | Simplilearn
Simplilearn
ITIL Full Course 2026 | ITIL 4 Foundation Course | ITIL Tutorial For Beginners | Simplilearn
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
ITIL Full Course 2026 | ITIL 4 Foundation Course | ITIL Tutorial For Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | Integrating AI & Music | Diego's Story
Simplilearn
Digital Marketing Full Course 2026 | Digital Marketing Tutorial For Beginners | Simplilearn
Simplilearn
SEO Full Course 2026 | SEO Tutorial for Beginners | SEO Training | SEO Explained | Simplilearn
Simplilearn
PMP Vs CAPM: Which Certification Should You Choose? | PMP Vs CAPM | Simplilearn
Simplilearn
Complete Data Analyst Roadmap 2026 | How To Become A Data Analayst In 2026 | Simplilearn
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
🔥5 Jobs That Are Most Likely Safe from Layoffs in Today’s Market #shorts #simplilearn
Simplilearn
🔥Git vs GitHub – What's the Difference?
Simplilearn
What Goes Behind Building the Likes of Uber and Netflix? | Product Management Tutorial | Simplilearn
Simplilearn
AI Agents Full Course 2026 | AI Agents Tutorial for Beginners | How to Build AI Agents | Simplilearn
Simplilearn
Full Stack Developer Course 2026 | Full Stack Java Developer Tutorial for Beginners | Simplilearn
Simplilearn
Product Life Cycle 2025 | Stages Of Product Life Cycle | Product Life Cycle Tutorial | Simplilearn
Simplilearn
Project Management Full Course 2026 | Project Management Tutorial | PMP Course | Simplilearn
Simplilearn
PCB Design Course 2025 | PCB Designing Explained | How To Make PCBs | Simplilearn
Simplilearn
Python Full Course 2026 | Python Data Analytics Tutorial For Beginners | Simplilearn
Simplilearn
🔥Top Product Management Skills You Need to Succeed in 2026 #shorts #simplilearn
Simplilearn
SQL For Data Analytics 2026 | Essential SQL Commands | SQL Tutorial For Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | Paving Way To Success With AI & ML Course | Soumik’s Upskilling Journey
Simplilearn
Six Sigma Full Course 2026 | Six Sigma Green Belt Training | Six Sigma Training | Simplilearn
Simplilearn
Learn Snowflake In 45 Mins | Snowflake Tutorial | What Is Snowflake | Snowflake Explained
Simplilearn
🔥ML Career Tip – How to Start Learning Machine Learning in 60 Seconds! #shorts#simplilearn
Simplilearn
🔥Agile vs Waterfall in 60 Seconds #shorts #simplilearn
Simplilearn
Excel Full Course 2026 | Excel Tutorial For Beginners | Microsoft Excel Course | Simplilearn
Simplilearn
What Are AI Agents? | Types Of AI Agents | AI Agents Explained | AI Agents Tutorial | Simplilearn
Simplilearn
How To Create a Product Roadmap In 2026 | Product Roadmap | What Is Product Roadmap | Simplilearn
Simplilearn
SQL Full Course 2026 | SQL Tutorial for Beginners | SQL Beginner to Advanced Training | Simplilearn
Simplilearn
🔥What Is Phishing? #shorts #simplilearn
Simplilearn
Cloud Computing Full Course 2026 | Cloud Computing Tutorial | Cloud Computing Course | Simplilearn
Simplilearn
Simplilearn Reviews | Overcoming Rejection & career plateau to finding a New Job : Bhaskar Banerji
Simplilearn
Six Sigma Full Course 2026 | Six Sigma Green Belt Training | Six Sigma Training | Simplilearn
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
VLSI Design Course 2026 | VLSI Tutorial For Beginners | VLSI Physical Design | Simplilearn
Simplilearn
Related Reads
📰
📰
📰
📰
RAG in Laravel: Embeddings and pgvector for a Knowledge-Base Bot
Dev.to AI
The AI That Can Re-Write Its Own Brain: Why Inkling is the New Frontier for Open Weights
Hackernoon
A Beginner's Guide to the Seedream-5-pro Model by Bytedance: What You Need to Know
Hackernoon
Kimi K3, and what we can still learn from the pelican benchmark
Simon Willison's Blog
Chapters (9)
Introduction to How To Create LLM Chatbot Demo 2026
3:45
What are LLMs and Chatbots
14:09
Setting Up the Development Environment
16:26
Data Collection & Preparation
16:51
Understanding & Implementing LLMs
18:36
Chunking & Embeddings for Vector Search (RAG)
21:05
Implementing Query Processing & Recommendations
21:35
Zero-Shot Text Classification
24:21
Sentiment Analysis with LLMs
🎓
Tutor Explanation
DeepCamp AI