C1000-185 practice question 13 of 35

In a Retrieval-Augmented Generation (RAG) system, the retriever plays a crucial role in retrieving relevant documents or passages from a knowledge base. What is the primary function of a retriever in this architecture?

Full set: 376 questions

Domain Access Governance and Certification

Answer options
A: The retriever generates the final response based on the retrieved documents and the user’s query.
B: The retriever finds and retrieves documents from a knowledge base that are semantically similar to the input query, often using vector embeddings to compare similarity. Correct answer
C: The retriever performs tokenization and splitting of large documents into smaller chunks, making them easier to index.
D: The retriever modifies the transformer-based model’s weights in real-time to improve the relevance of future retrievals.
Correct Answer:
B. The retriever finds and retrieves documents from a knowledge base that are semantically similar to the input query, often using vector embeddings to compare similarity.
Explanation

The primary function of the retriever in a Retrieval-Augmented Generation (RAG) architecture is to search an external knowledge base for information relevant to a user's query. It accomplishes this by first converting both the query and the documents in the knowledge base into numerical vector embeddings. It then employs a similarity search algorithm (e.g., cosine similarity) to identify and retrieve the document chunks whose embeddings are most semantically similar to the query's embedding. These retrieved documents are then passed as context to the generator model to formulate a grounded and accurate response.

Why Incorrect

A. The generator (the Large Language Model component), not the retriever, is responsible for synthesizing the retrieved context and the original query to generate the final response.
C. Tokenization and chunking are part of the data ingestion and indexing pipeline, which prepares the knowledge base before the retriever performs its query-time function.
D. The retriever provides context to the generator; it does not modify the model's weights in real-time. Modifying weights is a process associated with model training or fine-tuning.

References

1. Lewis

P.

Perez

E.

Piktus

A.

Petroni

F.

Karpukhin

V.

Goyal

N.

Küttler

H.

Lewis

M.

Yih

W.

Rocktäschel

T.

Riedel

S.

& Kiela

D. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Advances in Neural Information Processing Systems

33

9459-9474. Section 2

"Methods

" describes the retriever as a component that uses dense vector encoders to find relevant documents (z) based on an input query (x).

2. IBM. (2024). watsonx.ai Documentation: Retrieval-augmented generation. Section: "How retrieval-augmented generation works

" states

"The retrieval step in RAG finds relevant information from a configured knowledge base... The retriever compares the query embedding to the document embeddings to find the documents that are most relevant to the query."

3. Zhao

W. X.

et al. (2024). Retrieval-Augmented Generation for Large Language Models: A Survey. arXiv preprint arXiv:2312.10997. Section 2.1

"The Retriever

" explains

"The retriever aims to fetch relevant documents from an external corpus... it first encodes the query and documents into dense vectors... and then conducts a similarity search..." (https://doi.org/10.48550/arXiv.2312.10997)

4. Manning

C. D. (2022). CS224N: Natural Language Processing with Deep Learning. Stanford University. Lecture on "Question Answering

" describes the retriever's role in open-domain QA systems (the precursor to RAG) as finding relevant passages from a large corpus like Wikipedia using vector similarity search.

Scroll to Top