hybrid-search-implementation

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

31,392 stars
Complexity: easy

About this skill

This skill provides patterns and best practices for implementing hybrid search, a powerful technique that combines the strengths of vector similarity search with traditional keyword-based retrieval. It aims to improve recall and precision in information retrieval systems by leveraging both semantic understanding and exact term matching. Ideal for enhancing RAG systems, building sophisticated search engines, or scenarios where neither pure vector nor pure keyword search is sufficient.

Best use case

Building Retrieval-Augmented Generation (RAG) systems with improved recall; Designing advanced search engines; Combining semantic understanding with precise keyword matching; Handling queries that include specific terms like names, codes, or product IDs; Improving search accuracy for domain-specific vocabulary; Addressing situations where pure vector search misses exact keyword matches.

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

Improved retrieval accuracy, higher recall, better relevance for diverse query types, and more robust information retrieval systems. Agents will be able to design and implement search functionalities that intelligently combine semantic understanding with exact matching, leading to more comprehensive and relevant search results for users or downstream tasks like RAG.

Practical example

Example input

Agent, design a search mechanism for our new knowledge base that handles both broad semantic queries (e.g., 'what is AI ethics?') and specific identifiers (e.g., 'document ID: XYZ-123'). Ensure it optimizes for both relevance and completeness.

Example output

A proposed architecture for a hybrid search system, outlining the integration of a vector database (e.g., Pinecone, Weaviate) with a keyword index (e.g., Elasticsearch, Solr/Lucene). This includes strategies for query processing (e.g., parallel search, query rephrasing), result fusion techniques (e.g., RRF - Reciprocal Rank Fusion, weighted sum), and considerations for indexing data to support both vector embeddings and keyword fields effectively. The design will emphasize balancing semantic relevance with exact term matching.

When to use this skill

  • When implementing RAG systems to enhance recall and contextual understanding; When your search queries require both semantic understanding (what the user means) and precise keyword matching (for specific entities); For handling specific entity names, product codes, or other exact terms where vector embeddings might not capture sufficient detail; To improve search accuracy within specialized or domain-specific vocabularies; When pure vector search alone fails to retrieve relevant documents due to missing exact keyword matches, or pure keyword search lacks semantic understanding.

When not to use this skill

  • If the task is unrelated to information retrieval or search functionality; When your system exclusively relies on either pure vector or pure keyword search and doesn't require their combination; If the primary goal is outside the scope of search implementation (e.g., data generation, complex reasoning without a retrieval component, or pure data analysis without a search aspect).

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/hybrid-search-implementation/SKILL.md --create-dirs "https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/plugins/antigravity-awesome-skills-claude/skills/hybrid-search-implementation/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/hybrid-search-implementation/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How hybrid-search-implementation Compares

Feature / Agenthybrid-search-implementationStandard Approach
Platform SupportClaudeLimited / Varies
Context Awareness High Baseline
Installation ComplexityeasyN/A

Frequently Asked Questions

What does this skill do?

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

Which AI agents support this skill?

This skill is designed for Claude.

How difficult is it to install?

The installation complexity is rated as easy. You can find the installation instructions above.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Hybrid Search Implementation

Patterns for combining vector similarity and keyword-based search.

## Use this skill when

- 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

## Do not use this skill when

- The task is unrelated to hybrid search implementation
- You need a different domain or tool outside this scope

## Instructions

- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, open `resources/implementation-playbook.md`.

## Resources

- `resources/implementation-playbook.md` for detailed patterns and examples.

Related Skills

exa-search

31392
from sickn33/antigravity-awesome-skills

Semantic search, similar content discovery, and structured research using Exa API. Use when you need semantic/embeddings-based search, finding similar content, or searching by category (company, people, research papers, etc.).

Information RetrievalClaude

azure-search-documents-dotnet

31392
from sickn33/antigravity-awesome-skills

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search.

Information RetrievalClaude

hybrid-cloud-networking

31392
from sickn33/antigravity-awesome-skills

Configure secure, high-performance connectivity between on-premises and cloud environments using VPN, Direct Connect, and ExpressRoute.

Networking & Cloud InfrastructureClaude

hybrid-cloud-architect

31392
from sickn33/antigravity-awesome-skills

Expert hybrid cloud architect specializing in complex multi-cloud solutions across AWS/Azure/GCP and private clouds (OpenStack/VMware).

Cloud ArchitectureClaude

deep-research

31392
from sickn33/antigravity-awesome-skills

Run autonomous research tasks that plan, search, read, and synthesize information into comprehensive reports.

ResearchClaudeGemini

cqrs-implementation

31392
from sickn33/antigravity-awesome-skills

Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.

Software ArchitectureClaude

context7-auto-research

31392
from sickn33/antigravity-awesome-skills

Automatically fetch latest library/framework documentation for Claude Code via Context7 API. Use when you need up-to-date documentation for libraries and frameworks or asking about React, Next.js, Prisma, or any other popular library.

Developer ToolsClaude

azure-search-documents-ts

31392
from sickn33/antigravity-awesome-skills

Build search applications with vector, hybrid, and semantic search capabilities.

Search and RetrievalClaude

azure-search-documents-py

31392
from sickn33/antigravity-awesome-skills

Azure AI Search SDK for Python. Use for vector search, hybrid search, semantic ranking, indexing, and skillsets.

Text AnalysisClaude

nft-standards

31392
from sickn33/antigravity-awesome-skills

Master ERC-721 and ERC-1155 NFT standards, metadata best practices, and advanced NFT features.

Web3 & BlockchainClaude

nextjs-app-router-patterns

31392
from sickn33/antigravity-awesome-skills

Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

Web FrameworksClaude

new-rails-project

31392
from sickn33/antigravity-awesome-skills

Create a new Rails project

Code GenerationClaude