The LangChain Cookbook Part 2 - Beginner Guide To 9 Use Cases

  Рет қаралды 80,537

Greg Kamradt

Greg Kamradt

Күн бұрын

Пікірлер: 137
@christofferbjorkwall1441
@christofferbjorkwall1441 7 ай бұрын
This is by far the best explanations of LangChain I have found. I will follow you next videos closely. Keep up the good work, Greg!
@daffertube
@daffertube Жыл бұрын
I am so excited... the possibilities for this are endless
@DataIndependent
@DataIndependent Жыл бұрын
Nice! Glad to hear it - what're the first things you want to build?
@TheEtrepreneur
@TheEtrepreneur Жыл бұрын
Greg, you and James Briggs became my favorite go-to-channels to learn Langchain. High level stuff!
@DataIndependent
@DataIndependent Жыл бұрын
Nice!! Thank you
@Amr-Ibrahim-AI
@Amr-Ibrahim-AI Жыл бұрын
Cannot thank you enough Greg! Your efforts to simplify these concepts are highly appreciated. I learned a lot from you. This specific video is a perfect second episode of the first Cookbook! Thank you so much.
@hansenmarc
@hansenmarc Жыл бұрын
In the evaluation section, the answer input was “Healthkit”. Very cool that langchain immediately recognized the “Heathkit” had been misspelled in the answer.
@MarkusEicher70
@MarkusEicher70 Жыл бұрын
As you said, now up to build. Always can come back to this video for a quick refresher on a specific use case. Great to have your content as a guideline. Thank you for your work.
@ElizaKamradt
@ElizaKamradt Жыл бұрын
This guy is the GOAT.
@DataIndependent
@DataIndependent Жыл бұрын
Wow thank you!
@zhaoliu4671
@zhaoliu4671 Жыл бұрын
you are absolutely true!
@nattapongthanngam7216
@nattapongthanngam7216 7 ай бұрын
Thanks again for another great video! I'm really enjoying learning about all the different things I can do with LangChain. I spent the long weekend here in Thailand catching up on your videos and following your coding instructions. I've already finished this one (haha, I had to skip a few videos that required an OpenAI key that I don't have yet). I'm definitely going to keep watching the rest of your playlist. Thanks again for all your help!
@port7421
@port7421 Жыл бұрын
I just want to say thank you very much. I really like the way you explain how to use LangChain.
@DataIndependent
@DataIndependent Жыл бұрын
Awesome, thank you Port!
@jsnmad
@jsnmad 6 ай бұрын
16:48 Crazy levels here. As database developer, this is amazing.
@temozarela
@temozarela Жыл бұрын
Thanks Greg! Enjoy plenty of health and business so that you can continue providing valuable content.
@stateofthearb
@stateofthearb 8 ай бұрын
Great vids, Greg. A bit overwhelming for me still but slowly getting there. And even bigger thanks for introducing me to Wild Belle. What a great band!!!
@DataIndependent
@DataIndependent 8 ай бұрын
Ha - I'm glad you liked them! I was hoping someone on watching this would introduce me to Natalie but not yet
@Jordan-tr3fn
@Jordan-tr3fn Жыл бұрын
even though everything is in the docs it's cool to have more examples and use cases! Thank you
@prasad_yt
@prasad_yt 6 ай бұрын
Great explanation ! Just one blip - s/n ratio reduction. It happens to all of us 😊
@abdullahsiddique6393
@abdullahsiddique6393 Жыл бұрын
Doing Gods work. Thank you for this!
@ryanoneill2576
@ryanoneill2576 Жыл бұрын
Hey Greg, Greetings from Ireland. I just want to say how great your videos are for a beginner like me. I had no idea what AI, Machine Learning or Langchain was a few months ago and now I'm obsessed. I'm put in 4-5 hours every day following videos like yours and trying to create stuff. Keep it up please!
@bwilliams060
@bwilliams060 Жыл бұрын
Me too - Almost a new career!
@DataIndependent
@DataIndependent Жыл бұрын
Nice! Thank you to both of you. Please make sure to share your work with the community
@VanDelfin
@VanDelfin Жыл бұрын
Really useful video! Thank you for taking the time to record it!
@DataIndependent
@DataIndependent Жыл бұрын
Glad it was helpful!
@kennt7575
@kennt7575 Жыл бұрын
Thank you very much, your videos have encouraged me, a Vietnamese person, from a zero level of LLMs, LangChain, and its ecosystem to a beginner in LLMs. I implemented some of your lessons in my apps, and get incredible results.
@piyushlavaniya3508
@piyushlavaniya3508 Жыл бұрын
Cleared my doubts and developing some Insights as well.
@DataIndependent
@DataIndependent Жыл бұрын
Thanks again - glad to hear it's going well
@prasad_yt
@prasad_yt 6 ай бұрын
Great explanation - Just one blip - s/n ratio reduction. It happens to all of us 😊
@gurmukhsingh-uh5qo
@gurmukhsingh-uh5qo Жыл бұрын
thank you for sharing. did not know that langchain has this many use cases. amazing
@DataIndependent
@DataIndependent Жыл бұрын
Awesome! Glad to help Gurmukh!
@ajayramesh-14
@ajayramesh-14 Жыл бұрын
Great work! Your video provides a thorough explanation.
@DataIndependent
@DataIndependent Жыл бұрын
Thanks Jay
@seblhomme
@seblhomme Жыл бұрын
Thanks for all these great videos! Amazing job, you make the complex feel simple! Excited to start building!
@bwilliams060
@bwilliams060 Жыл бұрын
Thanks so much Greg. I’ve been hanging out for this one since the release of part 1. It didn’t disappoint - Legend!
@johndcyc
@johndcyc Жыл бұрын
One mistake: the correct answer is not Healthkit. It is Heathkit.
@tomwilliams6483
@tomwilliams6483 Жыл бұрын
Yeah, I had one of those and came in down here to post that. Thanks.
@christianrhodes6218
@christianrhodes6218 Жыл бұрын
These are great videos. I appreciate your mission to aid in an individuals ability for data independence. Keep it up good sir!
@DataIndependent
@DataIndependent Жыл бұрын
Nice! Thank you Christian
@IamalwaysOK
@IamalwaysOK Жыл бұрын
Your video was very informative, and I appreciate it. The primary challenge that many individuals are facing is getting the LLM model to provide references as well. This is particularly crucial for Question & Answer tasks, as it's important to understand how the answer was generated and which text was used to generate it. Have you experimented with this aspect?
@JustAThought01
@JustAThought01 Жыл бұрын
I agree that determining the source of answers is key for productive use of AI for Q/A applications. On what authority is the truthfulness of the answer. We make better decisions when our information is true.
@BrendanDHara
@BrendanDHara Жыл бұрын
Awesome man. Been waiting for a couple days now. Excited to follow along.
@harikrishnareddygali6244
@harikrishnareddygali6244 Жыл бұрын
Thank you for the brief explanation of the use cases. Can you please make a video on querying the website or in other words build a chatbot on any website using LangChain.
@tensiondriven
@tensiondriven Жыл бұрын
Brilliant vid. Everyone is focusing on langchain with OpenAI. I am interested in using agents, chatbots, and memory with local LLM’s. Not sure which of the newer instruction following models are best, and how the limitations of smaller models affect decisions around building with langchain.
@AlexanderGrap
@AlexanderGrap Жыл бұрын
Thank you so much! Was a fun time working through these with you, i learned a ton. Great job!
@rodolforibeiro7250
@rodolforibeiro7250 Жыл бұрын
Great stuff! I'm going to explore this in depth this week, you saved me quite a bunch.
@DataIndependent
@DataIndependent Жыл бұрын
Nice! What do you want to build?
@micbab-vg2mu
@micbab-vg2mu Жыл бұрын
Thank you for providing such excellent resources.
@shreegopalan9678
@shreegopalan9678 Жыл бұрын
Very informative. Thanks for posting
@AP-hv5dh
@AP-hv5dh Жыл бұрын
Next level Greg!! Outstanding!
@mito_dj
@mito_dj Жыл бұрын
This was extremely helpful Greg thanks so much!
@DataIndependent
@DataIndependent Жыл бұрын
Awesome! Thanks Jaime
@charleshan204
@charleshan204 Жыл бұрын
Thanks for making this. One suggestion! When you tap on your table and hit your enter key, the sound travels to the mic and it's not a pleasant sound. As you probably already know, sound is really important to the user experience. A lot of people say that it's even more important than the video quality. Thanks again!
@DataIndependent
@DataIndependent Жыл бұрын
Thanks for that! I'll watch out for it in the future
@eugeniocg3079
@eugeniocg3079 Жыл бұрын
Greg is the GOAT 🐐
@saleenapatel
@saleenapatel 10 ай бұрын
you and your content both are awesome 💖
@terryliu3635
@terryliu3635 Жыл бұрын
Another great video! Thanks!
@user-wr4yl7tx3w
@user-wr4yl7tx3w Жыл бұрын
these are really well structured and presented.
@hellieimani1218
@hellieimani1218 Жыл бұрын
Thanks for all the info. What technical knowledge a non-technical person should acquires to start utilizing this?
@CodeJos
@CodeJos 9 ай бұрын
Hi Greg, these are very helpful tutorial vids, much appreciated! One thing I cannot find any information on in whatever example / turorial / documentation I find is about the memory / chat history. Thanks to your tuts I created a chat app very quickly, which stores the chat history (tested with the 'What was the first thing I asked you about'. But, since I will be creating an app with this later, is that information stored per user? As in: per session? Because the Python app is a single instance, what happens if [n] users all talk to that application? Do you know if langchain automagically separates the history per user session? Thanks in advance!
@GiorgioBorgonovo
@GiorgioBorgonovo Жыл бұрын
Hi Greg, thank you so much for your very insightful explanation of Langchain! It would be interesting an introduction on how you design an application using this fantastic tool. There is a combination of code, langchain (prompt, agents, tools, chains, etc.), "chat", data to put together and it is not the usual way of thinking an application.
@tradingwithwill7214
@tradingwithwill7214 Жыл бұрын
Great tutorial! We need to pip install openai, langchain and tiktoken, faiss-cpu and the similar files uploaded to notebook used in the demos. I finally got my huge KZbin transcript to work thanks to you! I was using the same langchain stuff but for some reason it was throwing an error during similarity search. I figured out that the charactersplitter isn't splitting my file so i had to use texttoken splitter for some reason.
@caiyu538
@caiyu538 Жыл бұрын
Great lectures.
@brianbrosky7965
@brianbrosky7965 10 ай бұрын
Great video! Thank you very much
@DataIndependent
@DataIndependent 10 ай бұрын
Awesome thanks Brian
@herdenq
@herdenq Жыл бұрын
Thank you for your contributions to this space 🙏 Which tool are you referring to, called "Metal". Visible as a comment in your notebook at 8:40
@juliocesar1908
@juliocesar1908 Жыл бұрын
Please keep making these videos! I've learned so much, it's amazing!
@harrydeboer921
@harrydeboer921 Жыл бұрын
Thanks. been following your posts. Great. Question: it seems that when using langchains way to Q&A documents with ChatOpenAI it answers also q outside the context of the documents. the outdated conversationalretrievalchain did work well. Any thoughts?
@rafaeldelrey9239
@rafaeldelrey9239 Жыл бұрын
Awesome tutorial, as your other videos. I would suggest you use chroma, instead of FAISS. I couldn't make faiss work on my MacBook M2.
@PeterSodhi
@PeterSodhi Жыл бұрын
Bets content out there.
@mrjoykill0
@mrjoykill0 Жыл бұрын
It would be cool if you could show a tutorial where you use open-source LLM models like those from Hugging Face instead of OpenAI. The project I would be most interested in would be one where you could use the open-source model for agents, specifically to see if a question needs more information, and maybe even have it be able to choose between querying a local database and/or looking it up online.
@JeanHirtz-u9e
@JeanHirtz-u9e Жыл бұрын
That's some solid content
@chatmcg
@chatmcg Жыл бұрын
Yorkville is a neighborhood in New York City, just saying. Great video!
@calebsuh
@calebsuh Жыл бұрын
Great video Greg! At 3:53, I noticed you have temperature 0 for your summary chain. Have you found that's ideal for summaries?
@DataIndependent
@DataIndependent Жыл бұрын
Eh, I found that it reduces hallucinations. Usually my summaries are for function rather than form so I don't need to much fluff in there. Either way I would encourage you to experiment with your own use case and see what you like
@calebsuh
@calebsuh Жыл бұрын
@@DataIndependent makes sense. Creativity isn't needed for summaries. Thanks again for your excellent videos!
@sancochodepapa
@sancochodepapa Жыл бұрын
Dude you rock!
@stevendevries1395
@stevendevries1395 7 ай бұрын
fantastic!
@karthikb.s.k.4486
@karthikb.s.k.4486 Жыл бұрын
Excellent sessions. Can we do all the tutorials in CPU laptop or do we need GPU laptop?
@DataIndependent
@DataIndependent Жыл бұрын
There isn’t a lot of computation happening so you shouldn’t need a special set up
@pramodm6168
@pramodm6168 Жыл бұрын
Hi Greg.. thanks so much for sharing your expertise! Super helpful.. had a question - looks like with LangChain + OpenAI, you can pretty much extend and interact with any data source as an extension to the OpenAI LLM. In what scenario would you want to create a model that's trained on the external data vs just using this method of extending with LangChain?
@johnwallis1626
@johnwallis1626 Жыл бұрын
good vid greg. Ive been experimenting with the different text splitters, i found NLTKTextSplitter was good when vectorising all of langchain docs, as there is text + python code in there. there is also a pythontextsplitter() which looks promising.
@nissimpariente7895
@nissimpariente7895 Жыл бұрын
brilliant!
@jaivalani4609
@jaivalani4609 Жыл бұрын
Hi greg thanks a lot for your videos.. Do you know if we can perform classification task using langchain+gpt ?
@DataIndependent
@DataIndependent Жыл бұрын
Totally! You can just ask it to classify your text. Whatever you’d like. However it’s an expensive classification engine and best for ambiguous or grey area text. For more traditional data science classification there are better algorithms
@hanankevich5762
@hanankevich5762 9 ай бұрын
Amazing ❤
@DataIndependent
@DataIndependent 9 ай бұрын
Thank you! 🙏
@Jaybearno
@Jaybearno Жыл бұрын
6:11 in all examples I’ve seen (and this one) Q&A document retrieving relies on the text content. How can you impose a semantic structure on chunks, like all chunks in chapter 3 have that metadata, or an indicator in the vector embedding. Basically, I want the retriever to get all chunks within a section regardless of text content. Any ideas?
@thomastudu2977
@thomastudu2977 Жыл бұрын
Suppose if I save the whole source code of a laravel project as a document ,will langchain help me get total number of controllers used in the project ?
@stellarspellar
@stellarspellar Жыл бұрын
Heathkit, not Healthkit
@vincefan867
@vincefan867 Жыл бұрын
yes, was it a typo?
@aboutfoss
@aboutfoss Жыл бұрын
As a young lad, I (unsuccessfully) built a Heathkit AM/FM clock radio. It came with a sodering iron, transistors, resistors, etc...
@cstan2381
@cstan2381 Жыл бұрын
Hi Greg, I have been watching your excellent video and trying out things. It save me so much time. All in one place. Many many thanks. Can you help me with a problem with 8.40 when I run qa.run(query). It threw an error. AuthenticationError: No API key provided.
@DataIndependent
@DataIndependent Жыл бұрын
You need to provide your API key to your script. That should be one of the first code cells at the top of notebook
@cstan2381
@cstan2381 Жыл бұрын
@@DataIndependent Thanks! I did this and the problem went away os.environ['OPENAI_API_KEY'] = "..." Presumably the same thing.
@atultiwari88
@atultiwari88 Жыл бұрын
Hi, Thank you for your tutorials. I am following your tutorials for quite some time now. I have watched your whole playlist on this. However I am unable to figure out best economic approach for my use case. I want to create a Q & A chatbot on streamlit which answers only my custom single document of about 500 pages. The document is final and won't change. From my understanding so far, I should either choose Langchain or LlamaIndex. But, I will have to use OpenAI api to get best answers, but that API is quite costly for me. So far I have thought of using Chroma for embedding and somhow storing the vectors as pkl or json on streamlit itself for re-use, so I don't have to spend again for vectors/indexing. I don't have enough credits to test different methods myself. Kindly guide me. Thank you.
@adomarc
@adomarc Жыл бұрын
For QA over documents, does OpenAI charge for only the query but not the context? Is it more effective to store as much as possible in context rather than the query. It may not be possible for most applications but for mine this would possible.
@DataIndependent
@DataIndependent Жыл бұрын
OpenAI will charge for how many tokens you send over, this includes the query and the context
@adomarc
@adomarc Жыл бұрын
@@DataIndependent Thank you!
@challengeaccepted4658
@challengeaccepted4658 Жыл бұрын
I've been experimenting with the "interacting with api" section but I noticed it's very expensive. $0.1 for every call you do. Are there any ways to reduce the OpenAI costs?
@user-wr4yl7tx3w
@user-wr4yl7tx3w Жыл бұрын
can you show how we can use Cohere instead of OpenAI?
@JTedam
@JTedam Жыл бұрын
I've seen your videos along with others like them, and I've noticed that most of you use notebooks for your demonstrations. As a result, the front-end web interface, which plays a crucial role in showcasing the results, is often not discussed. This includes important aspects like collecting data and sending it to the models, as well as displaying the output in an effective way on the front-end, especially when using chains. It would be helpful to know which frameworks are best suited for handling these front-end tasks.
@DataIndependent
@DataIndependent Жыл бұрын
What types of applications are you trying to build?
@JTedam
@JTedam Жыл бұрын
@@DataIndependent Question and answer, text summarization, and chain dialogue are valuable tools for addressing queries in large documents. However, they have limitations, like not being able to identify the specific page number or other metadata related to the answer. For example, if I receive an answer based on a question from an embedded document, I would appreciate being directed to the relevant section of the document to explore further.
@unquenchablespace
@unquenchablespace Жыл бұрын
@@JTedam Can't you take the context that is being provided to the LLM based on semantic search on the query, and do the code version of Ctrl+F of that context in your document?
@antoniovelazquez1452
@antoniovelazquez1452 Жыл бұрын
Change model='gpt-3.5-turbo' -> model_name='gpt-3.5-turbo'
@caiyu538
@caiyu538 Жыл бұрын
great
@xiaomiwu4734
@xiaomiwu4734 Жыл бұрын
Great video. One question. I can't import Pinecone with error message like this: ModuleNotFoundError: No module named 'pinecone' C:\Users\Administrator\tool\Topic Modeling>pip install pinecone ERROR: Could not find a version that satisfies the requirement pinecone (from versions: none) ERROR: No matching distribution found for pinecone Could you pls help me on this? Thanks!
@DataIndependent
@DataIndependent Жыл бұрын
Sounds like the environment you're in doesn't have pinecone. Have you tried installing it?
@bunnihilator
@bunnihilator Жыл бұрын
Hi can you share you Jupyter notebook?
@DataIndependent
@DataIndependent Жыл бұрын
Check the description!
@saurabhmukherjee9757
@saurabhmukherjee9757 Жыл бұрын
Audio Volume is low in part1 and in Part2 both
@Cr-R7
@Cr-R7 Жыл бұрын
Can we learn longchain without zero knowledge of phyton???
@masonprince3705
@masonprince3705 Жыл бұрын
When I try to run the eval under "Vanilla Extraction", it gives me an 'invalid syntax' error.
@masonprince3705
@masonprince3705 Жыл бұрын
FYI I'm running this with Python 3.11, not 3.10.
@jimjones26
@jimjones26 Жыл бұрын
did you ask chatgpt why you are getting this error? I have found when I post in an error message to chatgpt it has been very good at giving me ideas of what could be wrong and how to fix it.
@LesCalvin3
@LesCalvin3 Жыл бұрын
Yay!
@leolangeard
@leolangeard Жыл бұрын
17:20
@DataIndependent
@DataIndependent Жыл бұрын
Is this where you stopped watching?
@leolangeard
@leolangeard Жыл бұрын
@@DataIndependent No it's the part I needed for a project 😁
@techBird-b2m
@techBird-b2m Жыл бұрын
Tutorial speed is too high, Practically not possible to follow tutorial having speed in narration and videos. Its like keep hearing like story.
@DataIndependent
@DataIndependent Жыл бұрын
It’s a balance of attention span vs effectiveness. I don’t think I can please 100% of people (that shouldn’t be the goal either). So far this of the first comment I’ve had on speed. Also, it’s easier to press the pause button than it is to speed up and slow down the playback speed constantly. So all that to say, thanks for the comment and the feedback I love the energy
@arunmalai9770
@arunmalai9770 9 ай бұрын
so this so called gentleman author replies only to compliments and appreciations, not for serious comments. hello author, let go of your ego and you will learn only when you respond to criticisms and to the problems reported by the watchers. not for those YES saying sheeps. hope that goes into your grey matter
@DataIndependent
@DataIndependent 9 ай бұрын
Hey thanks! Is do you have a comment I can respond to? The volume of comments gets overwhelming so I don’t have time to respond to them all. When you create content you do it for fun and I need to keep a watch about what activities give me energy. I find that responding to trolls or haters doesn’t give me energy. Responding to happy or helpful people with constructive criticism does. Thank you!
@DataIndependent
@DataIndependent 9 ай бұрын
Also, if you have any content, videos, or material you’d like feedback on please let me know
@JaZzZzZzU
@JaZzZzZzU Ай бұрын
plz avoid this :) except Exception as e: pass you can spend then a lot of time debugging
@santimm20
@santimm20 Жыл бұрын
really cool video! what is the difference between GOOGLE_API_KEY GOOGLE_CSE_ID and serpapi?
@micb11
@micb11 Жыл бұрын
I am following your tutorial on chatbot 20:18. I am getting an error. You are trying to use a chat model. This way of initializing it is no longer supported. Instead, please use: `from langchain.chat_models import ChatOpenAI`. I imported this but I do not know how to initialise it?
@DataIndependent
@DataIndependent Жыл бұрын
You should be able to use the same "ChatOpenAI" name as you did before. I'll take a look at the code and update it if necessary
@ermalai
@ermalai 9 ай бұрын
this is another one - when I tried the next API : ValidationError: 1 validation error for APIChain __root__ Please provide a list of domains to limit access using `limit_to_domains`. (type=value_error)
@ermalai
@ermalai 9 ай бұрын
if you are objective is for us to try your code, then make sure it works you know. what is the point of trying something and if it throws error after error. this is really annoying
@delgrundy
@delgrundy Жыл бұрын
This is all great fun. Won't M$ just leverage their position with OpenAI to bake all this into WIndows?
@DataIndependent
@DataIndependent Жыл бұрын
Rarely is the out of the box solution that built into the desktop exactly what you need. This library is for when you need to build an application
LangChain 101:  Agents Overview + Google Searches
6:49
Greg Kamradt
Рет қаралды 60 М.
The LangChain Cookbook - Beginner Guide To 7 Essential Concepts
38:11
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 1,2 МЛН
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 207 МЛН
5 Levels Of LLM Summarizing: Novice to Expert
19:19
Greg Kamradt
Рет қаралды 54 М.
2 Years of LLM Advice in 35 Minutes (Sully Omar Interview)
49:04
Greg Kamradt
Рет қаралды 21 М.
LangChain vs LangGraph: A Tale of Two Frameworks
9:55
IBM Technology
Рет қаралды 24 М.
The 5 Levels Of Text Splitting For Retrieval
1:09:00
Greg Kamradt
Рет қаралды 79 М.
Workaround OpenAI's Token Limit With Chain Types
15:53
Greg Kamradt
Рет қаралды 63 М.
How I Made AI Assistants Do My Work For Me: CrewAI
19:21
Maya Akim
Рет қаралды 883 М.
World’s Fastest Talking AI: Deepgram + Groq
11:45
Greg Kamradt
Рет қаралды 54 М.