Introduction
More than two years after OpenAI made large language models (LLMs) available to the general public through its ChatGPT browser interface, things haven’t slowed down. New models are being released all the time, and new methods are being developed to optimize retrieval, querying, inference, and evaluation.
But we’ve also seen some things converge rapidly, such as retrieval-augmented generation (RAG) becoming the paradigm for making generative AI useful for a wide range of applications, whether internal or customer facing. However, best practices for how to approach a successful RAG system in production are still being defined.
This guide takes the reader through the process of building a RAG system in the real world, from developing a local prototype to deploying it in production, monitoring it, and extending vanilla RAG into something much more complex. We do this using Haystack, the popular and battle-tested open source Python framework for building compound AI systems.
A modular framework is useful because it means you can combine existing components into powerful systems. Haystack includes an extensive library of such components that can be combined to form preprocessing workflows, RAG, search or document-processing pipelines, agents and question-answering systems, and more.
Enterprise users praise Haystack for its integrations with major model providers and databases, as well as its ability to add custom logic and functionality to a Haystack pipeline through custom ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access