
RAG with Python Cookbook: Learn principles of RAG with LLM and agentic AI, with 120+ recipes (English Edition)
Author(s): Deepak Dhyani (Author)
- Publisher: BPB Publications
- Publication Date: February 11, 2026
- Language: English
- Print length: 414 pages
- ISBN-10: 9365895731
- ISBN-13: 9789365895735
Book Description
Retrieval-augmented generation (RAG) has emerged as a critical technology in an era where organizations rely on accurate, context-aware AI systems. As LLMs expand across industries, RAG enables teams to build solutions that are more trustworthy, factual, and aligned with real-world knowledge, making it an essential skill for modern engineers, analysts, data scientists, and software developers.
This book provides a comprehensive, hands-on guide to master RAG with Python. It begins with the foundations of embeddings, vector databases, and retrieval pipelines, moving into prompt engineering, hybrid search strategies, and prompt engineering strategies, like chain-of-thought and MapReduce to enhance response quality. It then covers evaluation, optimization, and agentic workflows. Each chapter delivers clear explanations that help you preprocess data, build scalable pipelines, integrate LLMs, automate reasoning, and deploy end-to-end RAG systems tailored to real-world use cases.
By the end of this book, readers will be able to design, implement, and optimize robust RAG solutions with confidence. They will gain the skills to build retrieval-aware applications, enhance enterprise workflows, develop intelligent agents, and apply industry-proven techniques that directly strengthen their professional capabilities.
What you will learn
● Build reliable RAG pipelines using Python and modern frameworks.
● Apply effective document loading and splitting strategies.
● Generate high-quality embeddings for semantic retrieval tasks.
● Optimize vector store for scalable, fast and accurate information access.
● Engineer prompts tailored for retrieval-augmented workflows.
● Integrate LLMs efficiently into RAG systems.
● Implement agentic AI for dynamic, adaptive retrieval processes.
Who this book is for
This book is ideal for data scientists, AI engineers, software developers, solution architects, and technical product managers building LLM-powered applications. It guides professionals who want practical, production-ready techniques to design, optimize, troubleshoot, and deploy high-performance RAG systems in real-world environments.
Table of Contents
1. Foundation of Retrieval-augmented Generation
2. Document Loaders for RAG Pipelines
3. Document Splitting Techniques
4. Embedding Strategies for Vector Retrieval
5. Vector Stores for Semantic Retrieval
6. Efficient Retrieval from Vector Store
7. Response Generation with LLM in RAG Systems
8. Prompt Engineering for RAG Systems
9. Effective Search for RAG Systems
10. Implementing RAG with Chains
11. Agentic RAG with Dynamic Retrieval
Wow! eBook