similarity-search-patterns

Implement similarity search patterns for vector databases and ranked retrieval.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Jhabbig/Habbig --skill similarity-search-patterns-jhabbig
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: similarity-search-patterns
Source: https://github.com/Jhabbig/Habbig/tree/main/.claude/plugins/wshobson/llm-application-dev/skills/similarity-search-patterns
Command: npx skills add https://github.com/Jhabbig/Habbig --skill similarity-search-patterns-jhabbig

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams build fast, accurate similarity search systems that find semantically related content without hand-tuning every query.

Core Features & Use Cases

  • Vector search patterns: Choose the right distance metric, index type, and retrieval strategy for your workload.
  • Production implementations: Adapt the templates for Pinecone, Qdrant, pgvector, or Weaviate.
  • Hybrid retrieval: Combine semantic and keyword search, add metadata filters, and rerank results for better relevance.
  • Use case: A product team can power document search, RAG retrieval, or recommendation matching with the same core patterns.

Quick Start

Use this Skill to design a similarity search pipeline for your app and adapt the most relevant vector store template to your data, latency target, and filtering needs.

Frequently Asked Questions about similarity-search-patterns

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

FAQPage Schema
How do I build a similarity search pipeline for RAG retrieval?

To build a similarity search pipeline for RAG retrieval, you select an appropriate distance metric, tune the index type, and apply batch upserts with filtered queries to find semantically related content. You can then rerank the retrieval results to improve relevance.

What is hybrid search and when should I combine keyword and vector search?

Hybrid search combines semantic vector search with traditional keyword search to improve result accuracy. You should use hybrid retrieval when you need to match both the semantic meaning and specific metadata or keyword terms, often adding metadata filters and reranking for better relevance.

How do I tune HNSW index parameters for vector database deployments?

Tuning HNSW index parameters involves selecting the right index type and distance metric for your workload to balance search latency and accuracy. You adjust the index settings within your vector database deployment to achieve your specific latency-aware production patterns.

Can I use these similarity search patterns with pgvector, Pinecone, Qdrant, and Weaviate?

Yes, these similarity search patterns include production implementations that adapt to Pinecone, Qdrant, pgvector, and Weaviate deployments. You can adapt the templates to your specific data, latency targets, and filtering needs across these supported vector stores.

What is the best way to improve semantic search relevance with reranking?

The best way to improve semantic search relevance is to apply a reranking step after the initial vector retrieval. Reranking processes the top retrieved results to reorder them based on more accurate relevance signals, combining hybrid keyword and vector scores with metadata filters.

Why does my vector search return slow query latency in production?

Slow vector search query latency often results from unoptimized index tuning, improper distance metric selection, or missing latency-aware production patterns. You can resolve this by applying batch upserts, tuning your index type, and using filtered queries to narrow the search space.