
Similarity Search Patterns
Solid patterns for building semantic search systems with vector databases like Pinecone and Qdrant. Covers the essentials you actually need: distance metrics, indexing strategies, batch operations, and hybrid search with reranking. The templates handle real production concerns like quantization for memory efficiency, filtering, and proper batching. One thing I appreciate is it doesn't oversell approximate search accuracy, giving you realistic recall expectations for different index types. If you're building RAG systems or recommendation engines, this gives you working code that scales beyond toy datasets.
- skills.sh installs
- 11K
- GitHub stars
- 42.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add wshobson/agents --skill similarity-search-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
Similarity Search Patterns
Patterns for implementing efficient similarity search in production systems.
When to Use This Skill
- Building semantic search systems
- Implementing RAG retrieval
- Creating recommendation engines
- Optimizing search latency
- Scaling to millions of vectors
- Combining semantic and keyword search
Core Concepts
1. Distance Metrics
| Metric | Formula | Best For | | ------------------ | ------------------ | --------------------- | --- | -------------- | | Cosine | 1 - (A·B)/(‖A‖‖B‖) | Normalized embeddings | | Euclidean (L2) | √Σ(a-b)² | Raw embeddings | | Dot Product | A·B | Magnitude matters | | Manhattan (L1) | Σ | a-b | | Sparse vectors |
2. Index Types
Sponsors
Details
- Repository
- github.com/wshobson/agents
- Categories
- AI & Agent Building, Debugging
More from wshobson/agents
All 174- Vector Index Tuning11K
- Hybrid Cloud Networking11K
- Turborepo Caching11K
- Pci Compliance10.9K
- Projection Patterns10.9K
- Employment Contract Templates10.9K
- Slo Implementation10.8K
- Defi Protocol Templates10.8K
- Team Composition Analysis10.7K
- Mtls Configuration10.7K
- On Call Handoff Patterns10.7K
- Service Mesh Observability10.7K
- Track Management10.7K
- Bazel Build Optimization10.6K
- Istio Traffic Management10.6K
- Nft Standards10.6K
- Linkerd Patterns10.6K
- Parallel Debugging10.4K
- Parallel Feature Development10.3K
- Task Coordination Strategies10.2K
- Multi Reviewer Patterns10.2K
- Team Communication Protocols10K
- Team Composition Patterns10K
- Evaluation Methodology7.6K