Agent skill · research science · aiskillstore
hybrid-search-implementation
Combine vector and keyword search for improved retrieval. Use when implementing RAG systems, building search engines, or when neither approach alone provides sufficient recall.
Why this skill is useful
Provides specific implementation patterns and executable code for hybrid search techniques that enhance retrieval capabilities.
What it needs
Requires asyncpg, pgvector installed locally. About 7k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Hybrid Search Implementation Patterns for combining vector similarity and keyword-based search. When to Use This Skill Building RAG systems with improved recall Combining semantic understanding with exact matching Handling queries with specific terms (names, codes) Improving search for domain-specific vocabulary When pure vector search misses keyword matches Core Concepts 1. Hybrid Search Architecture 2. Fusion Methods Method Description Best For -------- ------------- ---------- RRF Reciprocal Rank Fusion General purpose Linear Weighted sum of scores Tunable balance Cross-encoder Rerank with neural model Highest quality Cascade Filter then rerank Efficiency Templates Template 1: Reciprocal Rank Fusion Template 2: PostgreSQL Hybrid Search Template 3: Elasticsearch Hybrid Search Template 4: Custom Hybrid RAG Pipeline Best Practices Do's Tune weights empirically - Test on your data Use RRF for simplicity - Works well without tuning Add reranking - Significant quality improvement Log both scores - Helps with debugging A/B test - Measure real user impact Don'ts Don't assume one size fits all - Different queries need different weights Don't skip keyword search - Handles exact matches better Don't over-fetch - Balance recall vs latency Don't ignore edge cases - Empty results, single word queries Resources RRF Paper Vespa Hybrid Search Cohere Rerank
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/hybrid-search-implementation--7d53e7