similarity-search-patterns

Implement similarity search patterns for vector databases with index templates.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides reusable patterns to implement robust similarity search over vector stores, helping teams build semantic search, RAG, and recommendations with efficient retrieval.

Core Features & Use Cases

  • Patterns for distance metrics (cosine, L2, dot) and scalable indexing strategies.
  • Templates and examples for popular vector stores (Pinecone, Qdrant, pgvector, Weaviate).
  • Guidance on batching, indexing, reranking, and hybrid search to optimize latency and recall.

Quick Start

Provide a sample query vector and required parameters to retrieve the top-k similar items from your vector store.

Frequently Asked Questions about similarity-search-patterns

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

FAQPage Schema
How do I implement similarity search in a vector database for a RAG pipeline?

Similarity search in a vector database retrieves nearest neighbors using distance metrics like cosine or L2. This Skill provides reusable patterns and templates for Pinecone, Qdrant, pgvector, and Weaviate to build efficient RAG pipelines.

What is the best way to optimize nearest neighbor search latency and recall?

Optimizing nearest neighbor search requires scalable indexing strategies, batching, and reranking. This Skill provides patterns to tune distance metrics and indexing approaches to improve retrieval latency and recall across large-scale vector stores.

Does this Skill provide templates for pgvector and Weaviate?

Yes, this Skill provides ready-made templates and examples for pgvector and Weaviate, along with Pinecone and Qdrant, to help implement vector indexing and semantic search without starting from scratch.

Can I use these patterns for hybrid search and large-scale recommendations?

Yes, these similarity search patterns support hybrid search and large-scale recommendations across diverse domains. They include guidance on batching and reranking to retrieve top-k similar items efficiently.

When should I use cosine similarity versus L2 distance for semantic search?

Cosine similarity measures angular distance, ideal for text semantic search, while L2 distance measures straight-line vector magnitude. This Skill guides choosing the right distance metric and indexing strategy for your vector database workload.

Why does my vector database similarity search return poor results?

Poor similarity search results often stem from mismatched distance metrics or inefficient vector indexing. This Skill helps resolve retrieval issues by providing patterns for proper metric selection, batching, and reranking.