Retrieval

9. Retrieval#

A general-purpose model needs current, approved sources to answer questions about a company’s policies, products, or customers. Retrieval-augmented generation connects a model to an organization’s own documents so its answers are grounded in approved sources. This chapter explains how retrieval works and what managers must decide to make it reliable.

  • Knowledge Sources: The quality, ownership, and currency of documents limit the quality of every retrieved answer.

  • Retrieval Pipelines: Documents are split, indexed, and searched so the most relevant passages reach the model.

  • Grounded Answers: Check whether cited passages actually support each claim and route unresolved questions for review.

Chapter Video

This explainer shows how retrieval grounds a model’s answers in up-to-date, trusted sources.

What is Retrieval-Augmented Generation (RAG)? (6:35) by IBM Technology

Hosted on YouTube; property of its original creator, embedded here for educational reference only.

Learning Objectives

By the end of this chapter, you will be able to:

  1. Assess ownership, permission, and freshness of knowledge sources.

  2. Explain how chunking, embeddings, and search contribute to retrieval.

  3. Compare direct lookup, long context, and permission-filtered retrieval for a business knowledge task.

  4. Evaluate claim support, citation use, refusals, and answer coverage.

  5. Inspect synthetic retrieval and grounding records with Python.

  6. Distinguish the scope, effective dates, and permissions of policies, account terms, and transaction records.

Chapter Flow

Concept Map

Glossary

#

Term

Explanation

1

Knowledge source

Information considered for a retrieval-enabled task.

2

Document freshness

Whether a source is current enough for its intended use.

3

Chunking

Dividing source content into retrievable units.

4

Embedding

A numerical representation used to compare content under a learned representation.

5

Retrieval

Selecting potentially relevant evidence from an authorized collection.

6

Grounding

Connecting a response to supplied evidence.

7

Citation

A pointer to a source that still needs support verification.

8

Faithfulness

Whether an answer stays within what its supplied sources support.

9

Refusal

A designed nonanswer when an appropriate answer cannot be supported.

10

Coverage

The share of eligible questions or claims addressed under an explicit definition.

11

Lexical search

Ranking passages by shared words or terms rather than by meaning.

12

Reranking

Re-ordering a first list of retrieved candidates with a slower, more careful scorer.

13

Hybrid search

Combining lexical and embedding-based scores in one ranking.

14

Abstention

Withholding an answer the system cannot support under its operating rules.

15

Chunk overlap

Text repeated at the edge of neighboring chunks to preserve boundary context.

16

Access level

A source’s classification (public, internal, confidential, restricted) that decides which roles may retrieve it.

17

Hit rate at k

The share of answerable test queries with at least one relevant source in the top k results.

18

Recall at k

The average share of a query’s relevant sources found in the top k results.

19

Claim-level check

Judging each factual claim in an answer against its cited source, rather than scoring the whole answer.

20

Recorded answer

A stored assistant answer used for evaluation; here synthetic teaching data, not live model output.

21

Retrieval-augmented generation (RAG)

A workflow that retrieves source passages and supplies them to a model as context.