Generated banner for Hybrid Search Implementation
Generated logo for Hybrid Search Implementation

Hybrid Search Implementation

Seth HobsonCommunityCreated by Seth Hobson

  • Skill
  • Guidelines
  • Data and AI
  • MIT
  • No issues found

From 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.
— the description by Seth Hobson

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured approach to implementing hybrid search, which merges vector similarity with keyword-based retrieval. By combining these two methods, developers can achieve better recall, especially when handling domain-specific vocabulary, exact matches, or queries that pure semantic search might miss. The skill covers architectural patterns, fusion methods like Reciprocal Rank Fusion (RRF) and linear combination, and best practices for tuning and testing search performance.

What it does

  • Defines the architecture for combining vector and keyword search results.
  • Provides implementation templates for Reciprocal Rank Fusion (RRF).
  • Offers logic for linear combination of search scores.
  • Outlines database schema patterns for hybrid search using PostgreSQL.
  • Suggests best practices for tuning weights and evaluating search quality.
  • Provides guidance on when to use specific fusion methods like reranking or cascading.

When to use it

  • When building RAG systems that require higher retrieval accuracy.
  • When your current vector search fails to capture exact keyword matches.
  • When dealing with domain-specific terminology or product codes.
  • When you need to balance semantic understanding with precise term matching.
  • When you want to improve search recall without relying on a single retrieval method.

Advantages

  • Improves retrieval recall by leveraging both semantic and exact matching.
  • Provides flexible fusion methods to suit different search requirements.
  • Includes actionable templates for common database implementations.
  • Encourages empirical tuning and A/B testing for optimal performance.
  • Helps address edge cases where single-method search is insufficient.

Usage examples

“How do I combine vector and keyword search results?”
The skill provides a conceptual architecture and specific Python templates for Reciprocal Rank Fusion (RRF) and linear combination to merge ranked lists from different search methods.
“What is the best way to implement hybrid search in PostgreSQL?”
The skill includes a template for setting up a PostgreSQL schema with pgvector for vector search and GIN indexes for full-text search, enabling efficient hybrid queries.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/wshobson/hybrid-search-implementation/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip hybrid-search-implementation.zip -d .agents/skills

Documentation by Seth Hobson

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
MethodDescriptionBest For
RRFReciprocal Rank FusionGeneral purpose
LinearWeighted sum of scoresTunable balance
Cross-encoderRerank with neural modelHighest quality
CascadeFilter then rerankEfficiency

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

Files

ATTRIBUTION.md

Attribution

This folder is an unmodified copy of the Agent Skill "hybrid-search-implementation", distributed by AutoGineer (https://autogineer.com/agent-skills).

The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.

Files added by AutoGineer

  • ATTRIBUTION.md: this file, written by AutoGineer

  • LICENSE: copied from LICENSE

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Seth Hobson
Publisher
Seth Hobson (Community)
Source
wshobson/agents · plugins/llm-application-dev/skills/hybrid-search-implementation · commit 4bde316
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Seth Hobson.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download hybrid-search-implementation.zip