Agent skill

similarity-search-patterns

Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.

majiayu000534★ · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill similarity-search-patterns-tringo0108-z-command --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 17 KB
Bundled scripts: none
Path: skills/ai-ml/similarity-search-patterns-tringo0108-z-command/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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 ``` ┌─────────────────────────────────────────────────┐ │ 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 │ └─────────────┴───────────────┴───────────────────┘ ``` ## Templates ### Template 1: Pinecone Implementation ```python from pinecone import Pinecone, ServerlessSpec from typing impor

What's inside
Steps it walks through
  1. When to Use This Skill
  2. Core Concepts
  3. 1. Distance Metrics
  4. 2. Index Types
  5. Templates
  6. Template 1: Pinecone Implementation
  7. Template 2: Qdrant Implementation
  8. Template 3: pgvector with PostgreSQL
  9. Template 4: Weaviate Implementation
  10. Best Practices
  11. Do's
  12. Don'ts
  13. Resources
  14. Parent Hub
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the similarity-search-patterns skill do?

Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill similarity-search-patterns-tringo0108-z-command --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going