SkillAgentSearch skills...

similarity-search-patterns

Implement efficient similarity search with vector databases

Install / Use

npx skills add wshobson/agents --skill similarity-search-patterns

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

79/100

Supported Platforms

Universal

Our assessment of similarity-search-patterns

similarity-search-patterns scores 79/100 on our quality scale, 151st of 219 Data & Analytics skills we index.

Its SKILL.md is 2.3 KB long, well organised into 9 sections with 1 code example: moderately detailed.

With 39,920 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
20/30
Structure
17/20
Description
8/15
Adoption
20/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 5 days ago, so similarity-search-patterns is actively maintained.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

similarity-search-patterns compared with similar skills

All 4 of these similar skills score higher than similarity-search-patterns; compare them before choosing.

SkillScoreStarsUpdatedFormat
similarity-search-patterns (this skill)by wshobson7939.9k5d agoSKILL.md
algorithmic-artby anthropics100177.9k4d agoSKILL.md
pptxby anthropics100177.9k4d agoSKILL.md
designby nextlevelbuilder100130.2k5d agoSKILL.md
ui-ux-pro-maxby nextlevelbuilder100130.2k5d agoSKILL.md

Frequently asked questions

How do I install similarity-search-patterns?
Run npx skills add wshobson/agents --skill similarity-search-patterns. The install tabs above show the steps for each supported agent.
Which AI agents does similarity-search-patterns work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is similarity-search-patterns safe to use?
It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is similarity-search-patterns still maintained?
The repository was last updated 5 days ago, so similarity-search-patterns is actively maintained.

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

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 and detailed worked examples

Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.

Best Practices

Do's

  • Use appropriate index - HNSW for most cases
  • Tune parameters - ef_search, nprobe for recall/speed
  • Implement hybrid search - Combine with keyword search
  • Monitor recall - Measure search quality
  • Pre-filter when possible - Reduce search space

Don'ts

  • Don't skip evaluation - Measure before optimizing
  • Don't over-index - Start with flat, scale up
  • Don't ignore latency - P99 matters for UX
  • Don't forget costs - Vector storage adds up

Related Skills

View on GitHub
GitHub Stars39.9k
CategoryData
Updated5d ago
Forks4.3k

Languages

Python

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions