Skip to Content
Retrieval-Augmented Generation in Production with Haystack
book

Retrieval-Augmented Generation in Production with Haystack

by Skanda Vivek
April 2025
Intermediate to advanced
132 pages
3h 1m
English
O'Reilly Media, Inc.
Content preview from Retrieval-Augmented Generation in Production with Haystack

Chapter 1. Introduction to RAG with Haystack

In 2023, a profound transformation occurred. Executives in organizations of all sizes and across all sectors became focused on whether they were capitalizing on the latest advancements in generative AI (GenAI) and if their competitors were pursuing a similar trajectory. Just as the internet revolution and the subsequent smartphone revolution radically reshaped the software development landscape, AI is fueling an analogous paradigm shift. Companies are fundamentally reimagining how customers experience their products.

For example, many organizations are leveraging large language models (LLMs) to unlock data-centric insights into their customers. These LLMs include the OpenAI GPT models, Anthropic’s Claude models, Google Gemini, Meta’s Llama models, Mistral, and more. However, an engine alone cannot propel a vehicle. State-of-the-art LLMs like GPT-4 excel at language-based tasks due to their a priori knowledge, acquired through training on a vast representative corpus of documents (e.g., websites, articles, and books) and tasks involving these documents.

While LLMs demonstrate exceptional out-of-the-box performance, their inherent value is limited. Enterprise use cases involve adapting these LLMs to the organization’s particular data sources and customer workflows. One approach involves feeding the LLM this custom context as part of the input. However, this method presents several challenges, including latency, cost, and model forgetfulness ...

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

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Building AI Agents with LangGraph: Creating Agentic Applications with Large Language Models and LangGraph

Building AI Agents with LangGraph: Creating Agentic Applications with Large Language Models and LangGraph

Sajal Sharma
Developing Apps with GPT-4 and ChatGPT

Developing Apps with GPT-4 and ChatGPT

Olivier Caelen, Marie-Alice Blete

Publisher Resources

ISBN: 9781098165161Errata Page