
Hybrid Search Implementation
FreeCombine vector and keyword search for better retrieval.
Free · Opens the source repo
What Hybrid Search Implementation does
The Hybrid Search Implementation skill provides a structured approach to integrating vector similarity search with traditional keyword-based search methods. This combination is particularly useful in scenarios where neither search technique alone yields satisfactory results. By leveraging both methods, users can enhance the recall of their search systems, making it ideal for applications such as Retrieval-Augmented Generation (RAG) systems and specialized search engines.
At its core, the hybrid search architecture functions by processing queries through both vector and keyword searches simultaneously. The results from these searches are then fused to produce a final set of results. The skill includes various fusion methods, such as Reciprocal Rank Fusion (RRF) for general purposes, linear combinations for tunable balances, and cross-encoders for high-quality reranking. Each method serves different needs, allowing developers to choose the most appropriate approach based on their specific requirements.
The skill also emphasizes best practices for implementation. Users are encouraged to tune weights empirically based on their datasets, utilize RRF for simplicity, and incorporate reranking to significantly improve search quality. Additionally, it highlights the importance of logging scores for debugging and conducting A/B tests to measure user impact effectively. The provided templates and detailed examples in the accompanying documentation serve as practical guides for implementing these strategies in real-world applications.
Overall, this skill is designed for developers and designers looking to build or enhance search functionalities that require a nuanced understanding of both semantic and exact matching. It is particularly beneficial in handling queries with specific terms or domain-specific vocabulary, ensuring that users receive the most relevant results based on their search criteria.
When to use it
Use this skill when developing RAG systems or search engines that need to combine semantic understanding with precise keyword matching.
When not to use it
This skill may not be suitable for simple search implementations where either vector or keyword search alone is sufficient.
What you can build with it
Building a RAG System
Implement a hybrid search to enhance the recall of a RAG system, ensuring users receive relevant results.
Domain-Specific Search Engine
Create a search engine that handles specific vocabulary effectively by combining vector and keyword search.
Improving User Query Handling
Use this skill to manage queries with specific terms, ensuring both semantic and exact matches are retrieved.
How to install Hybrid Search Implementation
View source1. Install with the skills CLI
npx skills add wshobson/agents/hybrid-search-implementation --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by wshobsonHybrid 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
Query → ┬─► Vector Search ──► Candidates ─┐
│ │
└─► Keyword Search ─► Candidates ─┴─► Fusion ─► Results
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 and detailed worked examples
Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.
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
Frequently asked questions about Hybrid Search Implementation
Similar skills
WinMD API Search
Easily find and explore Windows desktop APIs.
WebMCPify
Transform any web app into an agent-ready platform.
Phoenix Tracing
Instrument LLM applications with OpenInference tracing.
Foundry Hosted Agent CopilotKit
Guidance for developing agentic web apps on Azure.
Power Automate Foundation
Connect AI agents to Power Automate seamlessly.
Power Automate Flow Builder
Efficiently build and deploy Power Automate flows programmatically.
