# Hybrid Search

Hybrid search combines keyword-based retrieval and semantic vector retrieval to produce a single ranked set of relevant results.

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/hybrid-search

> Keyword search finds explicit terms, identifiers, and phrases, while vector search finds content with similar meaning even when wording differs. Combining these signals can improve retrieval for enterprise search and retrieval-augmented generation, especially when queries mix exact technical details with natural-language intent.

Practice exams covering Hybrid Search: [AIP-C01 AWS Certified Generative AI Developer - Professional](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional), [MLA-C02 (beta) AWS Certified Machine Learning Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate).

## 6 key aspects of Hybrid Search

Effective hybrid search combines complementary retrievers with calibrated ranking, secure indexing, optional reranking, and measured performance tuning.

1. **Complementary lexical and semantic retrieval**: Use lexical matching for explicit vocabulary and identifiers, and vector similarity for paraphrases and conceptual matches. Their combination is useful when business queries contain both exact constraints and natural-language intent.
2. **Candidate fusion and custom scoring**: Merge results using stable document or chunk identifiers, then apply rank fusion or a calibrated combination of scores. Tune retrieval weights and business boosts against labeled queries rather than directly adding incompatible raw scores.
3. **Optional second-stage reranking**: Apply a reranking model to the combined candidate pool when improved ordering justifies the additional latency and inference cost. Retrieve enough candidates first because reranking cannot introduce missing evidence.
4. **Consistent indexing and access controls**: Keep text, embeddings, metadata, updates, and deletions synchronized. Enforce tenant boundaries and document permissions across both retrieval paths before passages are used as model context.
5. **Workload-specific performance tuning**: Adjust vector index parameters, lexical analyzers, candidate counts, query preprocessing, and concurrency to meet latency and recall targets. Test identifiers and technical terms carefully because aggressive preprocessing can remove meaningful information.
6. **Measured relevance and context selection**: Evaluate retrieval using representative business questions, relevance judgments, ranking metrics, and latency percentiles. Deduplicate results and select grounded passages that fit the foundation model's context budget.

## Cloud services for Hybrid Search

Amazon OpenSearch Service can maintain lexical and vector indexes and execute the retrieval paths used by a hybrid search application. Amazon Bedrock can supply embeddings and rerank the merged candidates before selected passages become foundation-model context. For supported configurations, Bedrock Knowledge Bases manages parts of this retrieval workflow. Aurora PostgreSQL provides an alternative implementation using full-text search and pgvector, particularly when relational metadata and SQL filtering are central requirements. Choose the retrieval store according to corpus size, filtering needs, operational skills, and latency targets; these services do not all need to be deployed together.

- **[Amazon OpenSearch Service](https://blowstack.com/tools/cloud-services-hub/amazon-opensearch-service)**: Supports lexical and vector retrieval, with hybrid queries and search-pipeline capabilities for combining results on supported versions and deployments. Engineers can tune text analysis, vector indexes, filtering, and score combination to meet relevance and latency requirements.
- **[Amazon Bedrock](https://blowstack.com/tools/cloud-services-hub/amazon-bedrock)**: Provides embedding models and reranker models that can support a hybrid retrieval pipeline. Amazon Bedrock Knowledge Bases supports hybrid retrieval for supported vector-store configurations; selecting a knowledge base alone does not guarantee that hybrid retrieval is available.
- **[Amazon Aurora](https://blowstack.com/tools/cloud-services-hub/amazon-aurora)**: Aurora PostgreSQL-Compatible Edition can combine PostgreSQL full-text search with vector similarity through the pgvector extension on supported versions. Application logic or SQL can merge candidates and implement custom scoring while keeping searchable content near relational metadata.

## Hybrid Search exam questions

Real practice exam questions on Hybrid Search, with the correct answer and its explanation.

### Question 1 (MLA-C02 (beta))

**Question:**

A legal services company uses Amazon OpenSearch Service to retrieve passages from contracts. Each passage is indexed as searchable text and as a vector embedding. Lawyers submit queries that combine clause references, such as “Section 14.7(b),” with descriptions such as “ending the agreement when the supplier changes ownership.”

Evaluation shows that BM25 retrieval finds passages containing the clause references but misses relevant passages that use different wording. Vector retrieval finds those paraphrased passages but sometimes omits passages containing the requested clause reference. Both types of passages must be eligible for the final results, even when a passage appears in only one retrieval method's candidate set. The company must retain the existing embedding model and candidate limits.

Which retrieval configuration should an ML engineer implement?

**Correct answer:** Configure an OpenSearch hybrid query with BM25 and vector subqueries, and use a search pipeline to normalize and combine their relevance scores into one ranked result set.

**Explanation:** The lexical and vector subqueries contribute complementary candidates independently. A normalization and combination processor accounts for their different score scales and produces a unified ranking, allowing passages found by either retrieval method to reach the final results.

### Question 2 (AIP-C01)

**Question:**

A company uses an Amazon OpenSearch Service domain to retrieve passages for a generative AI research assistant. The index contains searchable text and compatible passage embeddings. The domain runs an OpenSearch version that supports hybrid queries and search-pipeline score normalization.

The application independently retrieves BM25 and vector-search candidates, then adds their raw scores. Evaluation shows that BM25 scores frequently dominate the combined ranking. The relative score ranges also vary substantially between questions, so a fixed boost does not consistently resolve the problem.

The company wants both retrieval methods to contribute candidates. For each request, each method's scores must be normalized independently before the two methods receive equal weight in the final ranking. The implementation must use native OpenSearch capabilities without changing the index or adding model inference calls.

Which solution best meets these requirements?

**Correct answer:** Use a hybrid query containing BM25 and k-NN subqueries. Attach a search pipeline with a normalization processor configured for min-max normalization and arithmetic-mean combination with weights of 0.5 for each subquery.

**Explanation:** A hybrid query allows both lexical and vector retrieval to contribute candidates. The search-pipeline normalization processor normalizes each subquery's scores before combining them. Min-max normalization followed by an equally weighted arithmetic mean meets the requested per-request normalization and equal contribution without reindexing or additional inference.

## Practice Hybrid Search in a full exam

Questions on Hybrid Search in each practice exam, with every answer option and an explanation for each:

- [AIP-C01](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional): 8 questions
- [MLA-C02 (beta)](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate): 1 question

## What is Hybrid Search

Hybrid search uses complementary retrieval methods over the same searchable corpus. A lexical retriever, commonly using an inverted index and a scoring algorithm such as BM25, identifies documents containing relevant terms. A semantic retriever compares a query embedding with document or passage embeddings to identify similar meaning. The system combines their candidates and rankings rather than assuming either method is sufficient for every query.

Consider a support assistant answering, “How do I fix error E1047 after rotating database credentials?” Keyword retrieval can preserve the importance of the exact error code, while vector retrieval can find a troubleshooting guide titled “Restoring connectivity after password changes.” Combining both methods can retrieve evidence that either method alone might miss. Hybrid search is particularly useful for product catalogs, internal documentation, incident records, and other collections containing both specialized vocabulary and descriptive prose.

A cloud implementation usually begins with an ingestion pipeline that extracts text, divides documents into useful chunks, and records metadata such as source, tenant, version, and access permissions. Each chunk receives a stable identifier and an embedding. Search infrastructure indexes both searchable text and vectors, either in one engine or in coordinated stores. Document updates and deletions must propagate to both representations. Changing the embedding model generally requires re-embedding the corpus and rebuilding or migrating its vector index.

At query time, preprocessing can detect language, preserve identifiers, expand approved synonyms, and generate the query embedding. Use a query embedding model compatible with the document embeddings. Execute lexical and vector retrieval, often concurrently, and combine candidates by their stable identifiers. Apply authorization and required metadata constraints consistently to both retrieval paths, preferably during retrieval where supported. Filtering only after candidate selection can leave too few usable results and must never allow unauthorized passages to reach a model.

Combining rankings requires deliberate scoring. BM25 scores and vector similarity scores have different scales, so adding raw values can let one retriever dominate unintentionally. A weighted combination of normalized scores supports custom relevance tuning. Reciprocal rank fusion instead combines rank positions without requiring comparable score scales. Weights, normalization behavior, candidate counts, and business boosts should be validated against representative queries, not selected solely by intuition.

An optional reranker evaluates the query and retrieved passages together to reorder the combined candidate set. Reranking is distinct from hybrid retrieval: hybrid retrieval broadens the initial evidence pool, whereas reranking improves ordering within that pool. A reranker cannot recover a document that neither retrieval path returned. For foundation-model context augmentation, deduplicate overlapping chunks, retain source references, and select passages within the context-token budget before generation. Retrieval quality supports grounded answers but does not guarantee factual generation.

Performance tuning balances relevance, latency, and cost. Larger candidate sets and more exhaustive vector searches can increase recall but require more computation; reranking adds another inference stage. Tune approximate nearest-neighbor index parameters, shard layout, searchable fields, and candidate sizes using realistic data and concurrency. Cache suitable query embeddings or results with freshness and authorization boundaries in mind. Measure recall at a chosen cutoff, ranking quality such as nDCG, end-to-end latency percentiles, and cost per query. Hybrid search is not automatically faster or more accurate than a single retriever, and it does not mean searching across public-cloud and on-premises environments.

## Learn Hybrid Search in lessons

5 short lessons on Hybrid Search in 2 certification courses.

- MLA-C02 (beta): Hybrid Search: combining lexical and vector retrieval (Premium), https://app.blowstack.com/lessons/hybrid-search-combining-lexical-and-vector-retrieval-mla-c02
- AIP-C01: Hybrid Search: candidate fusion and scoring (Premium), https://app.blowstack.com/lessons/hybrid-search-candidate-fusion-and-scoring-aip-c01
- MLA-C02 (beta): Hybrid Search vs Semantic Search (Premium), https://app.blowstack.com/lessons/hybrid-search-vs-semantic-search-mla-c02
- AIP-C01: Hybrid Search vs Semantic Search (Premium), https://app.blowstack.com/lessons/hybrid-search-vs-semantic-search-aip-c01
- AIP-C01: Hybrid Search vs Reranking (Premium), https://app.blowstack.com/lessons/hybrid-search-vs-reranking-aip-c01
