hybrid-search-implementation
Skill4 starsChanged 38 days agoMITView on GitHub
Combine vector and keyword search for improved retrieval. Use when implementing RAG systems, building search engines, or when neither approach alone provides sufficient recall.
9 other projects use a version of this, 9 of them edited.
Adopted by
Most recently taken up by
- AtilaMedeiros/skillsedited, first seen Nov 16, 2026
- DTiapan/batteryedited, first seen Oct 17, 2026
- xfstudio/skillsedited, first seen Oct 13, 2026
- Samueladewole/claude-skillsedited, first seen Oct 13, 2026
- roshankodi/agent-skillsedited, first seen Sep 22, 2026
- sagar-shirwalkar/servicenow-atlasedited, first seen Jun 22, 2026
Used with
Projects with it also use architecture-decision-records.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GSA-TTSSkillarchitecture-decision-records
Load when a user wants architecture decision records (ADRs) drafted from requirements or a design discussion, asks which decisions need an ADR, or wants an ADR draft reviewed for one-sided trade-offs, weak alternatives or missing requirement links. Not for setting up a project's whole documentation system (project-documentation-system).
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 9
- nilecui/SkillsBase★ 2711% same
- xfstudio/skills★ 948% same
- ai4brands-design/claude-skills★ 248% same
- CodeWithBehnam/cc-docs★ 212% same
- roshankodi/agent-skills★ 2100% same
- sagar-shirwalkar/servicenow-atlas★ 212% same
- AtilaMedeiros/skills★ 148% same
- DTiapan/battery★ 048% same
- Samueladewole/claude-skills★ 011% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-debt-detectorSkill
- airflow-dag-patternsSkill
- async-python-patternsSkill
- backtesting-frameworksSkill
- create-readmeSkill
- data-engineeringSkill
- data-quality-frameworksSkill
- dataset-curationSkill
- dbt-transformation-patternsSkill
- design-doc-mermaidSkill
- embedding-strategiesSkill
- eval-harness-firstSkill
- excalidraw-diagramSkill
- execution-algorithmsSkill
- external-diagram-mermaid-generateSkill
- frontend-designSkill
- improve-codebase-architectureSkill
- llm-evaluationSkill
- market-regime-detectionSkill
- mcp-builderSkill
- mcp-registry-syndicationSkill
- mcprush-gateway-deploymentSkill
- mermaid-diagramsSkill
- ml-pipeline-workflowSkill
- orchestratorSkill
- postgresql-table-designSkill
- prompt-engineering-patternsSkill
- python-testing-patternsSkill
- rag-implementationSkill
- regulatory-compliance-auditSkill
- risk-metrics-calculationSkill
- security-reviewSkill
- spark-optimizationSkill
- sql-optimization-patternsSkill
- vector-index-tuningSkill
The file
We split this skill into the rules it gives an agent
2 rules. 1 is common, 1 is distinctive, and 0 are very specific to this project.
1
Common
Most of the 9 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 16
When pure vector search misses keyword matches
- Distinctive: line 45
Tune weights empirically: - Test on your data
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 ─► Results2. 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
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

