LangGraph - SQL Agent - Let an LLM interact with your SQL Database

preview_player
Показать описание
MY COURSES:

In this video I will show you how to create a SQL Agent with LangGraph. We will build a simple system where an SQL is able to convert user queries into SQL statements and will than query the database:

Timestamps:
0:00 Introduction
1:27 Setup Database
4:19 Node Functions & Routing functions
15:06 Define Workflow
18:21 Test the agent
Рекомендации по теме
Комментарии
Автор

It is hard to describe how much better this is than the official langgraph tutorials. They seem to rely so much on a lot of implicit logic like "do this if there are no tool calls" instead of just being explicit about what does what. THANK YOU!

nullyberd
Автор

Love your work! Would you consider creating a detailed video on deploying RAGs using FastAPI at a production level? Specifically, I’d love to see how to maintain conversation IDs across multiple sessions, manage state for multiple chains, and set up a scalable infrastructure for concurrent user interactions.

savarbhasin
Автор

Nice timing of the video. Lots of usecases are trying to implement SQL agent

saurabhjain
Автор

You’re the best for so many reasons, a great creator and teacher, have learned a lot from you.

say.xy_
Автор

great work. Can't we have used ReAct Agent Pattern on this if we wrap tools below:
1. tool to choose the table
2. sql query creator tool (create and execute)
3. fix sql error (fix sql error and sql execute)
Any limitation of using react?

saurabhkanekar
Автор

First of all I would like to thank you personally for this video! Such an amazing and quality content again!! It gave me the basis for many ideas to implement!! 😊 I would like your opinion, if having both vector tables and simple ones in the same db could be a good practice for a chatbot project based on the one in the Azure LangChain course. Thank you again for your help!! 😊

peterc.
Автор

im loving your videos, it is realy helping me. When you are going to release the langgraph course?

mateusdelai
Автор

Thanks for the great tutorial. I have modified the code to run on a local LLM using Ollama and for the most part it is running well but I have faced some questions where the raw SQL result is correct but the final output of the function says the result was 'None'. It happens for example when I ask for the email address of the current user. The query runs and retrieves the email address successfully but the final answer says it couldn't find the email. Any idea how I can fix this?

tyron
Автор

love your work, really amazing, but i have a question hope you can reply or make video, so with langgraph, can we make a graph have 2 nodes father and son, both or 2 different chatbots, the entry is the father i can keep talking to him when ask him about talking to his son i will transition to the son chatbot (i made till here) but i want to keep talking to the son until he says goodbye so it moves to _end_ is that even possible (i just simplified it by father and son but the real use case are 2 agents and i can keep talking to 1 of them until he transition me to the next agent so i keep talking to him, ...)

immortalx
Автор

this will work for the most basic tables used here...but in the real world we have hundreds of tables with tons of relationships between each other

thegtlab
Автор

Hello, this video is absolutely amazing. I have the problem that my api key is incorrect and I was wondering if I could gep a bit of help.

Can you please help me understand all the variables and how to create the .env or if there is something else to be modified?

Thank you before hand!

GuillermoHoyoBravo
Автор

appreciate your work here, I am working on a similar requirement for my LLM app, however my SQL generator node does not follow the schema case sometimes and also some other issues like column names criteria not followed etc this leads to erroneous sql code, do we have some sort of standard rules that can be fed to prompt or any other way to fix this .

TANVEER
Автор

Can we add human in the loop such that if there is spelling errors in the user's question, then the llm can ask for clarification before proceeding further ?

ashishjohnsonburself
Автор

Hi, Working on a similar thing ...Do you think the langraph inbuilt memory component works well for this usecase?

pannagaj
Автор

Hi Markus, Is your Udemy LangGraph course still online? I cannot seem to find it.

DiegoMolinaingmecanico