Skills · Data & AI

Hybrid Search Implementation

Unverified27/40

Combine vector and keyword search for improved retrieval. Use when implementing RAG systems, building search engines, or when neither approach alone provides sufficient recall.

Originally by wshobson · MIT

Claude CodePartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
CursorPartialPlain prose you can paste in — but no Cursor rules file
CodexPartialPlain prose you can paste in — but no AGENTS.md
Gemini CLIPartialPlain prose you can paste in
CopilotPartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add hybrid-search-implementation

This command does not work yet — the CLI is still being built. Until then, use Raw in the reader below to take the file.

Who is stuck, and on what

Combine vector and keyword search for improved retrieval. Use when implementing RAG systems, building search engines, or when neither approach alone provides sufficient recall.

The whole source

No sign-in, no blur, nothing truncated
hybrid-search-implementation/SKILL.md57 lines2.0 KBRawView on GitHub
Frontmatter — 2 properties
namehybrid-search-implementation
descriptionCombine vector and keyword search for improved retrieval. Use when implementing RAG systems, building search engines, or when neither approach alone provides sufficient recall.
1---
2name: hybrid-search-implementation
3description: Combine vector and keyword search for improved retrieval. Use when implementing RAG systems, building search engines, or when neither approach alone provides sufficient recall.
4---A5No allowed-tools declared — no way to tell what this skill may touch
5 
6# Hybrid Search Implementation
7 
8Patterns for combining vector similarity and keyword-based search.
9 
10## When to Use This Skill
11 
12- Building RAG systems with improved recall
13- Combining semantic understanding with exact matching
14- Handling queries with specific terms (names, codes)
15- Improving search for domain-specific vocabulary
16- When pure vector search misses keyword matches
17 
18## Core Concepts
19 
20### 1. Hybrid Search Architecture
21 
22```
23Query → ┬─► Vector Search ──► Candidates ─┐
24 │ │
25 └─► Keyword Search ─► Candidates ─┴─► Fusion ─► Results
26```
27 
28### 2. Fusion Methods
29 
30| Method | Description | Best For |
31| ----------------- | ------------------------ | --------------- |
32| **RRF** | Reciprocal Rank Fusion | General purpose |
33| **Linear** | Weighted sum of scores | Tunable balance |
34| **Cross-encoder** | Rerank with neural model | Highest quality |
35| **Cascade** | Filter then rerank | Efficiency |
36 
37## Templates and detailed worked examples
38 
39Full template library and detailed worked examples live in `references/details.md`. Read that file when you need the concrete templates.
40 
41## Best Practices
42 
43### Do's
44 
45- **Tune weights empirically** - Test on your data
46- **Use RRF for simplicity** - Works well without tuning
47- **Add reranking** - Significant quality improvement
48- **Log both scores** - Helps with debugging
49- **A/B test** - Measure real user impact
50 
51### Don'ts
52 
53- **Don't assume one size fits all** - Different queries need different weights
54- **Don't skip keyword search** - Handles exact matches better
55- **Don't over-fetch** - Balance recall vs latencyA4This skill pulls in web or user content but never says to treat that content as data. A signal, not proof.
56- **Don't ignore edge cases** - Empty results, single word queries
57 

Reviews

Installed this one?Write the first review and take the Trailblazer badge.

Reviews only open after a real install, so this is empty — and we leave it empty rather than invent one.

Alternatives

Also in Data & AI