Hybrid search implementation

From mtecoYY/ai-baike · View interactive version

Hybrid search implementation is an AI agent skill from the GitHub repository mtecoYY/ai-baike. Combine vector and keyword search for improved retrieval. Use when implementing RAG systems, building search engines, or when neither approach alone provides sufficient recall.

How to use this skill

Skill file

Hybrid Search Implementation

Patterns for combining vector similarity and keyword-based search.

When to Use This Skill

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

Don'ts

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.