liveBook · Manning

Retrieval-augmented generation

As explained in Enterprise RAG

A RAG system combines information retrieval with language-model generation to answer questions using retrieved evidence.

Retrieval-augmented generation (RAG) answers a plain-language question by retrieving relevant business data and giving the question, prompt, and retrieved material to a large language model (LLM). It is suited to questions such as a product price, project status, sales totals, or a support issue, where the answer should draw on current databases, documents, or applications rather than model knowledge alone. section 1.0 section 1.6

Figure 1.2 In a RAG system, the user question, the prompt, and the retrieved data are combined and sent to an LLM, which generates an answer using all that input information.

The core flow joins the user question, prompt, and retrieved data before the LLM generates its answer. section 1.0

A minimal RAG pipeline embeds a question, runs vector search for similar content, and asks an LLM to answer from the result. That prototype is fast and accessible, but similarity alone can retrieve the wrong record, miss the user’s context, or support a hallucinated answer. It is appropriate for simple queries, not a dependable default for broad enterprise data. section 1.1 section 1.2

Enterprise RAG extends retrieval and generation into an operational system that can handle varied users, data, and failure cases:

  • Prepare unstructured documents for retrieval: extract PDF text, then split it into meaningful chunks such as headings, paragraphs, or bounded word ranges before indexing in a vector database. section 1.5
  • Transform structured data into searchable records alongside document ingestion, so retrieval can use more than one kind of company source. section 1.5
  • Build retrieval from the two search services and agents, then summarize retrieved material into the returned answer. section 1.5
  • Add validation, query rewriting, asynchronous agents, feedback handling, and attention to input limits, database performance, and context accuracy. section 1.1 section 1.2

Product-manual question answering

An electronics seller can ingest hundreds of product-manual PDFs and answer specific questions such as the battery life of XM5 headphones or the warranty period of a hair dryer. Chunking manuals before retrieval helps narrow the information supplied to the LLM instead of passing huge unstructured documents, which can waste tokens and produce poorer answers. section 1.5

The business value is faster access to dispersed information: support staff can resolve complex issues without manually searching multiple databases, teams can use shared feedback and records, and decision-makers can pull together relevant market or operational data quickly. Reliability remains conditional on the information available to the system; a request for popularity cannot be answered from a products database that contains no popularity data. section 1.3 section 6.17

Inventory and operational decisions

A coffee roaster can ask whether Ethiopian beans are depleted and when to reorder. The system combines a PDF purchase log with sales records to identify recent stock movement and supplier lead time. Similar workflows can summarize sales, P&L, and revenue reports, or compile questions raised during a competitor’s earnings call. section 1.4

How Enterprise RAG covers it

How deep it goes
Builds the full system workflow from evaluation and ingestion through retrieval agents and answer generation, while flagging production design constraints.
Examples
Uses product lookup, coffee inventory, earnings calls, hospital records, financial reports, and electronics manuals as retrieval tasks.
What it assumes
Teaches the RAG workflow from a simple prototype while using Python libraries for PDF text extraction in implementation.
What you can do after
Build it from scratch as an enterprise RAG question-answer system with evaluation, ingestion, retrieval, and generation stages.
How it connects
Connects embeddings, vector databases, document chunking, structured-data ingestion, LLMs, validation, query rewriting, agents, and evaluation.

Also explained in

Compare how 46 books explain retrieval-augmented generation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Enterprise RAG. The section links point to the parts of the book it draws on.