Google Cloud RAG use case
Reference for the retrieval stage that supplies external information to a generative model.
Compute College
Learn how retrieval systems order candidate evidence and how to measure whether the right material reaches context.
Ranking orders retrieved candidates by estimated usefulness for a query. Initial retrieval may use keywords, embeddings, metadata, or a hybrid. Reranking applies a more expensive relevance check to a smaller candidate set before the final chunks enter context. Retrieval quality asks whether the evidence needed for a correct answer was found and placed high enough to use.
Memory trick: Rankers choose candidates. Rerankers spend more effort on fewer candidates. Evaluations decide whether the extra effort paid off.
A semantically similar passage can still be the wrong policy version, region, or exception. Reranking can improve relevance, but it adds compute and latency. The right system balances recall, precision, context size, and response requirements instead of maximizing one retrieval score.
A policy assistant retrieves 20 candidates by hybrid search, filters them to the employee’s region and current policy version, reranks the remaining eight, and supplies the top four with citations. If a held-out exception question still misses the controlling clause, the team changes chunking or metadata rather than simply raising top-k forever.
Example figures are illustrative calculations, not current quoted market prices.
Current example
Google’s RAG material describes retrieval as a distinct stage in a grounded-generation system. This lesson extends that separation into an evaluation and workload view: a better ranker is useful only if it improves accepted answers at an acceptable cost.
Reference for the retrieval stage that supplies external information to a generative model.
Source discipline: the reference explains the concept or method; it is not a substitute for measuring a production workload under its actual provider, model, and data conditions.
A better retrieval metric does not guarantee a supported answer. A passage can rank highly and still fail to support the final claim, especially when the query requires an exception or multiple sources.
Practical takeaway
Build a small labeled set with required evidence IDs. Compare initial retrieval and reranked results at several top-k values, then pass each result through the same generation and grounding review.
Decision check: does the retrieval configuration improve grounded accepted answers enough to justify its added latency and context cost?
Compute College track
Step 14 of 18: Ranking reranking and retrieval quality