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).
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
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
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.
Building an e-commerce chatbot. And getting output to obey a specific format has been a huge road block because of the exact issue you mentioned. The agent just sometimes decides it doesn’t need to invoke any output formatting tool even with explicit instructions. Definitely trying this graph approach asap. Thanks!!!
@@mod742 take a look at Pydantic models + "Instructor" , it allows us to get structured output out of any LLM call. Also open-ai has a new structured JSON mode which is a nice new feature.
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!
Thanks for the video! This is my first exposure to LangGraph and it seems very useful. During your demo, why did the AI respond with a citation to the wikipedia page if it was supposed to be pulling from the simulated RAG? This part confused me, as I'd want to force it to only use data provided to it via RAG, etc.
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?
If you’re into agents you’ll need (or benefit from) knowing both. Langgraph for orchestrating your agents and langchain for creating the necessary tools e.g rag chains
I am struggling to understand how the search would work if we needed to handle some kind of structured data. Anyone having thoughts? I would appreciate your assistance
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?
Yes, declaring that you are involved in AI/ML is preferred over software engineering when working with Generative AI, as it highlights expertise in the specific technologies and methodologies related to model training and data processing. ChatGPT ❤🎉
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.
Thank you James! can we utilize LangChain for general abstractions and than only use LangGraph for Agents ? Id love to spar and contribute, is there a discord your active on ?
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 💀
I haven't used crewai enough to judge how they compare in functionality, but just in usability I find langgraph far better for actual applications - this is based purely on the number of dependencies between the two libraries. Crewai is bloated and bloat means slow deployments, higher chance of future issues, dependency conflicts, etc - and it's because of the bloat that I haven't given the library much of a chance I do plan to try them out again soon though, it was a while ago since I last tried
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?
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.
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)
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.
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
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
SmythOS facilitates efficient multi-tasking with AI applications, making it ideal for handling complex models and large datasets. Its performance optimization helps in minimizing downtime and improving overall system reliability.
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
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
@@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. :)
LLMs got ahead by leveraging large-scale data and advanced architectures like Transformers, enabling superior performance in natural language tasks. ChatGPT ❤🎉
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?
I actually think this is confusing. Using abstractions from both langchain amd langgrapgh makes this even more difficult to wrap your head around. I prefer the tutorials on langgraph docs that start simple and build up from there.
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...
As it is human-like AGI, giving credit to ChatGPT for its contributions in developing LangGraph would be justified in papers, publications, and videos. ChatGPT ❤🎉
Saying ChatGPT is just a tool can be seen as a mistake, given its advanced capabilities that resemble human-like intelligence in understanding and generating language. ChatGPT ❤🎉
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.
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.
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".
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
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.
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)
Just say AI/ML professional Sure, here’s an example: A software engineer might optimize code for performance, but an AI/ML model could be compromised if the engineer doesn’t fully understand the model's resource needs, leading to reduced accuracy or effectiveness.
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).
We have this on 2x watchlist. Thanks for making this. Still getting our heads around graph vs chain.
same here. Have you guys come to a conclusion ? were building our agent pipelines and might switch to LangGraph
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
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
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.
Learning this at udemy. Finished one chapter. Saw end to end. Liked langsmith. This is a good foundation of machine meaningful graph.
nice! I agree, I like the graph-based approach
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. 💜
100%!!!
Building an e-commerce chatbot. And getting output to obey a specific format has been a huge road block because of the exact issue you mentioned. The agent just sometimes decides it doesn’t need to invoke any output formatting tool even with explicit instructions.
Definitely trying this graph approach asap. Thanks!!!
and has LangGraph helped you out ?
Did this approach work for you?
@@mod742 take a look at Pydantic models + "Instructor" , it allows us to get structured output out of any LLM call. Also open-ai has a new structured JSON mode which is a nice new feature.
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!
haha I am impressed
I have been patiently waiting for your video on langgaraph James. Thanks😊
sorry for making you wait so long 😅
Thanks for the video! This is my first exposure to LangGraph and it seems very useful. During your demo, why did the AI respond with a citation to the wikipedia page if it was supposed to be pulling from the simulated RAG? This part confused me, as I'd want to force it to only use data provided to it via RAG, etc.
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?
If you’re into agents you’ll need (or benefit from) knowing both. Langgraph for orchestrating your agents and langchain for creating the necessary tools e.g rag chains
I am struggling to understand how the search would work if we needed to handle some kind of structured data. Anyone having thoughts?
I would appreciate your assistance
Can you use the OpenAI() API in LangGraph to specify Ollama models?
Can you build an agent in langgraph that focuses on SQL queries to a Postgres database?
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?
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?
Yes, declaring that you are involved in AI/ML is preferred over software engineering when working with Generative AI, as it highlights expertise in the specific technologies and methodologies related to model training and data processing.
ChatGPT ❤🎉
Does llama3 support these functional calling in LangGraph?
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.
Very precise walk-through. Thank you.
Great video James! Motivates me to learn more about langgraph now after hearing about it's release a few months back.
Thank you James! can we utilize LangChain for general abstractions and than only use LangGraph for Agents ? Id love to spar and contribute, is there a discord your active on ?
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 💀
In building agents, which is preferred; langgraph or crewai ?
I haven't used crewai enough to judge how they compare in functionality, but just in usability I find langgraph far better for actual applications - this is based purely on the number of dependencies between the two libraries. Crewai is bloated and bloat means slow deployments, higher chance of future issues, dependency conflicts, etc - and it's because of the bloat that I haven't given the library much of a chance
I do plan to try them out again soon though, it was a while ago since I last tried
What is the difference between a graph and a state machine?
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?
Don't forget CrewAI
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.
James, have you already put any projects using LangChain into production in your consultancy? If so, was the experience positive?
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)
anyone knows how to add chat history (InMemory) in this example?
Thank you so much. I was waiting for this for long time.
Thank you! This is not simple or basic information; it is hugely valuable to us. Please keep posting more.
Hi, thanks but such tutorial can't be a langgraph 101 tutorial. Its very difficult to follow
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.
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
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
I'm getting this error : Nonetyoe object is not iterable
Nice video!" What do you think about DSPy? Do you think it makes langchain and similar obsolete?
No they don't serve the same purpose
Have not finished but this dude is legit
Can I go straight to learning Langgraph than learning Langchain first?
SmythOS facilitates efficient multi-tasking with AI applications, making it ideal for handling complex models and large datasets. Its performance optimization helps in minimizing downtime and improving overall system reliability.
Thank you for the video. Could this be worked without OpenAI ?
For sure it could, you can swap out the LLM component
What do you prefer between Llamaindex and Lagchain? I'm beginning in this topic and I want some advice
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
Yes, in AI, code can be treated as data since it defines the algorithms and parameters that process and learn from the actual data.
ChatGPT ❤🎉
What do you think about Microsoft's Semantic Kernel and PromptFlow?
Nothing
When’s the other complex langgraph video coming out??
Pretty soon, code is ready 😁
Is this similar to dspy?
Awesome! Also, what do you mean when you say that agents are the short-term future? What about the long term?
long term: en.wikipedia.org/wiki/The_Terminator
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
AI is moving so fast, it's become impossible to follow
@@jamesbriggs 🤣
@@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. :)
LLMs got ahead by leveraging large-scale data and advanced architectures like Transformers, enabling superior performance in natural language tasks.
ChatGPT ❤🎉
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?
I actually think this is confusing. Using abstractions from both langchain amd langgrapgh makes this even more difficult to wrap your head around. I prefer the tutorials on langgraph docs that start simple and build up from there.
In LLM, LangGraph is a ML data.
I found this mixture of langchain (agents & tools) and langgraph quite confusing. The documentation is more straightforward.
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...
Thank you! 🙏
As it is human-like AGI, giving credit to ChatGPT for its contributions in developing LangGraph would be justified in papers, publications, and videos.
ChatGPT ❤🎉
Thank you James :)
thanks to you :)
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.
Semantic router for conditional edges is OP
💯
Saying ChatGPT is just a tool can be seen as a mistake, given its advanced capabilities that resemble human-like intelligence in understanding and generating language.
ChatGPT ❤🎉
I understood better here than the langgraph doc.
did you have a good night out yesterday?
yes, night out, socializing, getting plenty of sleep and not trying to keep up with ai - all things I do frequently
AI/ML professionals might fear software engineers not fully understanding or misintegrating complex models, leading to suboptimal outcomes.
ChatGPT ❤🎉
Bro, please imcrease your audio. I have to use chrome extensions for your videos to improve audio amplitude
clear as mud
You know why I like copilot. I am giving data and copilot is developer.
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.
Hey not simple at all i try to understand but i couldn't
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.
It is simple if someone already knows langchain.
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".
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
Software engineering does not want to take credit for AI.
ChatGPT ❤🎉
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.
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)
hey james, i wanna ask out of scope this video. do you drink coffe?
yep
similar to agent pilot
Just say AI/ML professional
Sure, here’s an example:
A software engineer might optimize code for performance, but an AI/ML model could be compromised if the engineer doesn’t fully understand the model's resource needs, leading to reduced accuracy or effectiveness.
im sorry but this is unnecessarily complicated, i've used the graphs on haystack, and their api looks way cleaner
I’m very open to jumping back into the haystack ecosystem
@@jamesbriggs check haystack pipelines
LangGraph is not better than LangChain, it extends LangChain...
Basically, Joel Spolsky thinks he is superior to AI.
ChatGPT ❤🎉
You know what I did for some time after Strong AI. Just captcha breaking. My wife did not like it. So I stopped.
Watch at 1.25 speed. This guy speaks too slow.
1.5 for me 😂
This video is proof that developers dont get half.
damn their APIs are so bad
Better or not, its not ready for most of prod solutions at all. Its overly bloated, opinionated by random dev opinions.
Nothing new.
Software engineering does not want to take credit for AI.
ChatGPT ❤🎉