Amazon OpenSearch Hybrid Search for RAG Medical Retrieval

AIP-C01 By islever Editorial Last updated

Design retrieval mechanisms for FM augmentation. Optimize application performance.

Short answer

A Configure hybrid search in Amazon OpenSearch Service to combine vector similarity with keyword matching, improving exact medical term and acronym recall without adding services or pipelines.

Question

A medical company is building a generative AI (GenAI) application that uses RAG to provide evidence-based medical information. The application uses Amazon OpenSearch Service to retrieve vector embeddings. Users report that searches frequently miss results that contain exact medical terms and acronyms and return too many semantically similar but irrelevant documents. The company needs to improve retrieval quality and maintain low end user latency, even as the document collection grows to millions of documents.
Which solution will meet these requirements with the LEAST operational overhead?
  1. Configure hybrid search by combining vector similarity with keyword matching to improve semantic understanding and exact term and acronym matching. Correct Answer
  2. Increase the dimensions of the vector embeddings from 384 to 1536. Use a post-processing AWS Lambda function to filter out irrelevant results after retrieval.
  3. Replace OpenSearch Service with Amazon Kendra. Use query expansion to handle medical acronyms and terminology variants during pre-processing.
  4. Implement a two-stage retrieval architecture in which initial vector search results are re-ranked by an ML model that is hosted on Amazon SageMaker AI.

Key Takeaways

This question tests whether you can distinguish a retrieval-relevance problem from an embedding-size or service-migration problem and choose native OpenSearch hybrid search over added re-ranking infrastructure.

Amazon OpenSearch Service hybrid search combines vector similarity with keyword matching to fix exact medical term and acronym recall while preserving semantic retrieval. This page establishes why option A is the least-overhead fix for the RAG scenario.

Common mistake: Option B is tempting because larger embeddings seem to improve recall, but increasing dimensions does not add exact keyword matching, and a Lambda post-filter adds latency and operational overhead without fixing missed acronyms.

Expert Analysis

The symptom is hybrid-search shaped The reported behavior — missing exact medical terms and acronyms while returning semantically similar but irrelevant documents — points to a dense-vector-only retrieval gap, not an embedding-capacity problem. Amazon OpenSearch Service hybrid search combines vector similarity with keyword matching, so exact tokens such as acronyms and drug names contribute to ranking while semantic similarity still handles paraphrases. That makes A the correct answer, and it does so as a configuration-level change in the existing OpenSearch deployment.

Comments confirm the diagnosis One practitioner described a similar case where vector-only search ranked an employee by name and missed the correct employee ID until the search type was changed to hybrid; another stressed that hybrid search solves both exact-term recall and semantic precision without new services, migrations, or post-processing pipelines. That matches the requirement for low latency and least operational overhead as the collection grows to millions of documents.

Adjacent options add cost without closing the gap B increases embeddings from 384 to 1536 and adds a Lambda post-filter. Larger vectors do not create lexical matching, and the post-filter adds latency and another component to operate. C replaces OpenSearch with Amazon Kendra and applies query expansion; Kendra can be viable when managed enterprise search and built-in connectors are priorities, but migration, reindexing, and application changes are high operational overhead here, and query expansion alone does not directly add exact keyword scoring. D adds a SageMaker AI re-ranker as a second retrieval stage. It may improve precision, but it introduces model hosting, cross-service orchestration, and extra per-query latency, and it cannot recover exact-term matches that the first-stage vector search never returned.

What would flip the decision If the company did not already run OpenSearch, or if a compliance mandate required a managed search service with built-in document connectors, C could become reasonable. If the workload prioritized maximum ranking quality over latency and operational simplicity, D would be more competitive. Under the stated constraints — existing OpenSearch, exact medical terminology, millions of documents, low latency, least operational overhead — hybrid search is the narrowest change that addresses both recall and precision.

Operational consequence of choosing wrong Configuring hybrid search requires tuning lexical and vector weights and monitoring recall and latency, but it avoids a new migration or serving stack. Choosing B or D can make the application slower and more expensive while leaving acronym misses intact; choosing C shifts the operational burden to a migration and a different search product.

Official Reference

Exam Strategy

When a RAG question says searches miss exact terms or acronyms but otherwise return semantic matches, look for a hybrid retrieval answer inside the existing vector store. Eliminate options that add a new service, migration, or post-processing Lambda because they raise operational overhead. Also reject dimension changes as a cure for lexical recall: dimensions affect representation capacity, not keyword precision. Scan the stem for “LEAST operational overhead” and prefer configuration-level OpenSearch changes over architecture rebuilds.

Frequently Asked Questions

Why does increasing embedding dimensions from 384 to 1536 not fix missed medical acronyms?

Dimensions affect representational capacity, not lexical matching. If a medical acronym or exact term is not captured by the dense vector, a larger embedding may still rank semantically similar but wrong documents, while hybrid search adds explicit keyword scoring.

When would Amazon Kendra or a SageMaker AI re-ranker be a better fit than OpenSearch hybrid search?

Kendra is more defensible when managed enterprise search, built-in connectors, or query expansion are primary requirements and migration overhead is acceptable. A SageMaker re-ranker helps when top-tier precision matters more than added latency and model-hosting effort; here those costs conflict with least operational overhead.

What should be tuned after enabling hybrid search in OpenSearch?

Tune the relative weights or normalization between lexical and vector scores, validate on a medical query set with acronyms and exact terms, and track recall plus p95 latency as the index grows to millions of documents.

More AIP-C01 FAQ →

Discussion 4 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 4

  1. Yeyodothi 👍 1 Answered A
    OpenSearch supports hybrid search i.e. combining dense vector similary search with sparse keyword search, i've seen this with trying to retrieve an employee with associated correct employee ID, it ranked the results via employee name on vector search only and returned with the correct data once search type was changed to hybrid
  2. Chibuzo1 👍 1 Answered A
    Hybrid search is a configuration-level change within the existing OpenSearch Service deployment. It directly solves both reported problems (exact term recall and semantic precision) without new services, migrations, or post-processing pipelines.
  3. GiorgioGss 👍 1 Answered A
    " Using hybrid search, you get best-of-all-worlds retrieval." - https://aws.amazon.com/blogs/big-data/supercharge-your-rag-applications-with-amazon-opensearch-service-and-aryn-docparse/
  4. ArunRav 👍 1 Answered A
    Using hybrid search in opensearch can help to solve this.Option C was an option if the operational overhead was not a criteria.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Practice All AIP-C01 Questions

Access 110 questions with complete answers and detailed explanations.

View Full AIP-C01 Practice Test →

← Back to AIP-C01 Study Guide