LangChain Fundamentals: Build your First Chain

Ғылым және технология

LangChain is one of the most popular frameworks for coding complex LLM-powered logic. It provides the ability to batch and stream calls across different LLM providers, vector databases, 3rd party APIs, and much more. In this video, we explore the very basics of getting started with LangChain - understanding how to build a rudimentary chain complete with templating and an LLM call. Let's go!
Links:
Code from video - decoder.sh/videos/langchain-f...
LangChain - langchain.com
Ollama Integration - api.python.langchain.com/en/l...
Prompts & Templates - python.langchain.com/v0.1/doc...
Timestamps:
00:00 - Intro
00:25 - Set up Environment
02:41 - Introducing Runnable
03:15 - Message Format
03:52 - ChatModel
05:10 - Why are there so many ways to do the same thing?
06:05 - Types of Messages
07:10 - Introducing Templates
11:12 - Combining Templates w/ LLMs
12:09 - Introducing Pipe
12:36 - Running our chain
13:36 - Review

Пікірлер: 36

  • @brandonwinston
    @brandonwinston29 күн бұрын

    Dude I've been learning langchain for months and this is the tightest explanation of the basics I have seen. I like how you mention the things that might be confusing while learning langchain. Really puts it in perspective.

  • @decoder-sh

    @decoder-sh

    29 күн бұрын

    Thank you so much, I really appreciate you saying that! Keep at it 🫡

  • @ccuenca24
    @ccuenca24Ай бұрын

    Excellent intro!! Thanks for share!

  • @decoder-sh

    @decoder-sh

    Ай бұрын

    My pleasure, thanks for watching!

  • @JustinJohnson13
    @JustinJohnson1323 күн бұрын

    Fantastic! Thank you!

  • @nicosoftnt
    @nicosoftntАй бұрын

    Awesome curated information, your contribution is much appreciated. It's 4 am here and woke up by chance, I was sleepy and even so it was easy to follow you, you are a natural-born teacher. Cheers.

  • @decoder-sh

    @decoder-sh

    Ай бұрын

    Good morning, thanks for watching my video! I'm looking forward to building more with LangChain

  • @its_sid_
    @its_sid_2 күн бұрын

    How simply he explains the concept Chaining and Piping 👏 But I have a question, Is it a RAG model that you've developed ....??

  • @Van-Helssen
    @Van-Helssen23 күн бұрын

    PLEASE show us how to create local agents for tasks: research, create sumarises, grab data, and decorate in html in near real time. Thanks!! ❤

  • @mynameisedu
    @mynameiseduАй бұрын

    This was awesome! it would be lovely to have a similar tutorial about agents and tool calling explaining the different langchain abstractions!

  • @decoder-sh

    @decoder-sh

    Ай бұрын

    I would be happy to! Are there any specific abstractions that you're curious about?

  • @mynameisedu

    @mynameisedu

    Ай бұрын

    ​@@decoder-sh Something about creating chains of agents and tools vs the AgentExecutors abstraction would be great! P.s. thank you for responding!

  • @Enkumnu
    @EnkumnuАй бұрын

    Thank you very much for this clear and comprehensive tutorial.

  • @RamseyLEL
    @RamseyLEL23 күн бұрын

    Very thorough explanation, thank you!

  • @awakenwithoutcoffee
    @awakenwithoutcoffee9 күн бұрын

    I love that your video is up to date with the latest Langchain imports 👍👍 Are you planning a series on LangChain ?

  • @decoder-sh

    @decoder-sh

    5 күн бұрын

    I would like to! A few videos on langchain, then a few videos on llamaindex

  • @dr.mikeybee
    @dr.mikeybee12 күн бұрын

    Another great video. You're a terrific teacher!

  • @decoder-sh

    @decoder-sh

    5 күн бұрын

    Thank you kindly Dr Mikey!

  • @kencottrell
    @kencottrell23 күн бұрын

    thanks - great content

  • @mhammadsaani
    @mhammadsaani12 күн бұрын

    Are you planning to do a full series on Langchain?

  • @decoder-sh

    @decoder-sh

    5 күн бұрын

    Yes I would love to explore more with langchain, and also do a series on llamaindex

  • @mhammadsaani

    @mhammadsaani

    5 күн бұрын

    ​@@decoder-sh Waiting for your series impatiently. please prefer depth when teaching, otherwise , you know that there is a lot of stuff on langchain. You have done some great work in this video. So, please maintain the quality of content!

  • @madhudson1
    @madhudson1Ай бұрын

    great series. Would love for it to continue

  • @decoder-sh

    @decoder-sh

    Ай бұрын

    And it will! Thanks for watching

  • @arkitact
    @arkitactАй бұрын

    Great work... One issue tho... You need to post weekly instead of monthly.... Coz you're posting smaller digestible videos and waiting a month to get the next video is too long.... really enjoying your content... really appreciate it...

  • @decoder-sh

    @decoder-sh

    Ай бұрын

    I'm working on it! Weekly would be my ideal cadence, but I've been traveling this summer and am still optimizing my recording + editing flow. Rapidity is a top priority though 🫡

  • @JacobLehman-ov4eu
    @JacobLehman-ov4euАй бұрын

    this was great, thanks. I'm hoping to build a chat bot combining, LLM, fine-tuned, Rag, and a (not sure the best production ready method) to parse ancient texts to seek wisdom and deeper understanding of those texts. but I'm new to each part of this so I'm not sure where to start quite yet. your videos are very helpful, and I feel like I'll figure it out at some point.

  • @decoder-sh

    @decoder-sh

    Ай бұрын

    Thanks for watching! Mind if I ask some questions about your project? What is the source of dataset? Is it image or text? Is it already translated into a modern language?

  • @JacobLehman-ov4eu

    @JacobLehman-ov4eu

    Ай бұрын

    @@decoder-sh Sure! Modern Language in .txt . Ideally after proof of concept, long term I'd like to do original languages but start with English and move from there. Greek and Hebrew are the first two older languages I would want to start with to see if I could retrieve any additional context from the words. I would be starting with the Bible since it's such a well-studied book already and has a lot of resources around it for free.

  • @JacobLehman-ov4eu

    @JacobLehman-ov4eu

    Ай бұрын

    ​ @decoder-sh the more I dive into this project the more it looks like the first iteration ideally would be an advanced rag pipeline. based off your experience, do you have a recommended direction you would advise or recommend? or a video series for a specific advanced rag pipeline format that might be a good starting point for something as large as the Bible? I believe the Bible is roughly a half a million words and a 66 different books so there's quite a bit of variables there to consider. any help, or pointing to an already existing tutorial would be very helpful. Thanks so much for what you do!

  • @hackedbyBLAGH
    @hackedbyBLAGHАй бұрын

    Thank you for your video. I have been practicing using langchain. In my research(reddit) devs are moving away from Langchain and have some cristisms. Could you give your opinion? Is langchain an introductory tool?

  • @decoder-sh

    @decoder-sh

    Ай бұрын

    People on reddit really do seem to love to hate on LangChain. I think it was possibly the first framework to gain major popularity, so it's unsurprising parts of it were build for a more type of use case. Part of what I wanted to address in this video was some of the feedback that I read on Reddit which was that there isn't one canonical way of doing things, and the docs are a bit all over the place. I do think that LangChain gives you a lot of capabilities. They also give you a ton of abstractions that don't always do exactly what you want them to do, or appear to be magic. But if you really want, you can always rebuild whatever you want with LCEL. So I don't think that LangChain is a bad tool to start building with, however I don't yet have much experience with LlamaIndex. Are there any other frameworks you think I should be looking at?

  • @madhudson1

    @madhudson1

    Ай бұрын

    ​@@decoder-sh agree on the documentation. Does feel a bit all over the place and sometimes incomplete. Folks hate on it as it's not recommended to be used in production. Which then causes issues when frameworks like crewai choose to use it. I personally really like it, as long as you understand what you're using. I do really like langgraph too

  • @decoder-sh

    @decoder-sh

    Ай бұрын

    @@madhudson1 Yeah I think langchain's document loaders are a great example of having both pros and cons. Pros are that you can load and parse a directory full of PDFs in one line of code. Cons are that there are a million ways to parse a PDF, and the default parser only takes you so far and its a little unclear what levers you're actually able to pull via langchain. With that said, document loaders are just API wrappers in a sense, and are used all over the place x.com/Decoder_sh/status/1780249955875144159

  • @mk677hd
    @mk677hdАй бұрын

    LlamaIndex please?

  • @decoder-sh

    @decoder-sh

    Ай бұрын

    On the list! Thanks for watching

Келесі