AWS Certified Generative AI Developer - Professional (AIP-C01) free question 6 / 10 · Domain 1: Foundation Model Integration, Data Management, and Compliance
A RAG application on Amazon Bedrock Knowledge Bases returns many loosely related chunks, which inflates prompt size. The team wants fewer but more relevant results, and it does not want to rebuild the index. What should it do?
- Add a reranker model to the Retrieve or RetrieveAndGenerate call, so its relevance scores replace the default ranking
- Attach a reranker model to the data source, so chunks are scored and re-embedded during the next ingestion job
- Add a reranker model and apply it to the image and chart files in the data source, so visual content is ranked too
- Call the Rerank operation on the query text, so the model returns the most relevant documents from the vector store
Show the answer and explanation
Answer: A
Why this is correct
A reranker model calculates the relevance of chunks to a query and reorders the results by those scores. With Amazon Bedrock Knowledge Bases, you use it while calling Retrieve or RetrieveAndGenerate, or when querying in the console, and the reranked results override the default ranking. Because the best chunks move to the top, you can retrieve fewer but more relevant results and pass less text to the foundation model.
Why the other options are wrong
"Attach a reranker model to the data source, so chunks are scored and re-embedded during the next ingestion job" … A reranker model is used when querying. It scores the relevance of chunks to a query and reorders results, and it does not take part in ingestion.
"Call the Rerank operation on the query text, so the model returns the most relevant documents from the vector store" … Rerank needs a user query and a list of documents to reorder. It does not search the vector store itself.
"Add a reranker model and apply it to the image and chart files in the data source, so visual content is ranked too" … The page states that reranking can be used for textual data only, so image and chart files are outside it.
Key points
Reranking acts at query time and needs no change to the index. It applies to text only.