hybrid-search-implementation

Implement hybrid search with RRF fusion for PostgreSQL and Elasticsearch.

1|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/yusufcmg/Antigravity-Agents-Workflows --skill hybrid-search-implementation-yusufcmg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hybrid-search-implementation
Source: https://github.com/yusufcmg/Antigravity-Agents-Workflows/tree/main/.agent/skills/ai/hybrid-search-implementation
Command: npx skills add https://github.com/yusufcmg/Antigravity-Agents-Workflows --skill hybrid-search-implementation-yusufcmg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires asyncpg, numpy, elasticsearch, sentence-transformers, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the limitations of relying solely on vector or keyword search by providing methods to combine both, leading to more accurate and comprehensive search results.

Core Features & Use Cases

  • Hybrid Search Architectures: Implement strategies that merge semantic understanding with keyword precision.
  • Fusion Methods: Utilize techniques like Reciprocal Rank Fusion (RRF), Linear Combination, and Cross-encoder reranking.
  • Database Integration: Provides templates for PostgreSQL (with pgvector) and Elasticsearch.
  • Use Case: Enhance a RAG system by combining vector search for semantic relevance with keyword search for exact term matching, ensuring critical keywords aren't missed.

Quick Start

Use the hybrid-search-implementation skill to combine vector and keyword search results using RRF fusion.

Frequently Asked Questions about hybrid-search-implementation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I combine vector search with keyword search in a RAG system?

Combine vector search with keyword search in a RAG system using fusion methods like Reciprocal Rank Fusion (RRF), linear combination, or cross-encoder reranking to merge semantic and exact term matching results.

What is the best way to implement hybrid search using PostgreSQL and Elasticsearch?

Implement hybrid search using provided integration templates for PostgreSQL with pgvector and Elasticsearch, allowing you to execute and merge vector similarity and keyword-based queries within your existing database infrastructure.

When do I need hybrid search instead of pure vector similarity search?

You need hybrid search when pure vector similarity search misses critical exact keywords, requiring keyword-based search combined with semantic understanding to achieve more accurate and comprehensive retrieval results.

Does this hybrid search implementation support Reciprocal Rank Fusion and cross-encoder reranking?

Yes, this hybrid search implementation supports Reciprocal Rank Fusion (RRF), linear combination, and cross-encoder reranking to merge vector and keyword search result sets for improved retrieval accuracy.

Can I use sentence-transformers with Elasticsearch for hybrid search retrieval?

Yes, you can use sentence-transformers to generate vector embeddings and execute hybrid search retrieval against Elasticsearch, combining the semantic similarity with keyword precision for improved search accuracy.

What are the limitations of using linear combination for vector and keyword search fusion?

Linear combination fusion requires manually tuning score weights between vector and keyword search results, which can be less adaptive than Reciprocal Rank Fusion (RRF) when normalizing disparate ranking scores across different search modalities.