Skip to content
Skillpedia
Agents41k · #4888

hybrid-search-implementation

Lets your agent combine keyword and vector search. This improves search results in complex systems.

What it does

This skill teaches how to mix two types of search: one that understands meaning (vector) and another that looks for exact words (keyword). This helps find information more completely.

When to use it

  • ✓When building systems that answer questions based on documents.
  • ✓When you need search to find both meaning and specific terms.
  • ✓If pure meaning-based search misses important results you know exist.

Example of what to ask your AI

“How can I combine meaning search and keyword search to improve my results?”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/wshobson/agents/blob/main/plugins/llm-application-dev/skills/hybrid-search-implementation/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/wshobson/agents/blob/main/plugins/llm-application-dev/skills/hybrid-search-implementation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The idea is to send your query to two search systems at once. One understands the meaning, the other looks for exact words. Then, the results are combined to give the best answer.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add wshobson/agents --skill hybrid-search-implementation

Or download just the file:

curl -L https://raw.githubusercontent.com/wshobson/agents/main/plugins/llm-application-dev/skills/hybrid-search-implementation/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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
FAQ

What is vector search?

It's a search that understands the meaning of words and phrases, finding texts that talk about the same topic, even if they use different words.

What is keyword search?

It's the traditional search, which looks for the exact words you typed.

What is 'fusion'?

It's the process of combining the results from both searches (vector and keyword) to create a more accurate final list of results.

Details

Original description by the author

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

repo: wshobson/agents

Popularity

GitHub stars
41k
Ranking position
#4888
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills