RAG architecture and retrieval tuning: MLA-C02 study notes and practice questions
What to know about RAG architecture and retrieval tuning for the MLA-C02 exam, from the ML Model and Foundation Model (FM) Development domain (24% of the exam guide), then 2 free questions to test it. Part of the MLA-C02 study guide.
A public library runs a retrieval-augmented chatbot over its policy manual and catalog help pages, using an Amazon Bedrock knowledge base with an Amazon OpenSearch Serverless vector store. Patrons often ask about exact codes, such as a policy number like POL-2290, and the assistant often answers with a general policy instead.
The team wants retrieval to match exact identifiers as well as meaning, using only the knowledge base it already has, without adding a new search service.
Which change should the team make?
Choose one answer.
AA. Increase the number of retrieved chunks from 5 to 50 so that the exact code is more likely to appear somewhere in the results.
BB. Replace the embedding model with a larger one, since larger embedding models always match exact codes more precisely.
CC. Shorten the chatbot prompt so the model focuses only on the policy text and ignores the catalog help pages.
DD. Change the retrieval search type to hybrid, which combines semantic vector matching with keyword matching for the query.
Show the answer and explanation
Answer: D
A. Wrong: More chunks increase the amount of text sent to the model and do not guarantee that the exact code ranks high. The stem asks for matching of identifiers.
B. Wrong: Embedding models capture meaning, and a bigger model does not guarantee that exact strings match. The keyword side of hybrid search is what handles identifiers.
C. Wrong: The retrieval step is where the wrong passage is missed, and a shorter prompt does not fix that. The stem calls for changing how passages are found.
D. Right: Correct. Hybrid search combines semantic vector search with a search of the raw text, so exact codes such as POL-2290 can match even when meaning-based search misses them. It is supported for OpenSearch Serverless vector stores that have a filterable text field and is set in the retrieval configuration. Learn more: Configure and customize queries and response generation (opens in a new tab)
Explanation
Hybrid search combines semantic similarity with text matching, which helps when a query contains exact identifiers, and the knowledge base's OpenSearch Serverless store supports it. More chunks, larger embedding models or prompt edits do not change how exact codes are matched during retrieval.
A pet insurer built a retrieval-augmented assistant over 40,000 policy clauses in an Amazon Bedrock knowledge base. For questions about exclusions, the top five retrieved clauses are often topically similar but do not answer the question, and the answers are wrong.
The retrieved set must be reordered so that the clauses that actually answer the question come first. Latency must stay under three seconds for each answer, and the team does not want to change the embedding model or re-index the clauses.
Which change best meets these requirements?
Choose one answer.
AA. Add a reranking model to the retrieval step so that it scores the retrieved clauses against the question and returns them in that order.
BB. Increase the number of results returned from the vector search to 100, and pass all of them to the foundation model together with the customer's question.
CC. Re-index all 40,000 clauses with a larger chunk size, so that each chunk holds an entire policy section.
DD. Replace the foundation model that writes answers with a larger one, expecting it to ignore unrelated clauses.
B. Wrong: Passing 100 clauses increases the model input and can push latency past the target, and the relevant clause may still sit low in the list. The stem asks for better ordering, not more text.
C. Wrong: Re-indexing is the change the team wants to avoid, and larger chunks do not reorder the candidates. Each section also brings more irrelevant text into the answer.
D. Wrong: The generation model is not the step that orders the clauses, and a bigger model adds cost and latency. The wrong clauses are reaching the model in the first place.
Explanation
A reranking model reorders a set of retrieved passages by relevance to the question, which fixes the case where the right clause ranks low. This needs no re-indexing and keeps the model input small. Larger result sets, bigger chunks or a larger generator each add cost or text without solving the ordering problem.
Want more on RAG architecture and retrieval tuning? The 5 full-length practice sets have 9 more RAG architecture and retrieval tuning questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →