Learn LangGraph - The Easy Way

  Рет қаралды 13,748

Menlo Park Lab

Menlo Park Lab

Күн бұрын

This tutorial offers a step-by-step guide to building agent applications using LangGraph, a library offered by LangChain. Starting with an overview of LangGraph and its benefits, the tutorial first explores how to make a simple graph and create nodes. It goes on to explain how to create functions and run within nodes. It also covers importing LangChain tools, binding them to the model, how to parse information from nodes, and setting up a state graph. Finally, the tutorial covers adding a conditional edge to the graph and demonstrates running the graph using user inputs.
00:00 Introduction to LangGraph
00:31 Understanding the Basics of Graphs
01:46 Exploring the LangChain Notebook
02:19 Building a Simple Graph with LangChain
04:27 Creating a Graph with LLM Call
04:56 Integrating OpenAI with LangChain
07:40 Building a More Complex Graph
19:09 Understanding Conditional Edges in LangGraph
28:11 Conclusion and Final Thoughts
Notebook link: github.com/menloparklab/LangG...

Пікірлер: 67
@mr.daniish
@mr.daniish Ай бұрын
One of the best explanations on lang graph. Period.
@Aripb88
@Aripb88 23 күн бұрын
Misbah, this is a wonderful introduction to LangGraph. I feel I found a gold mine in your channel among the noisy KZbin space of LangChain tutorials. Thank you very much!
@menloparklab
@menloparklab 3 күн бұрын
Thank you so much 🙂
@user-wr4yl7tx3w
@user-wr4yl7tx3w Ай бұрын
really appreciate the zoom in and zoom out. given that i can watch it on the go, using my iphone.
@TheAstralftw
@TheAstralftw Ай бұрын
I know some langchain. I wanted to learn langgraph. This is best fucking video. Simple yet great. People should donate at least few $, when we see useful video like this.
@menloparklab
@menloparklab 3 күн бұрын
Thanks a lot!
@user-wr4yl7tx3w
@user-wr4yl7tx3w Ай бұрын
This is best introduction to langgraph so far. Thanks!
@jdallain
@jdallain Ай бұрын
Really great stuff! Best breakdown of langgraph on KZbin I’ve seen
@goldenpiece7087
@goldenpiece7087 18 күн бұрын
LangGraph teams examples are pretty advanced for a beginner like me, your approach of using simple functions without llms explained things a lot simpler. Huge respect for that!
@menloparklab
@menloparklab 3 күн бұрын
Thanks!
@JoergSky
@JoergSky 3 ай бұрын
Excellent explanations! Breaking it down to the simple cases in the beginning really helped me to grasp the concepts behind LangGraph!
@MadhanAnbalagan-ff5qt
@MadhanAnbalagan-ff5qt Ай бұрын
Excellent work. When every other video used the documentation to explain, your ground up approach is what made me to understand the concepts. Pls continue the same style for your other videos as well
@supercurioTube
@supercurioTube 20 күн бұрын
Thanks for this good introduction to LangGraph, it's very approachable from the beginning. 10 minutes in and I'm getting nauseous from zooming in and out though (watching on my TV, stated at a reasonable distance)
@alexp.41065
@alexp.41065 2 ай бұрын
EXCELLENT Tutorial. Perfect for grasping the concept. Thank you very much for putting the work into it!
@menloparklab
@menloparklab Ай бұрын
You're very welcome!
@birkajay
@birkajay Ай бұрын
Really excellent way of teaching, thank you for your time. Appreciate it.
@Leonid.Shamis
@Leonid.Shamis 29 күн бұрын
Thank you for a very informative video - I really liked how the concepts are developed on top of each other and explained from simple to more complex! I have a question about ToolInvocation: 19:35 - A SINGLE tool is bound to the model 21:50 - Passing the arguments to ToolInvocation: - What if there was more than one tool bound to the model? - Does LLM make the right tool selection? - How do we ensure that the right tool is invoked?
@sand2420
@sand2420 2 ай бұрын
Great work. Very Nice explanation
@joestrick33
@joestrick33 25 күн бұрын
Great job explaining.Thank you!
@yogeshkulkarni
@yogeshkulkarni 3 ай бұрын
Very nice explanation, step by step make is easy to follow
@awonglk
@awonglk 11 күн бұрын
Very good explanation on Langgraph. Thank you so much OpenAI API isn't free though. Would be even better if you have a version of this tutorial that uses another LLM, like Gemini or Lllama3. For those of us that just wants to learn.
@maysammansor
@maysammansor 27 күн бұрын
very clear explanations . Thank you
@thebluefortproject
@thebluefortproject Ай бұрын
unbelievable tutorial, thank you
@mayank_072
@mayank_072 15 күн бұрын
Great Explained fundamentals
@hyungsungshim5714
@hyungsungshim5714 Ай бұрын
wow, it's really helpful!! Thanks!!
@machrouhmohammed5475
@machrouhmohammed5475 2 ай бұрын
Very nice explanation! Thank you so much
@menloparklab
@menloparklab Ай бұрын
Glad it was helpful!
@kenchang3456
@kenchang3456 20 күн бұрын
Thanks for this video. It is really one of the best explanations I've come across.
@menloparklab
@menloparklab 3 күн бұрын
🙏🙏
@123munal
@123munal 24 күн бұрын
Bro, it's epic! 😀 Learned a lot!
@dhrubajyotirakshit
@dhrubajyotirakshit 4 күн бұрын
Simply supperb..Thanks a lot man
@menloparklab
@menloparklab 3 күн бұрын
Glad you liked it
@rouzbehmozafari
@rouzbehmozafari 21 күн бұрын
Simple & helpfull. TNX alot
@menloparklab
@menloparklab 3 күн бұрын
Most welcome!
@mtin79
@mtin79 Ай бұрын
Awesome and very well explained. Usually prefer the js version of langchain but also a good foundation to transfer from python to javascript. Thank you!
@alejandragutierrez1709
@alejandragutierrez1709 13 күн бұрын
This is so good, thank you!!
@menloparklab
@menloparklab 3 күн бұрын
You're so welcome!
@OPXDataAnalytics
@OPXDataAnalytics 29 күн бұрын
Great step by step breakdown! Finally I can make abit sense of langraph. But the conditional edge section is still abit confusing. why the need to bind and then calling out the toolexecutor again. What does each of these do?
@user-tk1bn8xc3i
@user-tk1bn8xc3i 9 күн бұрын
very helpful thank you
@menloparklab
@menloparklab 3 күн бұрын
Glad it was helpful!
@victoremiliohernandezleal9399
@victoremiliohernandezleal9399 2 ай бұрын
which tool do you use to create the flow diagrams?
@isa-bv481
@isa-bv481 2 ай бұрын
Hi, First of all: THANKS, great video. But I have a funny remark/question. I saved each version of the code I build along with you. At 16:42 in the video you came up with the actual temperature in Vegas. I wrote exactly the same code but I tested with the city "Bouillon" (in Belgium). I tested more than once, just slightly changing the wording (like adding uppercase, a final stop to a sentence ...) then reverting to exactly what you wrote. Even that results in (small) differences in the output (which is strange). - in my slightly different wording, I got as a result "The current temperature in Bouillon is not available". - when I aligned to you, I got a much richer answer (which I didn't ask for in fact), please see for yourself the "debugging" transcript (below) - when I retested this last (strongly aligned to your formulation) version on the city of "Buggenhout" (other region of Belgium), I didn't get no cultural explanations, like I got for the city of "Bouillon" - how weird is that? For not being able to give me a temperature for Bouillon the soft makes up some other info as an apology, but not for "Buggenhout"? It may seem funny, but how trustworthy is this approach? You insisted on being concise, no? (or should we have insisted on returning only temperature and nothing else?) Finally I tested with "Las Vegas", and there I got the expected result, like you did. My conclusion is that the weather API only covers United States and not Europe? But despite that fact, it's an interesting experiment, don't you think so? Kind regards - Marc. -------------------------------- "debugging" transcript when testing the tool with a European city (and in particular "Bouillon") instead of one in the US ----------------------------------------------- The current temperature in Bouillon is not available as it may vary depending on the time of year and weather conditions. It is recommended to check a reliable weather website or app for the most up-to-date information. Output from node 'agent': --- {'messages': ['What is the temperature in Bouillon?', 'Bouillon']} --- Output from node 'tool': --- {'messages': ['What is the temperature in Bouillon?', 'Bouillon', 'In Bouillon, the current weather is as follows: Detailed status: overcast clouds Wind speed: 7.4 m/s, direction: 175° Humidity: 86% Temperature: - Current: 8.92°C - High: 8.92°C - Low: 8.92°C - Feels like: 5.43°C Rain: {} Heat index: None Cloud cover: 100%']} --- Output from node 'responder': --- The current temperature in Bouillon is not available as the specific location is not provided. Bouillon is a city in Belgium known for its medieval castle and scenic views along the Semois River. For the most accurate and up-to-date temperature in Bouillon, it is recommended to check a reliable weather website or app. --- Output from node '__end__': --- The current temperature in Bouillon is not available as the specific location is not provided. Bouillon is a city in Belgium known for its medieval castle and scenic views along the Semois River. For the most accurate and up-to-date temperature in Bouillon, it is recommended to check a reliable weather website or app. ---
@RomainBARRAUD
@RomainBARRAUD 3 ай бұрын
Nice video. Could you share the notebook?
@SashaBaych
@SashaBaych Ай бұрын
Thank you so vey much for this tutorial. It's much better than what the langchain's channel is doing. But, kill me, I still do not understand how conditional edges work. I still do not understand how/why the app or the llm decided to run the weather retrieval? Why exactly the model decides to use the OpenWeatherMapQueryRun tool in function 1? So the flow of the code only depends on whether the model somehow decided if tool was called or not? If we are only relying on the decision making of the model on whether to call a tool or not, without prompting it or anything like that, how can the code graph execute reliably? I can imagine a dozen of ambiguous questions where the model will not be able to decide whether to use tool or not or which tool to use. Imagine we have a tool to find out what the temperature is and another tool that tells whether it is raining or not. Then the question "What is the weather in Las Vegas?" will not yield predictable results. We probably would need to add some kind of intermediary node that would ask if the user is asking about temperature or precipitation. For that just the presence of "function_call' in additional kwargs would not be enough... I am sorry, I am just so extremely confused with langchain and the logic of their classes. Thank you so very much in advance for the response!
@youssefbenlemlih
@youssefbenlemlih 2 ай бұрын
Thanks for the video, it's very helpful. May I ask you what software you are using for recording/editing your videos?
@nintendo2000
@nintendo2000 12 күн бұрын
I wish I saw this video sooner. LangChain's docs has always been dreadful to be honest. But now I can't wait to give LangGraph a spin.
@menloparklab
@menloparklab 3 күн бұрын
🙌🙌
@marktagab2553
@marktagab2553 Күн бұрын
ty
@manish_6
@manish_6 3 ай бұрын
How is it better than autogen and crew ai ?? What additional features or functionality does it provide ??
@menloparklab
@menloparklab 3 ай бұрын
This helps you build agent in a graph format. They all have their own benefits.
@SuperAshleyriot
@SuperAshleyriot Ай бұрын
It doesn't, but for someone like me, that started using CrewAI before I got comfortable with LangChain, this is a very good way for me to get a better understanding of how I would use LangChain to build something like CrewAI. This is the best introduction to LangGraph that I have ever seen, and I am thankful for that, because using a graph to model collaboration of LLMs seems like a very powerful pattern.
@amikewatson
@amikewatson 3 ай бұрын
Can you please post the Notebook link, thanks.😀
@menloparklab
@menloparklab 3 ай бұрын
Oops just added 😅
@prawat35
@prawat35 23 күн бұрын
What pc (gpu) needed to run the example?
@menloparklab
@menloparklab 3 күн бұрын
You could run on collab, or any pc. No GPU needed.
@lesliechiang1710
@lesliechiang1710 2 ай бұрын
Thanks! Excellent introduction and steps.... Best if you can reduce the frequent zooming in-out-in... makes me dizzy when it is overdone and I can't continue to watch anything further. I know it is fun but I feel like vomiting after 20mins into the video.
@ps3301
@ps3301 3 ай бұрын
Isn't it better just to use crew ai or autogen ? Langgraph seems very complex to use
@menloparklab
@menloparklab 3 ай бұрын
The goal of this video is to help go through the complex parts. Hope it helps.
@mpcrlabs9710
@mpcrlabs9710 2 ай бұрын
10/10 on the beard it makes you very wise for your age ngl
@raimondomarino4770
@raimondomarino4770 Ай бұрын
Excellent tutorial. Why don't you create an advanced LangGraph Course on Udemy?. I am sure many people will surely subscribe to your course.
@jasperlaiwoenyon5034
@jasperlaiwoenyon5034 2 ай бұрын
The zoom in and out action make me feel very dizzy
@menloparklab
@menloparklab Ай бұрын
😬
@musumo1908
@musumo1908 3 ай бұрын
Interesting but still seems very complex….and why do they call them graphs!! 😂😂 Trying to see the benefits…over the low code frameworks…crewai?
@minkim7245
@minkim7245 2 ай бұрын
I would really like to finish watching this, but all the unnecessary zooming in and out moves are giving me a headache…
@menloparklab
@menloparklab 2 ай бұрын
Will minimize them for the next vids
@isa-bv481
@isa-bv481 2 ай бұрын
OK, with regards to the bug I mentioned before ... I found out that [_arg1] had to be [__arg1] ... When I run the application, now I get another error: raise InvalidUpdateError( langgraph.channels.base.InvalidUpdateError: Invalid state update, expected dict with one or more of ['messages'], got I'm going to have a good sleep and maybe tomorrow I'll figure out what I might have done wrong. Of course, having the correct source code would help enormously. (by the way: where do we find the theoretical foundation for all these primitives used in the code, because the last version was a serious jump, I kind of get the big picture, but I miss a few smaller steps) Thanks, Marc
LangGraph Crash Course with code examples
39:01
Sam Witteveen
Рет қаралды 55 М.
LangGraph 101: it's better than LangChain
32:26
James Briggs
Рет қаралды 40 М.
Eccentric clown jack #short #angel #clown
00:33
Super Beauty team
Рет қаралды 13 МЛН
КАРМАНЧИК 2 СЕЗОН 5 СЕРИЯ
27:21
Inter Production
Рет қаралды 538 М.
Build a Customer Support Bot | LangGraph
47:08
LangChain
Рет қаралды 19 М.
GraphRAG: LLM-Derived Knowledge Graphs for RAG
15:40
Alex Chao
Рет қаралды 56 М.
LangChain Fundamentals: Build your First Chain
14:13
Decoder
Рет қаралды 2,4 М.
LangChain Expression Language (LCEL) Explained!
25:38
James Briggs
Рет қаралды 14 М.
LangGraph: Multi-Agent Workflows
24:02
LangChain
Рет қаралды 40 М.
Building a self-corrective coding assistant from scratch
24:26
Eccentric clown jack #short #angel #clown
00:33
Super Beauty team
Рет қаралды 13 МЛН