hybrid-search-implementation — Claude Code skill
This skill combines vector and keyword search into one retrieval flow. Use it for RAG systems and search engines when one method misses important matches.
/plugin marketplace add wshobson/agents
/plugin install llm-application-dev@claude-code-workflowsWhat hybrid-search-implementation does
hybrid-search-implementation outlines a hybrid retrieval architecture: the query goes through vector search and keyword search in parallel, then both candidate lists are fused into the final results. It fits cases where semantic similarity must coexist with exact matches for names, codes, or domain-specific terms.
The skill covers Reciprocal Rank Fusion, weighted score sums, cross-encoder reranking, and filter-then-rerank cascades. Concrete templates and worked examples are stored in references/details.md. It recommends testing weights on your own data, logging both scores, and checking empty results and single-word queries.
Install it when you are building a RAG system or search engine and either retrieval method alone misses relevant matches. Skip it for a simple search flow that does not need hybrid retrieval.
What it helps with
- combine vector and keyword retrieval
- keep exact matches for names and codes
- improve recall in a RAG system
- rerank candidate results with a neural model
- handle domain-specific search terms
Example prompts for the agent
- Design a hybrid search flow for our RAG system with RRF.
- Compare linear fusion and cross-encoder reranking for these queries.
- Add score logging for vector search and keyword search, including empty results.
How to install hybrid-search-implementation
1Plugin marketplace
/plugin marketplace add wshobson/agents/plugin install llm-application-dev@claude-code-workflowsThis installs the whole llm-application-dev plugin with all its skills
2Skills CLI (Vercel)
npx skills add wshobson/agents --skill hybrid-search-implementation -a claude-code3Manually: put the files in place
~/.claude/skills/hybrid-search-implementation/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/hybrid-search-implementation/
1Skills CLI (Vercel)
npx skills add wshobson/agents --skill hybrid-search-implementation -a codex2Manually: put the files in place
.agents/skills/hybrid-search-implementation/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wshobson/agents --skill hybrid-search-implementation -a cursor2Manually: put the files in place
.cursor/skills/hybrid-search-implementation/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wshobson/agents hybrid-search-implementation2Manually: put the files in place
.github/skills/hybrid-search-implementation/SKILL.mdPlatform CLI
gemini skills install https://github.com/wshobson/agents --path plugins/llm-application-dev/skills/hybrid-search-implementationManually: put the files in place
.devin/skills/hybrid-search-implementation/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set213
The whole set →Similar
Questions about hybrid-search-implementation
How do I install hybrid-search-implementation in Claude Code?
Run npx skills add wshobson/agents --skill hybrid-search-implementation -a claude-code. The skill file is placed at ~/.claude/skills/hybrid-search-implementation/SKILL.md.
What does hybrid-search-implementation do?
It explains how to combine vector similarity and keyword search, then fuse or rerank their candidates. The skill includes RRF, weighted scores, cross-encoders, and cascades.
Which platforms support hybrid-search-implementation?
The skill is available for Claude Code, Codex, and Cursor.
Source text
SKILL.md · MIT
---
name: hybrid-search-implementation
description: Combine vector and keyword search for improved retrieval. Use when implementing RAG systems, building search engines, or when neither approach alone provides sufficient recall.
---
# 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
```
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
© Seth Hobson · MIT · wshobson/agents