Bourne, Keith | Unlocking Data with Generative AI and RAG | E-Book | www2.sack.de
E-Book

E-Book, Englisch, 606 Seiten

Bourne, Keith Unlocking Data with Generative AI and RAG

Learn AI agent fundamentals with RAG-powered memory, graph-based RAG, and intelligent recall
2. Auflage 2025
ISBN: 978-1-80638-164-7
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection

Learn AI agent fundamentals with RAG-powered memory, graph-based RAG, and intelligent recall

E-Book, Englisch, 606 Seiten

ISBN: 978-1-80638-164-7
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection



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

Bourne, Keith Unlocking Data with Generative AI and RAG jetzt bestellen!

Weitere Infos & Material


1


What Is Retrieval-Augmented Generation?


The field of artificial intelligence (AI) is rapidly evolving, with generative AI at its center, and at the heart of generative AI lies retrieval-augmented generation (RAG). RAG has established itself as a central component in almost all production AI implementations, harnessing the intelligence and text generation capabilities of large language models (LLMs) and integrating them with a company’s internal data to enhance organizational operations significantly. Whether powering the most basic chatbot or the most advanced autonomous agent, RAG is an indispensable core component. Without it, none of these approaches can function effectively. This book focuses on numerous aspects of RAG, taking you from that basic chatbot implementation, all the way to the end, where we will build an agent that autonomously adapts its approach through every interaction, using RAG at its core to self-learn and self-heal. In this way, we will showcase the full power and application of RAG in modern generative AI development. As this book progresses, we will outline the potential of RAG in the enterprise, suggesting how it can make AI applications more responsive and smarter, aligning them with your organizational objectives. RAG has become a key facilitator of customized, efficient, and insightful AI solutions, bridging the gap between generative AI’s potential and your specific business needs. Our exploration of RAG will encourage you to unlock the full potential of your corporate data, paving the way for you to enter the era of AI-driven innovation.

In this chapter, we will cover the following topics:

  • Understanding RAG – basics and principles
  • RAG vocabulary
  • Understanding vectors
  • Implementing RAG in AI applications
  • Comparing RAG with conventional generative AI
  • Comparing RAG with model fine-tuning
  • The architecture and stages of RAG systems

By the end of this chapter, you will have a solid foundation in the core RAG concepts and understand the immense potential it offers organizations so that they can extract more value from their data and empower their LLMs. Let’s get started!

Free benefits with your book


Your purchase includes a free PDF copy of this book along with other exclusive benefits. Check the section in the Preface to unlock them instantly and maximize your learning experience.

Understanding RAG – basics and principles


Modern-day LLMs are impressive, but they have never seen your company’s private data (hopefully!). This means the ability of an LLM to help your company fully utilize its data is very limited. This very large barrier has given rise to the concept of RAG, where you are using the power and capabilities of the LLM but combining it with the knowledge and data contained within your company’s internal data repositories. This is the primary motivation for using RAG: to make new data available to the LLM and significantly increase the value you can extract from that data.

Beyond internal data, RAG is also useful in cases where the LLM has not been trained on the data, even if it is public, such as the most recent research papers or articles about a topic that is strategic to your company. In both cases, we are talking about data that was not present during the training of the LLM. You can have the latest LLM trained on the most tokens ever, but if that data was not present for training, then the LLM will be at a disadvantage in helping you reach your full productivity.

Ultimately, this highlights the fact that, for most organizations, it is a central need to connect new data to an LLM. RAG is the most popular paradigm for doing this. This book focuses on showing you how to set up a RAG application with your data, as well as how to get the most out of it in various situations. We intend to give you an in-depth understanding of RAG and its importance in leveraging an LLM within the context of a company’s private or specific data needs.

Now that you understand the basic motivations behind implementing RAG, let’s review some of the advantages of using it.

Advantages of RAG


Some of the potential advantages of using RAG include improved accuracy and relevance, customization, flexibility, and expanding the model’s knowledge beyond the training data. Let’s take a closer look:

  • Improved accuracy and relevance: RAG can significantly enhance the accuracy and relevance of responses that are generated by LLMs. RAG fetches and incorporates specific information from a database or dataset, typically in real time, and ensures that the output is based on both the model’s pre-existing knowledge and the most current and relevant data that you are providing directly.
  • Customization: RAG allows you to customize and adapt the model’s knowledge to your specific domain or use case. By pointing RAG to databases or datasets directly relevant to your application, you can tailor the model’s outputs so that they align closely with the information and style that matters most for your specific needs. This customization enables the model to provide more targeted and useful responses.
  • Flexibility: RAG provides flexibility in terms of the data sources that the model can access. You can apply RAG to various structured and unstructured data, including databases, web pages, documents, and more. This flexibility allows you to leverage diverse information sources and combine them in novel ways to enhance the model’s capabilities. Additionally, you can update or swap out the data sources as needed, enabling the model to adapt to changing information landscapes.
  • Expanding model knowledge beyond training data: LLMs are limited by the scope of their training data. RAG overcomes this limitation by enabling models to access and utilize information that was not included in their initial training sets. This effectively expands the knowledge base of the model without the need for retraining, making LLMs more versatile and adaptable to new domains or rapidly evolving topics.
  • Removing hallucinations: The LLM is a key component within the RAG system. LLMs have the potential to provide wrong information, also known as hallucinations. These hallucinations can manifest in several ways, such as made-up facts, incorrect facts, or even nonsensical verbiage. Often, the hallucination is worded in a way that can be very convincing, causing it to be difficult to identify. A well-designed RAG application can reduce hallucinations much more easily than when directly using an LLM.

With that, we’ve covered the key advantages of implementing RAG in your organization. Next, let’s discuss some of the challenges you might face.

Challenges of RAG


There are some challenges to using RAG as well, which include dependency on the quality of the internal data, the need for data manipulation and cleaning, computational overhead, more complex integrations, and the potential for information overload. Let’s review these challenges and gain a better understanding of how they impact RAG pipelines and what can be done about them:

  • Dependency on data quality: When talking about how data can impact an AI model, the saying in data science circles is . This means that if you give a model bad data, it will give you bad results. RAG is no different. The effectiveness of RAG is directly tied to the quality of the data it retrieves. If the underlying database or dataset contains outdated, biased, or inaccurate information, the outputs generated by RAG will likely suffer from the same issues.
  • Need for data manipulation and cleaning: Data in the recesses of the company often has a lot of value to it, but it is not often in good, accessible shape. For example, data from PDF-based customer statements needs a lot of massaging so that it can be put into a format that can be useful to a RAG pipeline.
  • Computational overhead: A RAG pipeline introduces a host of new computational steps into the response generation process, including data retrieval, processing, and integration. LLMs are getting faster every day, but even the fastest response can be more than a second, and some can take several seconds. If you combine that with other data processing steps, and possibly multiple LLM calls, the result can be a very significant increase in the time it takes to receive a response. This all leads to increased computational overhead, affecting the efficiency and scalability of the entire system. As with any other IT initiative, an organization must balance the benefits of enhanced accuracy and customization against the resource requirements and potential latency introduced by these additional processes.
  • Data storage explosion – complexity in integration and maintenance: Traditionally, your data resides in a data source that’s queried in various ways to be made available to your internal and external systems. But with RAG, your data resides in multiple forms and locations, such as vectors in a vector database, that represent the same data, but in a different format. Add in the complexity of connecting these various data sources to LLMs and relevant...



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.