MENU

Fun & Interesting

Chat with Multiple/Large SQL and Vector Databases using LLM agents (Combine RAG and SQL-Agents)

Video Not Working? Fix It Now

In this tutorial, we’ll build an LLM-powered agentic graph using LangChain and LangGraph to combine RAG (Retrieval-Augmented Generation) with SQL agents. The result is an automated chatbot capable of interacting with both vector and SQL databases. I’ll also explain three strategies for designing SQL agents that can handle large SQL databases efficiently. Key features of our system: 1. Manages unstructured data with RAG and structured data with SQL agents. 2. Integrates web search when needed. 3. Automatically selects the best tool for each task. 4. Scalable to handle large databases. 5. Easily connects to multiple databases. 🚀 GitHub Repository: Advanced Q&A and RAG series: https://github.com/Farzad-R/Advanced-QA-and-RAG-Series/tree/main 00:00:00 Intro 00:03:41 Project overview 00:06:51 Project demo 00:10:22 Langsmith demo 00:13:01 RAG vs SQL-agents scenarios 00:19:47 Project schema 00:21:51 Model (LLM) selection 00:22:52 Key concepts 00:25:40 GitHub and project walk-through 00:29:27 Custom agent and function (tool) calling 00:37:10 Tavily search tool 00:39:09 Prepare vector DBs for the RAG tools 00:47:43 RAG tool design 00:52:45 SQL-Agent for small databases 00:56:19 SQL-Agent for Large databases 01:09:45 Graph design using LangChain and LangGraph 01:20:10 Chatbot code explanation (configs, memory, backend) 01:27:50 Testing the chatbot with 5 tools 1:32:55 Add/Remove tools to the chatbot Frameworks: #langchain #langgraph #langsmith #openai #chatbot #rag #llm #agent #python #gpt

Comment