Intro · 4:01
Introduction
A chatbot on your data.
- Build and deploy a RAG chatbot trained on your data.
- Taught by Ania Kubow.
- JavaScript stack.
| Tech | Role |
|---|---|
| Next.js | App |
| LangChain.js | Orchestration |
| Vercel | Deploy |
Do this in your own tools, step by step. Ticks are saved on this device.
Teacher?
Ania Kubow.
Language?
JavaScript.
0:00 You'll also use DataStax, who provided a grant to make this course possible. If you're a beginner looking to get your head around AI concepts such as rag balls, vector embeddings, and technologies such as LangChain, this is the perfect course for you. My name is Anya Kubow, and I'm a software developer, as well as course creator here on freeCodeCamp, as well as on my own channel. And today, I'm going to be your guide into the world of generative AI for JavaScript developers.
0:21 By the end of this video, you won't just have a fundamental knowledge of the basics of AI development in JavaScript. You'll also have your own Formula 1 chatbot that can answer questions about the famous car sport that will give you the most up-to-date answers. You see, ChatGPT has a knowledge cut off date of September 2021. That's when OpenAI stopped collecting training data for ChatGPT, so it is all the context that it has. We're going to scrape the internet in order to give our bot this up-to-date knowledge about Formula 1.
1:07 That's right. We're going to scrape the internet in order to get our chatbot to answer questions based on internet data as recent as minutes ago. We're going to do this with F1 data, but you could do it with any data that you can get your hands on, including your own private data that isn't available on the internet. This super slick chatbot will allow you to pick from some pre-made questions or add your own ones. So, you can either click on one of these options or type how much did Lewis Hamilton make in 2023 right here.
1:30 Now, the best part about this chatbot, as we touched on, is that it uses your data and embellishes the answer using OpenAI to make the response sound more human or add on top of your data. What this means is that we will be getting our own data by scraping it from the internet, turning the text into vector embeddings, and storing those embeddings in our own personal database. On top of this meaning that we will get the most up-to-date responses, it also means that we won't be spending unnecessary opening our credits to ask our chatbots anything, resulting in us using it at minimal costs.
2:15 But, how can we be sure that this isn't just making a call to OpenAI, you ask? After all, we are still making a call to OpenAI as the last step to make the answer sound more human-like, right? Well, I will be adding questions that OpenAI will not know. By this, I mean questions that would need knowledge past September 2021, and seeing if the chatbot can answer them. So, for example, if I ask the F1 GPT RAG bot, "Who is the highest-paid F1 driver?" it will answer with Max Verstappen is the highest-paid driver, taking in a salary of 55 million dollars in 2024.
2:39 And if I was to ask the same question, but disabling the access to our scraped data, and just relying on ChatGPT, we would get the answer of Lewis Hamilton with 30 million US dollars in 2021. So, as you can see, it will truly be using our data. This means that once you master this chatbot, you can use it to answer questions about just about anything. Be it terms and conditions or FAQ from your own personal website, to simply what your schedule is looking like.
3:02 So, pretty cool, right? A lot of real-life use cases to incorporate a chatbot like this onto your own projects, and a lot of cool topics to learn on the way. In fact, here's a list of all the topics we'll be covering in this course. We will look at what is RAG. We will also look at our prerequisites for this course, including stuff like API keys. We will then look at vector embeddings and how they work, followed by a look at DataStax a database management system, as well as OpenAI, and finally end with building our F1 rag chatbot.
3:47 So, what are we waiting for? Let's do it. What is rag? Retrieval augmented generation, or rag, is when you change the output of a large language model, or LLM, by providing the model more context alongside a user's
Get the other 5 chapters, the exam and your certificate for LinkedIn, plus all 700+ AI courses.