LangChain Tutorial (Python) #4: Chat with Documents using Retrieval Chains

preview_player
Показать описание
#openai #langchain

Retrieval chains allow us to connect our AI-application to external data sources to improve question answering. This is one of the most important skills to have as an AI developer, and in this video we will break down the process step-by-step.
We will cover Document Loaders, Text Splitters, Embeddings, Vector Stores and Retrieval using the Retrieval Chain.

☕ Buy me a coffee:

📑 Useful Links:

💬 Chat with Like-Minded Individuals on Discord:

🧠 I can build your chatbots for you!

🕒 TIMESTAMPS:
00:00 - Intro
01:31 - Project setup
03:26 - Retrieval Explained (RAG)
04:29 - Context
04:56 - Langchain Document
06:31 - Documents Chain
07:55 - Adding Document Loader
10:09 - Text Splitter and Chunking
13:04 - Intro to Vector Stores
14:09 - Embeddings
15:06 - Creating the vector store
16:34 - Retrieval Chain
19:21 - Testing the Retrieval Chain
19:56 - Retriever K value
Рекомендации по теме
Комментарии
Автор

This is even better than the outdated and paid materials out there. Thank you for your efforts

nadershalabi
Автор

I like the way you teach and explain the topics. You make it clear and keep it short. Thank you!

hiltonwong
Автор

Most valuable series about Langchain i´ve seen on youtube. Short videos, full of updated information about the famework and its main components. Thank you !!! If you could produce video series about other AI frameworks such as AutoGen, Haystack, llama-index and chainLit it would be awsome ! I´m watchin your new series about Flowise. Great as this one by the way.

jcneto
Автор

The best video series about langchains I've seen on YouTube. Short, concise, and straight to the point. I've learned so much from your video, especially for this one, since I struggled with the concept of RAG for a while. I express my deepest gratitude for your effort and your video. Just a little small tips, it would be even more awesome if you could explain a bit more about what each line of code does, maybe like explain its contexts or the syntax, or maybe why this code is necessary here. Overall, thanks!

Youtuber
Автор

Extraordinary presentation, full of rich and valuable information. You are great presenter, very skilful in delivering information in an easy and understandable way.Thank you for your great efforts.👏👏

ahassan
Автор

I really enjoy this serie. Maybe the view aren't skyhigh, but every view got realy high level context. Way better then some clickbait.

NS_Miata
Автор

outstanding video on RAG using LangChain ! Amazing work !!

cvp
Автор

So nice tutorial
My suggestion is that it would be better if you have done all this in a jupyter notebook so that all the things done from basic to advanced would be saved in single file, and that it will be easier for us to review later

mlTS
Автор

Great series Leon, thank you. Well explained and concise. Cheeky request. Can you cover off working with Weaviate in a future video?

paulmiller
Автор

Excellent way to make a video. Really u r too good. I really enjoy ur videos. Keep up the good work.

atifsaeedkhan
Автор

Hello sir!
Can you please help me out as I'm working on a code in python where i can question answer bot about the given pdf as a knowledge base this Q&A is in a loop until user says no! I am working on it since 5 days still always shows one or another bug out!

ujjwalsrivastava
Автор

Hy Leon!
Thanks for all your content and sorry for my broken english but where can i find a documentation about the parameters you can or cant pass to e.g. rhe invoke method? Here you pass context and docA as a list to the invoke method. How should i ever know this? Not only that i don't find the parameters nor that the context parameter has to be a dictionary. Can you help in understanding where to lookup such informations?

bwnijjd
Автор

I am getting SSL CERTIFICATE ERROR while trying to do this. What might be the possible fix?

ECB-SanjayReddy
Автор

What if i want use my retriver which is some pdf and another document as a contexts for example to compare it in the some question. is it any possibility to do something like that?

piotrfszawadzkki
Автор

Thanks for your very informative series!
If I wanna use PDF or CSV instead of web, does what I need to do is just swap the webBaseLoader with pdfLoader or csvLoader?

TT-tgyj
Автор

When comparing your JS and Phyton tutorial, I noticed here when storing to vectorDB you stored "docs" variable, and you had "splitDocs" variable. In JS tutorial you passed the "splitDocs" to the vectorDB, and not the "docs". Is this a difference in language or was it a mistake?

It's the part where you are providing the docs+embedding to the vectorDB, one tutorial is splitDocs, one is docs.
P.S. I'm not a dev so go easy on me :D

ejs
Автор

Hello, do you have some advance course with python?? Or can you be a tutor or mentor?

yurapykish
Автор

I am using Groq instead of openai, how should I handle the embedding part?

rogerwmwong
Автор

Can you show us how to save memory while also using. retriever

seththunder
Автор

Everything is great, except the code window seems a little big to me. Could you make the window even smaller (like a matchbox)?🥲

shapovalentine