Reader-Retriever Architecture
What you'll learn: How two-stage pipelines combine retrieval and reading models to answer questions from massive document collections.
The Core Idea
Imagine you're in a library trying to answer a question. You can't possibly read every book, so you first retrieve the most relevant books from the catalog, then read only those carefully to find the answer. Reader-Retriever architecture works exactly this way.
In open-domain QA, you have millions of documents but need a precise answer. A single model can't efficiently handle both searching and comprehension, so we split the task:
- Retriever: Quickly scans the entire corpus and selects the top-k most relevant passages (often using Dense Passage Retrieval techniques you've learned)
- Reader: Takes only these few candidate passages and performs deep reading to extract or generate the answer (typically a span-prediction model like BERT)
Why Two Stages?
Retrieval models prioritize speed — they must filter millions of documents in milliseconds using efficient vector similarity search. Reading models prioritize accuracy — they perform expensive contextual analysis but only on a handful of passages.
This division of labor makes open-domain QA tractable: you get the broad coverage of the retriever with the precision of the reader.
The Pipeline Flow
Question → Retriever → Top-k passages → Reader → Final answer
The retriever might return 5-20 passages. The reader then processes each independently or jointly to predict answer spans, ranking them by confidence.
Key Takeaway: Reader-Retriever architecture efficiently tackles open-domain QA by separating fast retrieval (finding relevant documents) from slow, accurate reading (extracting answers), combining the strengths of both approaches in a two-stage pipeline.