ai-llm-search-retrieval

Design hybrid search systems combining BM25 and vector retrieval.

73|16|Updated Nov 14, 2025
One-click install
npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill ai-llm-search-retrieval
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-llm-search-retrieval
Source: https://github.com/vasilyu1983/AI-Agents-public/tree/main/frameworks/claude-code-kit/initial-setup/skills/ai-llm-search-retrieval
Command: npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill ai-llm-search-retrieval

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Traditional keyword search often misses semantic meaning, while pure vector search can struggle with exact matches. This Skill provides operational patterns for building modern search systems with hybrid retrieval and advanced ranking for significant relevance gains.

Core Features & Use Cases

  • Hybrid Search (Modern Standard): Combine BM25 lexical search with dense vector search and Reciprocal Rank Fusion (RRF) for optimal relevance across diverse query types.
  • Scalable Indexing: Implement billion-scale HNSW-IF and multi-vector HNSW indexing for efficient approximate nearest neighbor search on massive datasets.
  • Ranking Pipelines: Design multi-stage ranking architectures, including cross-encoder reranking and LLM-based query rewriting, to refine search results and improve quality.

Quick Start

Use the ai-llm-search-retrieval skill to design a hybrid search configuration for an e-commerce product catalog, combining BM25 and vector search.

Frequently Asked Questions about ai-llm-search-retrieval

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I combine keyword and vector search for better relevance?

Hybrid search combines BM25 lexical matching with dense vector search using Reciprocal Rank Fusion to balance exact-match precision and semantic understanding, delivering higher relevance across diverse query types without sacrificing either capability.

What's the best way to scale search indexing to billions of documents?

HNSW-IF and multi-vector HNSW indexing enable approximate nearest neighbor search on massive datasets with sub-linear query time, supporting billion-scale document collections while maintaining efficient memory and latency characteristics.

How do I improve search result quality with ranking pipelines?

Multi-stage ranking architectures using cross-encoder reranking and LLM-based query rewriting progressively refine search results, identifying top-k candidates at each stage to boost final result quality without full dataset re-scoring.

When should I use hybrid search instead of pure vector search?

Hybrid search excels when your queries require exact phrase matching, domain-specific terminology, or catalog lookups alongside semantic similarity, whereas pure vector search alone struggles with precise lexical requirements or numerical identifiers.

Can I implement search ranking without a machine learning model?

Yes—BM25 statistical ranking and rule-based multi-stage architectures deliver strong relevance gains without ML dependencies, though cross-encoder reranking and LLM-based query rewriting introduce learning-based refinement for specialized use cases.

What data preparation is needed before building a hybrid search system?

Hybrid search requires tokenized text for BM25 indexing and dense vector embeddings for HNSW indexing; prepare documents with consistent field schemas, generate embeddings via embedding models, and structure metadata for both lexical and semantic lookups.