Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Unlocking Data with Generative AI and RAG
  • Table Of Contents Toc
Unlocking Data with Generative AI and RAG

Unlocking Data with Generative AI and RAG - Second Edition

By : Keith Bourne
5 (3)
close
close
Unlocking Data with Generative AI and RAG

Unlocking Data with Generative AI and RAG

5 (3)
By: Keith Bourne

Overview of this book

Developing AI agents that remember, adapt, and reason over complex knowledge isn’t a distant vision anymore; it’s happening now with Retrieval-Augmented Generation (RAG). This second edition of the bestselling guide leads you to the forefront of agentic system design, showing you how to build intelligent, explainable, and context-aware applications powered by RAG pipelines. You’ll master the building blocks of agentic memory, including semantic caches, procedural learning with LangMem, and the emerging CoALA framework for cognitive agents. You’ll also learn how to integrate GraphRAG with tools such as Neo4j to create deeply contextualized AI responses grounded in ontology-driven data. This book walks you through real implementations of working, episodic, semantic, and procedural memory using vector stores, prompting strategies, and feedback loops to create systems that continuously learn and refine their behavior. With hands-on code and production-ready patterns, you’ll be ready to build advanced AI systems that not only generate answers but also learn, recall, and evolve. Written by a seasoned AI educator and engineer, this book blends conceptual clarity with practical insight, offering both foundational knowledge and cutting-edge tools for modern AI development. *Email sign-up and proof of purchase required
Table of Contents (26 chapters)
close
close
Lock Free Chapter
1
Part 1: Introduction to Retrieval-Augmented Generation (RAG)
7
Part 2: Components of RAG
14
Part 3: Implementing Agentic RAG
25
Index

Preface

In the rapidly evolving landscape of artificial intelligence (AI), retrieval-augmented generation (RAG) has emerged as far more than a retrieval method. It has become the cornerstone of every modern generative AI system. RAG combines the strengths of information retrieval and generative AI models to create powerful applications that can access and utilize vast amounts of data to generate highly accurate, contextually relevant, and informative responses. Without a solid RAG foundation, building a robust AI application becomes nearly impossible.

As AI continues to permeate various industries and domains, understanding and mastering RAG has become increasingly crucial for developers, researchers, and businesses alike. RAG enables AI systems to go beyond the limitations of their training data and access up-to-date and domain-specific information, making them more versatile, adaptable, and valuable in real-world scenarios. But the role of RAG has expanded dramatically since this book’s first edition. Beyond simply retrieving content, RAG now underpins critical capabilities such as semantic caches, episodic memory retrieval, knowledge graphs, and the agentic memory systems that power today’s most sophisticated AI applications.

The AI landscape has shifted decisively toward agent-based architectures. While the first edition focused primarily on RAG as a standalone technique, modern generative AI applications are increasingly built around autonomous agents that reason, plan, and take actions. These agents rely on RAG as a core component of their functionality, using retrieval not just to answer questions but to maintain context across sessions, learn from past interactions, and continuously improve their performance. Memory can no longer remain a second-class citizen in AI system design. RAG is now positioned as the backbone of agentic memory, which in turn is central to how intelligent agents function.

This second edition reflects these fundamental shifts. You will learn how to design RAG so it seamlessly interacts with agentic memory, semantic caches, knowledge graphs, and other critical components of your AI workflow. Step by step, we will not only show you how to implement RAG but also explain the underlying concepts so you can adapt as the field evolves and unlock advanced capabilities for your AI applications.

As this book progresses, it serves as a comprehensive guide to the world of RAG, covering both fundamental concepts and the advanced techniques that define the current state of the art. It is filled with detailed coding examples showcasing the latest tools and technologies, such as LangChain, LangGraph, Neo4j, Chroma, and OpenAI’s latest models. We will cover essential topics, including vector stores, vectorization, vector search techniques, prompt engineering and design, knowledge graphs for structured reasoning, semantic caching for performance optimization, and the complete CoALA memory framework (working, episodic, semantic, and procedural memory) that enables agents to learn and adapt over time. Methods for evaluating and visualizing RAG outcomes round out the technical foundation.

The importance of learning RAG cannot be overstated. The core RAG principles from the first edition still matter, but only when viewed as part of today’s fast-moving AI ecosystem. Instead of treating RAG in isolation, this edition positions it as the foundation for agentic memory, semantic caching, graph-based retrieval, and other cutting-edge capabilities. RAG remains a key facilitator of customized, efficient, and insightful AI solutions, bridging the gap between generative AI’s potential and specific business needs. Whether you are a developer looking to enhance your AI skills, a researcher exploring new frontiers in AI, or a business leader seeking to leverage AI for growth and innovation, this book will provide you with the knowledge and practical skills necessary to harness the power of RAG and unlock the full potential of AI in your projects and initiatives. By mastering RAG as presented in this edition, you will be equipped to build the intelligent, adaptive, and continuously improving AI systems that define the next generation of applications.

The book is structured into three parts:

  • Part 1, Introduction to Retrieval-Augmented Generation (RAG), introduces you to the fundamentals of RAG, covering its core concepts, advantages, challenges, and practical applications across various industries. We will walk through implementing a complete RAG pipeline using Python, managing security risks in RAG applications, and building interactive user interfaces with Gradio. You will learn about the key components of RAG systems, including indexing, retrieval, generation, and evaluation, and discover how to optimize each stage for enhanced performance and user experience.
  • Part 2, Components of RAG, takes a deeper dive into the essential building blocks of RAG systems and how to implement them using LangChain. We will explore the crucial role of vectors and vector stores in enhancing RAG performance, techniques for similarity searching, and methods for evaluating RAG both quantitatively and with visualizations. You will also work with core LangChain components such as document loaders, text splitters, and output parsers to further optimize your RAG pipeline.
  • Part 3, Implementing Agentic RAG, builds directly on the foundation established in Parts 1 and 2. This foundation is essential because every advanced pattern covered here, from agents to graphs to caches to memory systems, builds directly on RAG as its core architecture. Without that structural integrity, these advanced patterns cannot perform reliably in production. With your foundation now securely in place, Part 3 prepares you for the cutting edge of agentic AI development. You will begin by integrating AI agents with LangGraph for more powerful control flows, then explore knowledge engineering through ontologies and graph-based RAG architectures that enable complex reasoning over structured data. The chapters progress into semantic caches for dramatically reducing latency and inference costs, followed by a deep dive into agentic memory systems, the most advanced expression of RAG you can implement, transforming stateless agents into intelligent systems capable of learning and adapting over time. Through hands-on code labs, you will implement the CoALA memory framework, build procedural memory with LangMem, and integrate complete memory architectures into your RAG pipelines.
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Unlocking Data with Generative AI and RAG
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon