LangGraph 101: it's better than LangChain

  Рет қаралды 35,308

James Briggs

James Briggs

Күн бұрын

LangGraph is a special LangChain-built library that builds intelligent AI Agents using graphs. Ie, agentic state machines. It allows us to build more powerful and flexible AI agents than what we can build using just the core library, LangChain.
In this video, we'll see how to build agents with LangGraph and OpenAI.
📌 Code:
github.com/pinecone-io/exampl...
🌲 Subscribe for Latest Articles and Videos:
www.pinecone.io/newsletter-si...
👋🏼 AI Consulting:
aurelio.ai
👾 Discord:
/ discord
Twitter: / jamescalam
LinkedIn: / jamescalam
#ai #langchain #artificialintelligence #nlp #chatbot #openai
00:00 Intro to LangGraph
00:52 Graphs in LangGraph
03:00 More Complex LangGraph Agent
08:12 LangGraph Graph State
14:00 LangGraph Agent Node
17:08 Forcing a Specific LLM Output
20:00 Building the Graph
23:23 Using our Agent Graph
28:32 LangGraph vs LangChain

Пікірлер: 81
@nelsonatp8957
@nelsonatp8957 23 күн бұрын
Hi James, thanks for the great content. I’m curious about why you went down the road of having the graph playing with the agent state and tools rather than just doing things directly in the langgraph nodes ? I’m seeing less and less examples from langchain using so called « agent » with langgraph and also tools, they only use it for Tavily because they have a langchain prebuilt tool, and i wonder what is your opinion on agents being soon obsolete ? And tools just used for built-in tools wrappers from langchain rather than custom tools
@irkedoff
@irkedoff 22 күн бұрын
Thank you for being thorough with very simple and less simple examples. It made it easy to understand and allowed me to run with the knowledge. 💜
@kubasmide223
@kubasmide223 24 күн бұрын
I have been patiently waiting for your video on langgaraph James. Thanks😊
@jamesbriggs
@jamesbriggs 24 күн бұрын
sorry for making you wait so long 😅
@victorsilva-jb2sf
@victorsilva-jb2sf 17 күн бұрын
Hi James, thanks for the content. I'm trying to use langgraph with Vertex AI with the Gemini-pro model. Do you have any suggestions on how to tackle this task? I'm trying to adapt the code you made.
@getcoai
@getcoai 9 күн бұрын
We have this on 2x watchlist. Thanks for making this. Still getting our heads around graph vs chain.
@stevechiou5760
@stevechiou5760 17 күн бұрын
Thank you for the video. I have a question about how "query_agent_runnable" decide is an error message or not? What's the criteria of the decision?
@law_wu
@law_wu 21 күн бұрын
Great video James! Motivates me to learn more about langgraph now after hearing about it's release a few months back.
@Windchimesandrain
@Windchimesandrain 24 күн бұрын
thanks for this video ! not related to this but while using langchain agent where it is invoking a function which makes openai call as an api in django application getting timeout error in production env . any inputs on how this can be fixed
@jamesbriggs
@jamesbriggs 24 күн бұрын
if you're streaming maybe you are not closing the stream correctly? Otherwise I'm not sure to be honest - it does sounds like a codebase-specific issue rather than any particular behavior exclusive to using django+openai api together
@imposternaruto
@imposternaruto 18 күн бұрын
i am really struggling to find a single example that doesn't use open ai function calling (llm.bind, convert_to_openai_ helper functions). can you PLEASE help me out. I specifically am looking for a single agent and multi agent architecture with detailed explanation on the state, interactions with runnables like chat history, geared towards RAG
@justdavebz
@justdavebz 15 күн бұрын
Does llama3 support these functional calling in LangGraph?
@diegocalderon3221
@diegocalderon3221 7 күн бұрын
Can you use the OpenAI() API in LangGraph to specify Ollama models?
@justinhall4855
@justinhall4855 23 күн бұрын
Great content, as always. Very random note: ive been to bali so many times (i work in tech in Singapore) and id recognise a bali villa door handle anywhere! 😂😂😂 Enjoy!
@jamesbriggs
@jamesbriggs 22 күн бұрын
haha I am impressed
@andy111007
@andy111007 20 күн бұрын
Does ```@tool("final_answer") def final_answer_tool( answer: str, source: str ): """Returns a natural language response to the user in `answer`, and a `source` which provides citations for where this information came from. """ return ""``` help in parse my answer?. What if the client wants in some other format, how to use within LangGraph?
@maciejzieniewicz4301
@maciejzieniewicz4301 22 күн бұрын
I agree Graphs are excellent choice for Agents and also good for the cost reduction policy. Langgraph is quite complex though. If you want to play with easier solution you can check autogen graph, it is (for now) more generic in use, at least for a fast prototyping.Thanks for this video.
@themax2go
@themax2go 20 күн бұрын
my q now is: does it still make sense to learn (theory, modify existing apps, experiment with, write new apps with) langchain? or rather just ignore and just start w/ langgraph? from a beginner's perspective (no prior langchain exp). what's the recommendation and its justification?
@lLvupKitchen
@lLvupKitchen 15 күн бұрын
Thanks for the video! As a noob, I’m lost between whether I should learn langgraph or autogen or agency swarm. I learned to use autogen but it seems to lack the minimum control I need to build something reliable. To learn everything…takes to much time for me as I’m totally new to the computer language, and want to build something that I need rather than learning the basics for multiple libraries. Will langgraph the go-to library for the time being? What would you recommend for people like me?
@RevMan001
@RevMan001 8 күн бұрын
Don't forget CrewAI
@SolidBuildersInc
@SolidBuildersInc 18 күн бұрын
This is very interesting. Is there a tool to reverse engineer this Agent solution ? Can Nodes and Edges be mathematically defined like a enforced index for a DB? Appreciate any feedback and Thank you for sharing.
@WhylerGame
@WhylerGame 17 күн бұрын
Someone may correct me but I think LangGraph's potential resides mainly in the cyclical graphs. For instance for making, self-reflective agent. When making Directed acyclic graph (DAG) pipelines (like you did), it's better to use chains (Langchain).
@MirGlobalAcademy
@MirGlobalAcademy 4 күн бұрын
Thank you so much. I was waiting for this for long time.
@andrewandreas5795
@andrewandreas5795 24 күн бұрын
Nice video!" What do you think about DSPy? Do you think it makes langchain and similar obsolete?
@stephanembatchou5300
@stephanembatchou5300 19 күн бұрын
No they don't serve the same purpose
@74Gee
@74Gee 23 күн бұрын
I like the additional flexibility of langchart. This is just crying out for a gui builder using Graphviz or tikzit - or more even node red. I can see an ecosystem growing around something like that with people submitting nodes and structures.
@AndreiSheard
@AndreiSheard 9 күн бұрын
God bless your soul for doing this tutorial in Colab!! I'm using Crew AI in colab and my only hardware atm is a Ipad pro 2020 and a Samsung s23 ultra. Seriously: this is a boon for finding a solution for my...solution 💀
@danielschoenbohm
@danielschoenbohm 24 күн бұрын
Awesome! Also, what do you mean when you say that agents are the short-term future? What about the long term?
@jamesbriggs
@jamesbriggs 24 күн бұрын
long term: en.wikipedia.org/wiki/The_Terminator
@jamesbriggs
@jamesbriggs 24 күн бұрын
but fr, I have no idea on long term - I don't think it's possible to predict where things are going, so anything beyond the next 1-2 years (or even earlier) would be pure guesswork from me
@coinspeednews4703
@coinspeednews4703 24 күн бұрын
AI is moving so fast, it's become impossible to follow
@danielschoenbohm
@danielschoenbohm 23 күн бұрын
@@jamesbriggs 🤣
@danielschoenbohm
@danielschoenbohm 23 күн бұрын
​@@jamesbriggs Yes I agree. I have no idea where things are headed, but one thing is certain: agents enable intelligence to act. What that will look like, I don't know. I'm also not sure if we'll call them "agents" in the future. My dad probably won't. :)
@matheusdonato6694
@matheusdonato6694 23 күн бұрын
James, have you already put any projects using LangChain into production in your consultancy? If so, was the experience positive?
@jamesbriggs
@jamesbriggs 22 күн бұрын
yes we've done a few - all good so far earlier langchain was troublesome, but most of the issues we had back then have been resolved (primarily stability + excessive dependencies)
@gabrielnieves4912
@gabrielnieves4912 20 күн бұрын
Have not finished but this dude is legit
@matthewwalker7063
@matthewwalker7063 23 күн бұрын
Is this similar to dspy?
@user-um2kn6mn1j
@user-um2kn6mn1j 24 күн бұрын
What do you prefer between Llamaindex and Lagchain? I'm beginning in this topic and I want some advice
@jamesbriggs
@jamesbriggs 24 күн бұрын
I've never had any need to go beyond the langchain ecosystem, but I also haven't used llama-index enough to know if I'm missing out on anything big there
@alivecoding4995
@alivecoding4995 16 күн бұрын
What do you think about Microsoft's Semantic Kernel and PromptFlow?
@generationgap416
@generationgap416 3 күн бұрын
Nothing
@lezgoverci
@lezgoverci 20 күн бұрын
Can I go straight to learning Langgraph than learning Langchain first?
@user-ie9co7ex6s
@user-ie9co7ex6s 24 күн бұрын
Thank you James :)
@jamesbriggs
@jamesbriggs 24 күн бұрын
thanks to you :)
@abdullahsiddique6393
@abdullahsiddique6393 24 күн бұрын
Semantic router for conditional edges is OP
@jamesbriggs
@jamesbriggs 23 күн бұрын
💯
@lavamonkeymc
@lavamonkeymc 8 сағат бұрын
When’s the other complex langgraph video coming out??
@jamesbriggs
@jamesbriggs 4 сағат бұрын
Pretty soon, code is ready 😁
@generationgap416
@generationgap416 9 күн бұрын
Why did you say agents are short-term leaders of AI? What is your definition of an agent? Is an agent a thing or is agentic workflow an approach to building intelligent systems?
@ChrizzeeB
@ChrizzeeB 8 күн бұрын
off topic - but have you noticed you write ESE than add an "l" -> ELSE SEARH, then add a "c" -> SEARCH how's your brain working to do that? I analyze human language production as if it were ML.. so I'm curious how this is happening...
@alivecoding4995
@alivecoding4995 16 күн бұрын
I found this mixture of langchain (agents & tools) and langgraph quite confusing. The documentation is more straightforward.
@USBEN.
@USBEN. 22 күн бұрын
The volume of your videos is way lower than standard youtube videos, would be good if you could up the levels some more next time.
@jbexta
@jbexta 22 күн бұрын
similar to agent pilot
@arcfired3615
@arcfired3615 24 күн бұрын
did you have a good night out yesterday?
@jamesbriggs
@jamesbriggs 23 күн бұрын
yes, night out, socializing, getting plenty of sleep and not trying to keep up with ai - all things I do frequently
@rohanchoudhary672
@rohanchoudhary672 21 күн бұрын
Bro, please imcrease your audio. I have to use chrome extensions for your videos to improve audio amplitude
@viorelteodorescu
@viorelteodorescu 22 күн бұрын
There is no such thing as a graph with a conditional edge. What you are describing is normal conditional programming. Maybe a state machine if all the transitions are rigorously set.
@jamesbriggs
@jamesbriggs 22 күн бұрын
yeah that syntax is probably my least favorite part of langgraph, and it feels overly complex, ie you must define tools + router + "conditional edge" (using LangChain syntax)
@natekryn9840
@natekryn9840 23 күн бұрын
This video is proof that developers dont get half.
@azero79
@azero79 24 күн бұрын
im sorry but this is unnecessarily complicated, i've used the graphs on haystack, and their api looks way cleaner
@jamesbriggs
@jamesbriggs 23 күн бұрын
I’m very open to jumping back into the haystack ecosystem
@azero79
@azero79 12 күн бұрын
@@jamesbriggs check haystack pipelines
@generationgap416
@generationgap416 24 күн бұрын
Stop saying it's pretty simple. It's not simple for those people who are seeing this for the first time. I Like your content but be mindful of newbies because you will discourage them.
@user-en4ek6xt6w
@user-en4ek6xt6w 24 күн бұрын
Hey not simple at all i try to understand but i couldn't
@endlessvoid7952
@endlessvoid7952 24 күн бұрын
It’s all relative. He can’t explain every concept at every level in every video. Sometimes you need to assume some level of audience understanding or you’ll never discuss anything. What’s simple for you won’t be for someone else, and that’s ok.
@robertmazurowski5974
@robertmazurowski5974 23 күн бұрын
It is simple if someone already knows langchain.
@samyio4256
@samyio4256 23 күн бұрын
Ask a programmer what hes able to do, he will say: not much, a little here, a little there. In reality that programmer learned so much that he forgot how much he learned and how complicated it was. When that programmer learns something new it funds on that gigantic, mostly unconciouse base, built before, which is expressed by "thats pretty simple".
@jamesbriggs
@jamesbriggs 23 күн бұрын
Good point, I have been using langchain and related libraries for well over a year now. For anyone reading who doesn’t find it simple, it’s not (my bad) and it takes some time to learn. However, don’t be discouraged - after using the tools for a while, you’ll end up looking back at this eventually and thinking of it as “simple” too, but to get there it requires time and practice, my advice would be to try building with it, the more you build the more you will learn and understand If anyone has feedback on what they find most confusing I’d love to hear it and I’d be happy to put together some more content to focus on what you all struggle with most
@8eck
@8eck 23 күн бұрын
LangGraph is not better than LangChain, it extends LangChain...
@frazuppi4897
@frazuppi4897 8 күн бұрын
damn their APIs are so bad
@deeplearningpartnership
@deeplearningpartnership 15 күн бұрын
Watch at 1.25 speed. This guy speaks too slow.
@gambaweb
@gambaweb 11 күн бұрын
1.5 for me 😂
Semantic Chunking for RAG
29:56
James Briggs
Рет қаралды 12 М.
Learn LangGraph - The Easy Way
28:29
Menlo Park Lab
Рет қаралды 11 М.
The Noodle Stamp Secret 😱 #shorts
00:30
Mr DegrEE
Рет қаралды 39 МЛН
ISSEI funny story😂😂😂Strange World | Pink with inoCat
00:36
ISSEI / いっせい
Рет қаралды 28 МЛН
didn't want to let me in #tiktok
00:20
Анастасия Тарасова
Рет қаралды 11 МЛН
GraphRAG: LLM-Derived Knowledge Graphs for RAG
15:40
Alex Chao
Рет қаралды 43 М.
host ALL your AI locally
24:20
NetworkChuck
Рет қаралды 495 М.
AI Leader Reveals The Future of AI AGENTS (LangChain CEO)
16:22
Matthew Berman
Рет қаралды 75 М.
What is LangChain?
8:08
IBM Technology
Рет қаралды 115 М.
LangGraph Crash Course with code examples
39:01
Sam Witteveen
Рет қаралды 52 М.
26 Incredible Use Cases for the New GPT-4o
21:58
The AI Advantage
Рет қаралды 129 М.
INSANE OpenAI News: GPT-4o and your own AI partner
28:48
AI Search
Рет қаралды 464 М.
Building a self-corrective coding assistant from scratch
24:26
The power button can never be pressed!!
0:57
Maker Y
Рет қаралды 43 МЛН
3D printed Nintendo Switch Game Carousel
0:14
Bambu Lab
Рет қаралды 2,3 МЛН
Дени против умной колонки😁
0:40
Deni & Mani
Рет қаралды 838 М.
Наушники Ой🤣
0:26
Listen_pods
Рет қаралды 493 М.
Fiber kablo
0:15
Elektrik-Elektronik
Рет қаралды 5 МЛН