rag-hybrid-search

Solid

Hybrid search combining semantic and keyword retrieval for RAG pipelines. Implement BM25 + dense vector search with fusion strategies.

AI & Automation 1,160 stars 71 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# rag-hybrid-search Implement hybrid search combining semantic vector retrieval with keyword-based BM25 search for improved RAG pipeline accuracy and recall. ## Overview Hybrid search addresses the limitations of pure semantic or pure keyword search: - Semantic search excels at conceptual similarity but may miss exact matches - Keyword search finds exact terms but lacks semantic understanding - Hybrid combines both for superior retrieval performance ## Capabilities ### Search Strategies - Dense vector semantic search (embeddings) - Sparse vector keyword search (BM25, TF-IDF) - Hybrid fusion with configurable weighting - Reciprocal Rank Fusion (RRF) combination ### Retrieval Configuration - Configure embedding models for dense search - Tune BM25 parameters (k1, b values) - Set retrieval limits and thresholds - Apply metadata filtering ### Ranking & Reranking - Score normalization across search types - Weighted score fusion - Cross-encoder reranking - MMR (Maximum Marginal Relevance) diversity ### Index Management - Create and update hybrid indexes - Batch indexing with progress tracking - Index optimization and maintenance - Multi-index federation ## Usage ### Basic Hybrid Search with LangChain ```python from langchain_community.retrievers import BM25Retriever from langchain_community.vectorstores import Chroma from langchain.retrievers import EnsembleRetriever from langchain_openai import OpenAIEmbeddings # Create documents docs = [...] # Your document chunks # ...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

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.

39,350 Updated today
sickn33
AI & Automation Listed

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.

335 Updated today
aiskillstore
AI & Automation Solid

postgres-hybrid-text-search

Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). **Trigger when user asks to:** - Combine keyword and semantic search - Implement hybrid search or multi-modal retrieval - Use BM25/pg_textsearch with pgvector together - Implement RRF (Reciprocal Rank Fusion) for search - Build search that handles both exact terms and meaning **Keywords:** hybrid search, BM25, pg_textsearch, RRF, reciprocal rank fusion, keyword search, full-text search, reranking, cross-encoder Covers: pg_textsearch BM25 index setup, parallel query patterns, client-side RRF fusion (Python/TypeScript), weighting strategies, and optional ML reranking.

1,751 Updated 1 weeks ago
timescale
AI & Automation Solid

rag-implementation

Retrieval-Augmented Generation patterns including chunking, embeddings, vector stores, and retrieval optimization Use when: rag, retrieval augmented, vector search, embeddings, semantic search.

27,705 Updated today
davila7
AI & Automation Solid

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.

36,222 Updated today
wshobson