---
title: "Your Favorite YouTuber as a Chatbot?  LangChain RAG tutorial"
source_url: https://youtu.be/v5LSD4E-Oi8
captured_at: 2025-08-20
author: "Show Me The Data"
contributor: "ป้าเกษตร"
platform: youtube
---
# Your Favorite YouTuber as a Chatbot?  LangChain RAG tutorial

youtube video by **Show Me The Data**, 35m46s, uploaded 2024-03-27. URL: https://youtu.be/v5LSD4E-Oi8

## Shared in LINE Note+
- 2025-08-20 01:15 by ป้าเกษตร — note: บ้านบ้าน

## Description
Learn how to create an interactive chat app to talk to any YouTube channel! In this step-by-step tutorial, you'll learn how to build a Retrieval Augmented Generation (RAG) system utilizing tools like LangChain, LangServe, LangSmith, the YouTube API, and Dagster.

This gives content creators a new way to engage with their audience but also opens up innovative monetization avenues through chat lists—think email lists reimagined for the interactive age. By the end of this video, you'll know how to deploy your AI clone online and create a dynamic chat interface using Botpress.

Links Mentioned
---------------------------
Code Repository: 
OpenAI API Key: 
Google Cloud Console (Youtube API): 
Pinecone: 
Dagster: 
Langsmith: 
Botpress: 

Chapters:
00:00 - Motivation
01:13 - Demo
03:23 - Business Usecase
05:05 - Retrieval Augmented Generation (RAG) Overview
05:40 - Application Breakdown
09:22 - App Walkthrough - Getting Started with the Project
14:19 - App Walkthrough - Dagster Pipeline for Indexing
21:36 - App Walkthrough - The inference server (Langserve)
26:36 - App Walkthrough - Langsmith (Observability)
28:33 - Using this in a chat interface (Botpress)
30:10 - Deploying the app to th

## Transcript (captions:auto:en-orig)
if you're anything like me you probably use YouTube for learning all kinds of stuff there are these fantastic creators on YouTube that create hours of content across hundreds of videos on your favorite subject wouldn't it be cool if you could just take the AI clone version of that YouTube channel and ask any question and get results just as if they were sitting with you in person well that's exactly what I'm going to show you how to do today we're going to take the YouTube channel of one of my favorite YouTubers and build a chat bot on top of it that allows you to ask questions of the entire Channel now while in the thumbnail I use Andrew huberman who makes content around health I thought it would be more relevant to do something around AI which is why I chose Matthew burman's Channel Matthew almost on a daily basis covers everything from the latest AI news to getting hands on with code interviews with some of the brightest Minds in Ai and it's just been an amazing resource to stay on top of uh all the changes that are happening in the world of AI so without further Ado let's just start chatting to his channel and uh I'm going to choose one of these videos uh this one run any open source llm locally with LM studio and we're going to start chatting with it now I have multiple Fields here in order to support chat but we can just ask a question so what does U Matt think about elen studio and what is the newest feature LM Studio has launched so we'll give it a sec Matt thinks Allen studio is awesome especially for beginners the newest feature is the ability to run multiple models simultaneously which is accurate um let's run a few more he has another video where he breaks down the thoughts of yon laon around the achievement of AGI with llms yon Lon has a touring award as one of the biggest figures in AI so let's see what he thinks about llms being able to reach AGI yon Lon believes that llms won't be able to achieve AGI because they lack essential characteristics such as understanding the physical world persistent memory reasoning and planning which is in fact something mentioned in Matt's video let's do a few more quick ones tell me about Disney's new robot so here we can see it's telling us it was made by the team in Zurich with mostly 3D printed material and given a unique character now we are using open AI in the background but because of the training cut off it doesn't have information such as the latest news around a robot that Disney launched so this is coming straight from Matt's video and lastly Let's uh do a question on this new jailbreak method I'm not even going to give it a lot of context I'm just going to say how does the new jailbreak method work all right and we see the new jailbreak method works by crafting cloaked prompts that visually encode identified words to trigger responses that fulfill malicious users objectives and induce unsafe behaviors from the victim LM so this comes from Matt's video where he explains if you just say show me how to make X and then you say x is equal bomb but you provide bomb in ASI it will actually comply with your request and show you how to do that pretty interesting new jailbreak method now before we dive into how this was made I want to highlight that this isn't only for talking to YouTube channels creators can actually use this as a new distribution method so just as you have email list and you know how important those are to Growing your business in this new age of conversational AI you can have chat lists where your entire audience is on chat and able to speak with your AI clone and you can very tactfully introduce your audience into steps of your business funnel at the right moments when it is most relevant for example if I was Matt and someone was asking about X I could just answer whatever I know about X but if I had a particular affiliate link associated with why when they ask about why I can say yeah why is cool you know here's how you use it by the way you can get your own here and I can provide an affiliate link or similarly you can drive them to another lead magnet you have for like a course or whatever else that you have going on in your business and this is going to have a conversion rate that you're just not going to see with any other medium because it's highly contextualized it's highly personal and it comes at a point where you've provided a ton of value with all the knowledge that's available from your AI clone so if you're someone that has a large audience I would strongly recommend that you start looking at building a chatbot clone on yourself where you can provide value at scale to your audience and at the same time helpfully guide them to your right products or services that would help your users accomplish their goals so how do we build this thing the student among you will have noticed that this is nothing other than a retrieval augmented generation use case otherwise known as rag broadly speaking it's comprised of two stages one stage is for waiting for new YouTube videos to be published and once they're published to take this transcript and put it in a database somewhere and the second stage is actually intera conting via a query interface or a chatbot with that data using an llm in order to understand the code better let me first give you a highlevel overview of both of these stages the initial step of putting the YouTube transcripts in a database is called indexing it's called indexing because just like in a book where you go to the index and it tells you which page to go to databases can do a similar thing with chunks of the transcript so to put this whole thing together we need the program to sort of wake up at some interval let's say every hour check the YouTube channel for any new videos uh we'll do this using the YouTube API on Google cloud and if a new video is posted then we can get the transcript of that video using some python library then we take that long transcript and we split it into chunks so maybe an hourlong transcript might be thousands of chunks and a 5minute transcript might be just a couple chunks we are chunking the transcript because when a user asks a question we only want to give the most relevant chunks of information to the llm like chat PT in order to provide the answer if we were to just dump the entire transcript into that question that we're asking then we'd be spending a lot of extra money not to mention llms don't actually do that well when you give them a of context finally we take these chunks and we put them in a vector database I chose to use pine cone because they have a serverless offering which actually works pretty well but there are dozens of other Vector databases available for you to use now I did mention that there is a scheduler so the code does have to wake up at some interval and check for new videos and you could use something as simple as a cron script or if you're using some online services you can say run this bit of code every hour or so but we're going to be using dagster which provides a lot of additional benefits than using something like Kon namely it allows us to recover from failures and run some like backup scripts if something goes wrong or we are able to backfill certain days let's say the YouTube API is down for a day or two then we could say go back for those days and fill in the data for the days that we missed and this is just the type of tool that you would actually use in production so I wanted to show you how that is put together now the second part of this which I already kind of alluded to is how you actually interact with the data that you just stored this is the endtoend query and response where you ask a question like tell me about the latest robot from Disney and a bit of code in something like the Lang chain framework goes and queries the vector database for all the relevant chunks that might include keywords like Disney or robot or something semantically …
