Agentic RAG with LangGraph
Published by O'Reilly Media, Inc.
Building adaptive RAG pipelines using AI agents
Course outcomes
- Understand how to set up a functional retrieval-augmented workflow in LangGraph and integrate it with LLMs
- Recognize when and how to use agentic strategies (query analysis, reflection, corrective steps) to enhance retrieval and generation
- Design robust, multistep pipelines that adapt to varying queries, correct mistakes on the fly, and ensure high-quality AI outputs
Join expert Sajal Sharma to get an in-depth exploration of agentic retrieval-augmented generation (RAG) with a focus on LangGraph—a workflow engine that helps implement RAG pipelines using modular graph steps. While traditional RAG workflows rely on a static retrieve-then-generate approach, agentic RAG represents a significant evolution in retrieval-augmented generation, introducing autonomy, reasoning, and adaptability to improve how AI systems retrieve and generate information. You’ll learn how to design and implement agentic RAG pipelines that actively decide which knowledge source to query, rewrite retrieval prompts, reflect on the relevance of retrieved results, and correct themselves if necessary. You’ll come away with hands-on experience building these pipelines, ready to apply them in real-world applications ranging from knowledge-based Q&A to complex research queries.
What you’ll learn and how you can apply it
- Understand the fundamentals of RAG
- Learn agentic RAG design patterns for improved AI retrieval and generation
- Construct end-to-end pipelines that decide retrieval strategies, choose data sources, and correct mistakes on the fly
- Explore common pitfalls (such as increased latency, cost, or complexity) introduced by agentic RAG and learn practical ways to address them
This live event is for you because...
- You’re an AI or machine learning engineer who wants to enhance your existing RAG workflows and make them more context-aware.
- You’re a data scientist or AI researcher who wants to explore agentic strategies for RAG and push the boundaries of what traditional RAG systems can achieve.
- You’re a software engineer looking to move into an AI engineer role or to leverage AI agents in your RAG pipelines.
Prerequisites
- Intermediate knowledge of programming using Python
- Basic understanding of retrieval-augmented generation (RAG) systems
- Some familiarity with building AI applications using frameworks such as LangChain and LangGraph
Recommended preparation:
- Have a Python environment available to run Jupyter notebooks (locally or through an online service like Google Colab)
- Have an OpenAI API key (to participate in exercises)
- Have a free Tavily API key (to participate in exercises)
- Course materials are available at this Github repository
Recommended follow-up:
- Explore Building AI Agents with LangGraph (on-demand course)
- Take Building Reliable RAG Applications (live online course with Sarang Sanjay Kulkarni)
- Read AI Engineering (book)
- Read Hands-On RAG for Production (book)
- Read RAG with Python Cookbook (book)
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Introduction to RAG with LangGraph (75 minutes)
- Presentation: Recap of practical RAG concepts (embeddings, semantic search, vector databases, ingestion pipeline); comparison of frameworks for agentic RAG (LangGraph and LlamaIndex); basic LangGraph concepts (nodes, edges, and graphs); architecture of a simple RAG pipeline in LangGraph, using a graph-based approach to break down and visualize RAG steps
- Hands-on exercise: Create a basic RAG application using Python, LangGraph, and ChromaDB
- Group discussion: What limitations have you encountered with traditional RAG?
- Q&A
- Break
Agentic patterns for RAG (75 minutes)
- Presentation: Why go “agentic”?; limitations of traditional RAG; agentic decision points; key agentic patterns (query analysis, tool selection, reflection); how LangGraph can incorporate agentic steps (agent nodes, conditional edges, looping workflows)
- Hands-on exercises: Implement modular “agent” nodes in LangGraph to handle query analysis and an end-to-end single agent RAG using a router agent; compare response quality with previous implementation
- Q&A
- Break
Agentic RAG pipelines and production challenges (90 minutes)
- Presentation and demo: Designing complex agentic RAG workflows—combining patterns into end-to-end pipelines; corrective and adaptive RAG; challenges and mitigation strategies for agentic RAG
- Hands-on exercises: Build a corrective RAG architecture to improve response quality by filtering irrelevant results; build a comprehensive multi-agent adaptive RAG architecture that can plan an execution strategy to answer complex, multi-hop queries
- Q&A
Your Instructor
Sajal Sharma
Sajal Sharma is an AI engineer and technology leader with over eight years of experience in AI/ML, specializing in natural language processing. He works at Menyala, a venture studio in Singapore, where he focuses on building AI-first products and shaping technology strategies. Previously, he led AI initiatives at various consulting and product companies, developing innovative AI solutions across industries. His on-demand course, Building AI Agents with LangGraph, is available on the O’Reilly learning platform. Sajal has delivered a guest lecture at Yale University and has been a mentor for Udacity and the University of Melbourne, where he guided students in machine learning and AI. He holds a master’s degree in information technology from the University of Melbourne.