LangChain Crash Course - Build apps with language models

In this LangChain Crash Course you will learn how to build applications powered by large language models. We go over all important features of this framework.
Timeline:
00:00 - Introduction
01:09 - Installation
01:22 - LLMs
03:08 - Prompt Templates
04:58 - Chains
06:02 - Agents and Tools
09:54 - Memory
11:15 - Document Loaders
12:24 - Indexes
Resources:
Written guide: www.python-engineer.com/posts...
Colab: colab.research.google.com/dri...
Docs: python.langchain.com/en/latest/
GitHub: github.com/hwchase17/langchain
Chatbot example: github.com/hwchase17/chat-lan...
Get my Free NumPy Handbook:
www.python-engineer.com/numpy...
✅ Write cleaner code with Sourcery, instant refactoring suggestions in VS Code & PyCharm: sourcery.ai/?... *
⭐ Join Our Discord : / discord
📓 ML Notebooks available on Patreon:
/ patrickloeber
If you enjoyed this video, please subscribe to the channel:
▶️ : / @patloeber
~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
🖥️ Website: www.python-engineer.com
🐦 Twitter - / patloeber
✉️ Newsletter - www.python-engineer.com/newsl...
📸 Instagram - / patloeber
🦾 Discord: / discord
▶️ Subscribe: / @patloeber
~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~
🅿 Patreon - / patrickloeber
#Python
----------------------------------------------------------------------------------------------------------
* This is an affiliate link. By clicking on it you will not have any additional costs, instead you will support me and my project. Thank you so much for the support! 🙏

Пікірлер: 106

  • @bassemgouty9840
    @bassemgouty9840 Жыл бұрын

    By far the most comprehensive and clear video about LangChain , Keep doing things like this !

  • @williamgillett1756
    @williamgillett1756 Жыл бұрын

    Great walk-through - good examples, like the colab page. Very helpful to bring all these parts together with relevant live examples.

  • @anokimusic
    @anokimusic Жыл бұрын

    Thank you man! Love your teaching style. Pls do more about langchain 🙏🏼

  • @giosanchez90
    @giosanchez90 Жыл бұрын

    Great walkthrough, thank you for breaking this all down!

  • @AdilsonAB
    @AdilsonAB Жыл бұрын

    Thank you Patrick for sharing your knowledge with us!

  • @EmilioGagliardi
    @EmilioGagliardi Жыл бұрын

    thank you very much for this. its very helpful to see these concepts and step-by-step walkthroughs. :)

  • @Anannya_C
    @Anannya_C11 ай бұрын

    Everything is explained so systematically and in a very concise manner. ❤

  • @janu314
    @janu314 Жыл бұрын

    Great summary! we need a second video on this.

  • @rrtt1995
    @rrtt1995 Жыл бұрын

    Thank you Patrick for such a precious tutorial!

  • @mahmoudreda1083
    @mahmoudreda1083 Жыл бұрын

    It's always nice to see you Patrick. Great Content🤝

  • @wadejohnson4542
    @wadejohnson4542 Жыл бұрын

    Hi Patrick. Thank you for this. You are undeniably in a league of your own when it comes to teaching. You set a high bar for others to follow. Well done.

  • @phillipkadaoui9649

    @phillipkadaoui9649

    Жыл бұрын

    Second this. There is so much info packed in, it's so clear. This has been an absolute game hanger for me.

  • @Philmad

    @Philmad

    10 ай бұрын

    Indeed, supreme video

  • @elleryleungnews
    @elleryleungnews Жыл бұрын

    Thank you. I like it so much. I can already see a lot of potential here. Looking forward for more of this.

  • @omg8031
    @omg8031 Жыл бұрын

    This video is Short but CLEAR.VERY GOOD. KEEP GOING BRO.

  • @martinputnam8281
    @martinputnam8281 Жыл бұрын

    Remarkably coherent and concise. Thank you!

  • @fomukomsam3706
    @fomukomsam370611 ай бұрын

    Phenomenal, such a blessing to be alive in this generation and to come across your video. I am truly grateful.. Super Teacher.

  • @abhishekgupta7719
    @abhishekgupta7719 Жыл бұрын

    This is one of the best Videos I found on Langchain.

  • @sughosh100
    @sughosh100 Жыл бұрын

    Thank you for making this video. It was helpful and concise. Good examples, too.

  • @solidkundi
    @solidkundi Жыл бұрын

    Wowsers... i've been listening to alot of people talk about langchain. your teaching style really helped. Keep up the amazing work you do!

  • @patloeber

    @patloeber

    Жыл бұрын

    Thank you :)

  • @code4AI
    @code4AI Жыл бұрын

    informative. diverse spectrum of code examples. builds the bigger picture. -> recommended video.

  • @luis96xd
    @luis96xd Жыл бұрын

    Amazing video, everything was well explained, thank you so much!

  • @houssam814
    @houssam814 Жыл бұрын

    I was waiting for this video, man you are a legend

  • @VR-fh4im
    @VR-fh4im Жыл бұрын

    Very nice. Short and concise.

  • @davidwu3247
    @davidwu3247 Жыл бұрын

    you are doing the lord's work Patrick

  • @huytube6
    @huytube6 Жыл бұрын

    Very clear explanation, Thank you!

  • @muhammadlufti2967
    @muhammadlufti2967 Жыл бұрын

    I remember the struggle and effort on working with text-davinci-003 model with lots of API only to have the model updated with current knowledge, and modifying script for short or long term memory in chat. But now we have this amazing library, packed with several remarkable features.

  • @randdom7364
    @randdom7364 Жыл бұрын

    Great first tutorial I see so clear, great job

  • @GoatQ
    @GoatQ Жыл бұрын

    Thank you for the crash course !

  • @GiovanneAfonso
    @GiovanneAfonso Жыл бұрын

    The best video I've seen about langchain! Please make more on langchain please

  • @patloeber

    @patloeber

    Жыл бұрын

    thank you!

  • @samcavalera9489
    @samcavalera9489 Жыл бұрын

    Thanks so much man! You are awesome! Already subscribed, liked, and shared the video 😃🙏

  • @flethacker
    @flethacker Жыл бұрын

    If only every single tutorial on youtube was written and executed like this

  • @jeffpowers2584
    @jeffpowers2584 Жыл бұрын

    love the creativity that went into making this. It's clear that a lot of thought and effort went into this. One clarification.. we have some sensitive data which should not be sent externally In this case such as langchain.vectorstores stores locally, what sort of information goes externally to openAI or else where

  • @develom_ai
    @develom_ai5 ай бұрын

    Thanks for this great tutorial. 😊

  • @yoeldelanoval4507
    @yoeldelanoval4507 Жыл бұрын

    Excellent work, Thanks!!

  • @HIBaysal
    @HIBaysal8 ай бұрын

    Best video so far, all the rest just do 1 trick pony with all of them doing the same 1 thing. Here we see multiple options. Thank you for your time making this

  • @sitrakaforler8696
    @sitrakaforler8696 Жыл бұрын

    Nice ! thanks for those clear explanation

  • @smudgepost
    @smudgepost Жыл бұрын

    An excellent video as always and the Colab s much appreciated. I sense we could do a whole series of langchain and end up building osme epic LLMs

  • @jonidimo
    @jonidimo Жыл бұрын

    Amazing tutorial. I could love to see Obsidian with Stable Vicuna integration.

  • @Terence01
    @Terence01 Жыл бұрын

    Super useful, thank you so much !

  • @pauliuszabinskas8377
    @pauliuszabinskas8377 Жыл бұрын

    Brilliant guide!

  • @bandui4021
    @bandui4021 Жыл бұрын

    Frohe Ostern. Thanks for the very nice vid. Would be nice to see a real use-case project with Langchain. Several videos which have a common goal (i.e. like a personal assistant like Jarvis or open assistant) would be superb! Thanks for the current input

  • @mchoirul
    @mchoirul11 ай бұрын

    great recap. thnak you

  • @ajaykumargogineni3391
    @ajaykumargogineni3391 Жыл бұрын

    Great video!!

  • @casekingz2273
    @casekingz2273 Жыл бұрын

    Well done. To the point

  • @miriamramstudio3982
    @miriamramstudio3982 Жыл бұрын

    Great video. Thanks

  • @ButchCassidyAndSundanceKid
    @ButchCassidyAndSundanceKid10 ай бұрын

    Hi Patrick, your videos are great. I really enjoyed them.

  • @cexploreful
    @cexploreful Жыл бұрын

    wow impossible library! amazing explanation!

  • @hanuman_thaifoodmaster
    @hanuman_thaifoodmaster Жыл бұрын

    Thank you

  • @fxsignal1830
    @fxsignal1830 Жыл бұрын

    thank you very much

  • @HazemAzim
    @HazemAzim Жыл бұрын

    great and very comprehensive as usual Patrick , Thank you . Now How can we use the New ChatGPT API (GPT3.5 turbo and GPT4.0) , and ChatOpenAI within the Agent framework?

  • @alejandrozaizar1329
    @alejandrozaizar1329 Жыл бұрын

    I haven’t found a full step by step tutorial on langchain importing several documents then storing them on pinecone and finally using a chat up to interact with it in a deployment environment, could you make some example about that?

  • @SharatS

    @SharatS

    Жыл бұрын

    This video is pretty close kzread.info/dash/bejne/mmR4qqapYanInbQ.html

  • @TheGuillotineKing

    @TheGuillotineKing

    Жыл бұрын

    Just ask the AI

  • @DvACtOid

    @DvACtOid

    Жыл бұрын

    @@TheGuillotineKing GPT has cutoff knowledge of 2021, langchain is not existed by that time, therefore GPT codex has no clue of langchain

  • @TheGuillotineKing

    @TheGuillotineKing

    Жыл бұрын

    @@DvACtOid while that is true you can copy and paste in new information and it will understand it you just need to feed it the relevant information

  • @sirkaliethic
    @sirkaliethic Жыл бұрын

    Weldon Mr.

  • @prateekkumar2740
    @prateekkumar274011 ай бұрын

    Hi Patrick, Thanks for such an amazing content. Although, I have a question, If I am trying to build this Q-A bot trained on custom data say PDF, how would the system react or understand if the pdf contains images or mathematical formulations. Example : say I have a document on photosynthesis and I query my bot about What is photosynthesis? In return I want explanation from the doc provided, along with any relevant image and formulae. How should we make something like this? Thanks

  • @nat.serrano
    @nat.serrano Жыл бұрын

    great explanation. One thing I don't understand is how my application will know to call the LLM directly or accept a response from the agent. For example: what's the weather? the app must be smart enough to know that the LLM doesn't know then go an query an api using the agent....but how to switch back and forth?

  • @twinGeminis69
    @twinGeminis69 Жыл бұрын

    I’ve been banging my head against a vector database (milvus) for three days, thank you sir for pulling me out of purgatory

  • @aelabassi97
    @aelabassi97 Жыл бұрын

    cool!!.

  • @khushpatel6296
    @khushpatel6296 Жыл бұрын

    Hello Patrick, I am asking here as this is your latest video, I have seen your videos regarding Langchain, I am curious how to optimize inference while using LLMs in Langchain using TensorRT or Onnx Runtime... As in Industries, It's very obvious, to save the time as well as computation cost... In TensorRT while using open source models, we have techniques like quantization and a few more more for that... So In Langchain is there any way to do this?

  • @nitingoswami1959
    @nitingoswami1959 Жыл бұрын

    So using openai api key or any other keys the request we are sending to generate the text is quite limited right ? So whenever users ask their query to the model will it able to answer them all or will throw the api limit error?

  • @TonyHoangPodcast
    @TonyHoangPodcast Жыл бұрын

    Is there a way to combine document loader with google api? The only way I got it to work was to pipe the output from the google api into my vector db then do a query on the db.

  • @techwise719
    @techwise719 Жыл бұрын

    Thanks for the video. Please correct me if I am wrong. With this tool we can easily build a chat bot for clients for example when he ask about his order or file update. The bot can answer based on memory and documents uploaded regarding this client? Definitely request you to make a video on daily life usage with details please.

  • @patloeber

    @patloeber

    Жыл бұрын

    yes this is a good use case for it

  • @naturallydope247

    @naturallydope247

    Жыл бұрын

    This makes Langchain make more sense now. My question is how do we turn this into a Chatbot for web for someone to use?

  • @tljstewart
    @tljstewart Жыл бұрын

  • @brian_akhtar
    @brian_akhtar Жыл бұрын

    anymore tutorials/crash courses people suggest for langchain and long term memory for LLMs? furthermore, how to set it up for your users to use?

  • @diaconescutiberiu7535
    @diaconescutiberiu7535 Жыл бұрын

    Is there any limit for tokens in the Memory? How long can a conversation get until the model will forget or start hallucinate?

  • @VaibhavShewale
    @VaibhavShewale Жыл бұрын

    so we can use more then one model at a single run?

  • @caiyu538
    @caiyu538 Жыл бұрын

    👍

  • @bjugdbjk
    @bjugdbjk11 ай бұрын

    Can i have my offline models (Ex : - Downloaded Hugging face models) talk with tools like Google search via Agents through Langchain ? Is that possible or only its limited to the online models via api keys ?

  • @hsrkfzycfod8
    @hsrkfzycfod8 Жыл бұрын

    How does this compare to Haystack which has been around for years?

  • @kylecheung9302
    @kylecheung9302 Жыл бұрын

    How can we use a ConversationChain with LLM chain and prompt templates?

  • @shikhil1
    @shikhil1 Жыл бұрын

    Is there a way to avoid using open ai API keys for the lang chain chatbot to work?

  • @AC-sj7hu
    @AC-sj7hu10 ай бұрын

    Thank you so much for your video, would be great if you share a way to deploy it to a real website 🙏

  • @ericbroun4657
    @ericbroun4657 Жыл бұрын

  • @rubencaspary3621
    @rubencaspary3621 Жыл бұрын

    Hello Patrick, sers, moin, good content, could you show how to get a German LLM as in for German language appreciate

  • @adamsardo
    @adamsardo Жыл бұрын

    I keep getting the error: "ModuleNotFoundError: No module named 'langchain'" It's definitely installed. Any idea why?

  • @bertilhatt
    @bertilhatt Жыл бұрын

    Why did you share your tokens clearly? I’m thinking of making tutorials, and I’m mindful of not including the credentials in the clear, but maybe I’m missing an easy solution.

  • @patloeber

    @patloeber

    Жыл бұрын

    I’m just too lazy editing them out. Obviously refreshed them after recording

  • @mohsenghafari7652
    @mohsenghafari76524 ай бұрын

    hi. please help me. how to create custom model from many pdfs in Persian language? tank you.

  • @jma42
    @jma42 Жыл бұрын

    then its just open ai api wrapper?

  • @artmusic6937
    @artmusic693711 ай бұрын

    i don't understand why prompt.format(question= "Can Barack Obama have a conversation with Georde Washington?") is introduced showed that is it not working and then with the chains you again introduce the same question again to the question variable and use it in a llm_chain. the prompt format is useless?!

  • @maheshBasavaraju
    @maheshBasavaraju Жыл бұрын

    I think you should be masking your API keys in the videos

  • @aflous

    @aflous

    Жыл бұрын

    I would say this is a fake one

  • @VaibhavShewale
    @VaibhavShewale Жыл бұрын

    why your token is so exposed? what if someone use it?

  • @lobaco

    @lobaco

    Жыл бұрын

    I'm pretty sure he revoked it before uploading the video...

  • @glansingColt
    @glansingColt Жыл бұрын

    Is this what Auto_GPT uses?

  • @pw7225
    @pw7225 Жыл бұрын

    *facilitate (with a t) = erleichtern

  • @jason_v12345
    @jason_v12345 Жыл бұрын

    Why is it using Wikipedia to look up the release date of a movie from 2006? It already has that information in it's training data.

  • @pranjal86able
    @pranjal86able Жыл бұрын

    why not just use Open AI API directly?

  • @rikiriki43
    @rikiriki43 Жыл бұрын

    One mistake: the 49 line should change to:llm = OpenAI(openai_api_key='your_api_key', model_name='text-davinci-003', temperature=0.9), I used your code, But failed

  • @nedyalkokarabadzhakov5405
    @nedyalkokarabadzhakov5405 Жыл бұрын

    now only of i can find way to collect all the data i need, and money to buy all GPUs, in a meantime Microsoft will integrated AI in all of their produicts for free.

  • @ILoveGolf75
    @ILoveGolf75 Жыл бұрын

    Can't thank you enough. I appreciate you.

  • @Grahfx
    @Grahfx Жыл бұрын

    What the hype about this library I don't get it. I coded half of this library myself for a small side project, it's so trivial what it does.

  • @techsavvy9258

    @techsavvy9258

    Жыл бұрын

    Just out of curiousity. Is it not worth knowing? I'm not a developer but I find this interesting tho. I assume you are an experienced developer and find this Library not so much helpful?

  • @Grahfx

    @Grahfx

    Жыл бұрын

    @@techsavvy9258 Yes but the hype around is crazy. I mean I can't read a twitter/reddit post without hearing about this. It's everywhere.

  • @met2017
    @met2017 Жыл бұрын

    test

  • @glenhinkle
    @glenhinkle Жыл бұрын

    Why does everyone in AI videos use notebooks? Why use a text file when we can create a tutorial with unnecessary functional and visual clutter, and present it in a way that's as far away from a production environment as possible?

  • @JDWilsonJr
    @JDWilsonJr Жыл бұрын

    Hello Patrick. So appreciate your time on our behalf. I copied over your [LangChain.ipynb] and it works as shown in your video when I use my Google Colab account; until your step 81, where you construct the prompt. I see references elsewhere to issues with HuggingFace lately and wondering if I should import a specific verison of HuggingFace to precisely recreate your demonstration?

  • @HelenJackson-pq4nm
    @HelenJackson-pq4nm Жыл бұрын

    Really clear explanation, thank you.