From llm-application-dev
Implements efficient similarity search with vector databases. Use when building semantic search, nearest neighbor queries, RAG retrieval, recommendation engines, or optimizing retrieval performance.
How this skill is triggered — by the user, by Claude, or both
Slash command
/llm-application-dev:similarity-search-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Patterns for implementing efficient similarity search in production systems.
Patterns for implementing efficient similarity search in production systems.
| 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 |
┌─────────────────────────────────────────────────┐
│ Index Types │
├─────────────┬───────────────┬───────────────────┤
│ Flat │ HNSW │ IVF+PQ │
│ (Exact) │ (Graph-based) │ (Quantized) │
├─────────────┼───────────────┼───────────────────┤
│ O(n) search │ O(log n) │ O(√n) │
│ 100% recall │ ~95-99% │ ~90-95% │
│ Small data │ Medium-Large │ Very Large │
└─────────────┴───────────────┴───────────────────┘
Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.
npx claudepluginhub wshobson/agents --plugin llm-application-devImplements efficient similarity search with vector databases for semantic search, nearest neighbor queries, RAG retrieval, and recommendation engines. Covers scaling and hybrid search patterns.
<!-- AUTO-GENERATED by export-plugins.py — DO NOT EDIT -->
Provides patterns and Python templates for similarity search with vector databases, including metrics, indexes, and Pinecone implementation. Use for semantic search, RAG, recommendations, and scaling.