AWS Certified Generative AI Developer – Professional
Bedrock hybrid search, reranking, query decomposition: AIP-C01 Use HYBRID search when queries contain exact strings such as part numbers, because it adds a raw-text search to the vector search. Use a reranker model to reorder retrieved passages by relevance to the query. Use query decomposition when one question covers several things, because it splits the question into sub-queries before retrieval.
Search type A knowledge base query can use semantic search, which searches only the vector embeddings, or hybrid search, which combines the vector search with a search of the raw text. If you set nothing, Amazon Bedrock picks the strategy for your vector store.
Set it in retrievalConfiguration.vectorSearchConfiguration.overrideSearchType as HYBRID or SEMANTIC. Hybrid search works only with Amazon RDS, Amazon OpenSearch Serverless and MongoDB vector stores that contain a filterable text field. With any other store, the query uses semantic search.
Example: sales staff ask for part HX-4410-B and get chunks about similar parts. Hybrid search finds the exact string while natural language questions keep their semantic matches.
Reranking A reranker model scores each passage against the query and reorders them. You can retrieve fewer but more relevant results, which can lower the cost and latency of the generation call. Reranking works only on text.
There are two ways to use it. Call the Rerank operation directly with the query and a list of documents, which works for passages from any source, such as an Aurora pgvector table. Or add a reranking configuration to a Retrieve or RetrieveAndGenerate call on a knowledge base, where the reranked order overrides the knowledge base's default ranking.
Query decomposition and result count Query decomposition breaks a complex query into smaller sub-queries, so more than one search can run against the knowledge base. A question that compares two products becomes one sub-query per product. It is set in a RetrieveAndGenerate request under orchestrationConfiguration.queryTransformationConfiguration with the type QUERY_DECOMPOSITION.
A query returns up to five results by default. numberOfResults sets the maximum, and fewer can come back. With hierarchical chunking, numberOfResults counts child chunks, and children that share a parent come back as one result.
Where the exam catches people Believing a reranker fixes missed exact identifiers: a reranker only reorders what retrieval returned, so a chunk that was never retrieved stays missing. Hybrid search adds the raw-text match. Believing hybrid search works with every vector store: it needs RDS, OpenSearch Serverless or MongoDB with a filterable text field, and otherwise falls back to semantic search. Believing you need a knowledge base to use a Bedrock reranker: the Rerank operation takes inline documents from any source. Believing a higher numberOfResults makes a comparison question cover both products: more passages can still all come from one product. Query decomposition searches for each part of the question. Written from these sources Try 3 questions on this Pick an answer to see why each option is right or wrong.
An industrial parts supplier uses an Amazon Bedrock knowledge base with an Amazon OpenSearch Serverless vector store to answer questions from its sales team. The vector index contains a filterable text field. Sales representatives often ask about specific part numbers such as HX-4410-B. The knowledge base returns chunks about similar parts but often misses the chunk that contains the exact part number. The company must improve retrieval for exact part numbers without reducing the quality of results for natural language questions.
Which solution will meet these requirements with the LEAST operational overhead? Right. In the game that’s Renown for your Foundation Model Integration, Data Management, and Compliance building.
Not that one: B is right. In the game your Foundation Model Integration, Data Management, and Compliance building would lose a little Renown, and this question would come back later.
Your answer A. Add an Amazon Bedrock reranker model to the knowledge base retrieval configuration. The reranker reorders the retrieved chunks so that the most relevant chunks reach the model first.Reranking works on the results the search already returned. The chunk with the exact part number was never retrieved, so there is nothing to promote. The answer B. Set the search type override to HYBRID in the knowledge base retrieval configuration. Amazon Bedrock then combines the vector search with a keyword search of the raw text for each query.Exact identifiers such as part numbers are what embeddings match poorly. Your answer C. Enable query decomposition in the knowledge base orchestration configuration. The model then splits each question into smaller subqueries before the knowledge base retrieves chunks.Splitting a short part-number question into subqueries produces more semantic searches, none of which match the exact string. Your answer D. Change the chunking strategy of the data source to semantic chunking, and synchronize the data source again. The knowledge base then splits documents where the meaning between adjacent sentences changes significantly.Semantic chunking changes where documents are split. An embedding of a part number is still a poor match for the exact string at query time.
Show the full explanation and doc quotes The HYBRID search type "Combines searching vector embeddings (semantic search) with searching through the raw text", so the exact string is found while natural language questions keep their semantic matches. OpenSearch Serverless with a filterable text field supports it.
Written from docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
A legal research company runs a search service that retrieves the 100 most similar passages for each question from an Amazon Aurora PostgreSQL table by using the pgvector extension. Only the first 10 passages fit in the prompt that the service sends to an FM in Amazon Bedrock, and answers often miss the most relevant passage.
The company must reorder the 100 passages by relevance to the question with an Amazon Bedrock reranker model and send the top 10 to the FM. The existing retrieval query and the Aurora table must stay unchanged.
Which solution will meet these requirements? Right. In the game that’s Renown for your Foundation Model Integration, Data Management, and Compliance building.
Not that one: D is right. In the game your Foundation Model Integration, Data Management, and Compliance building would lose a little Renown, and this question would come back later.
Your answer A. Call the Converse operation with a text generation model, the question, and the 100 passages. Instruct the model to return the 10 most relevant passages, and add those passages to the prompt.A chat model can be told to sort text, but that is prompting, not the reranker model the company has to use. Your answer B. Create an Amazon Bedrock knowledge base that uses the Aurora table as its vector store. Call the Retrieve operation with a reranking configuration that names the reranker model, and add the results to the prompt.A knowledge base replaces the existing retrieval path and needs its own table layout, so the retrieval query and table do not stay unchanged. Your answer C. Create an HNSW index on the embedding column of the Aurora table with a higher ef_search setting. Change the retrieval query to return 10 passages, and add those passages to the prompt.An HNSW index changes the Aurora table and only speeds up or tunes similarity search; no reranker model is involved. The answer D. Call the Amazon Bedrock Rerank operation with the question as the query and the 100 passages as inline text sources. Set the number of results to 10, and add the returned passages to the prompt.The Amazon Bedrock reranking page (https://docs.aws.amazon.com/bedrock/latest/userguide/rerank.html) lists two ways to use a reranker.
Show the full explanation and doc quotes The first is to "Call the Rerank operation directly through the Amazon Bedrock API", and the same page says "The Rerank operation sends the query, documents, and any additional configurations as input to a reranker model." The Rerank API reference (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Rerank.html) takes sources as inline documents and a numberOfResults setting, so the passages from Aurora go in unchanged and the top 10 come back.
Written from docs.aws.amazon.com/bedrock/latest/userguide/rerank.html
An insurance company runs an assistant for its call center agents. The assistant calls the RetrieveAndGenerate API against an Amazon Bedrock knowledge base. The terms of each insurance product are in a separate document in the knowledge base.
Agents often ask comparison questions, such as "Does Home Plus or Landlord Shield cover flood damage to rental properties?" For these questions, the retrieved passages usually come from only one product's document, and the answer covers only that product. The company wants each answer to cover every product that the question names. The company does not want to write orchestration code.
Which solution will meet these requirements? Right. In the game that’s Renown for your Foundation Model Integration, Data Management, and Compliance building.
Not that one: B is right. In the game your Foundation Model Integration, Data Management, and Compliance building would lose a little Renown, and this question would come back later.
Your answer A. Raise numberOfResults in the vectorSearchConfiguration of each RetrieveAndGenerate request. The knowledge base then returns more passages from the vector store for each question.A bigger net from the same single search mostly pulls in more of the same document. The question needs a separate search for each product. The answer B. Set the queryTransformationConfiguration type to QUERY_DECOMPOSITION in the orchestrationConfiguration of each RetrieveAndGenerate request. The knowledge base then breaks each question into sub-queries before retrieval.The knowledge base can split a multi-part question itself. The test configuration page says: "Query decomposition is a technique used to break down a complex queries into smaller, more manageable sub-queries." Your answer C. Set overrideSearchType to HYBRID in the vectorSearchConfiguration of each RetrieveAndGenerate request. The knowledge base then searches with both the vector embeddings and the raw text of each question.Keyword matching helps with exact names, but the question still goes to the vector store as one search, and one product's document keeps winning. Your answer D. Add a reranking configuration that uses an Amazon Bedrock reranker model to the retrieval configuration of each RetrieveAndGenerate request. The knowledge base then reorders the retrieved passages by relevance before generation.Reranking only shuffles what came back. If the second product's passages were never retrieved, there is nothing for the reranker to move up.
Show the full explanation and doc quotes And "Enabling this option may result in multiple queries being executed against your Knowledge Base, which may aid in a more accurate final response." It is set in the RetrieveAndGenerate request under orchestrationConfiguration, in queryTransformationConfiguration with the type QUERY_DECOMPOSITION. A comparison of two products becomes one sub-query for each product, so each product's document is searched, with no orchestration code.
Written from docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
Related Certopolis is an independent study game. It is not affiliated with, endorsed by or sponsored by Amazon Web Services, and its questions are not the exams' questions. Exam names are trademarks of their owners. Questions are AI-written from each exam's public guide and vendor docs and may contain errors. Terms · Privacy