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.
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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/hybrid-search-implementation/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How hybrid-search-implementation Compares
| Feature / Agent | hybrid-search-implementation | Standard Approach |
|---|---|---|
| Platform Support | Claude | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/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
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
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
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.).
azure-search-documents-dotnet
Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search.
hybrid-cloud-networking
Configure secure, high-performance connectivity between on-premises and cloud environments using VPN, Direct Connect, and ExpressRoute.
hybrid-cloud-architect
Expert hybrid cloud architect specializing in complex multi-cloud solutions across AWS/Azure/GCP and private clouds (OpenStack/VMware).
deep-research
Run autonomous research tasks that plan, search, read, and synthesize information into comprehensive reports.
cqrs-implementation
Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.
context7-auto-research
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.
azure-search-documents-ts
Build search applications with vector, hybrid, and semantic search capabilities.
azure-search-documents-py
Azure AI Search SDK for Python. Use for vector search, hybrid search, semantic ranking, indexing, and skillsets.
nft-standards
Master ERC-721 and ERC-1155 NFT standards, metadata best practices, and advanced NFT features.
nextjs-app-router-patterns
Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.
new-rails-project
Create a new Rails project