تخطَّ إلى المحتوى
مهارةمستورد

similarity-search-patterns

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

وصف مستورد لم يراجعه محرر بعد

جاء هذا العنصر من مستودعه الأصلي وفحصناه آلياً فقط، ولم يكتب له محرر وصفاً عربياً بعد. اقرأ محتواه بنفسك قبل أن تعتمد عليه. ولا تُفهرس هذه الصفحة في محركات البحث حتى تُراجَع.

التنزيل

الملفات: 2 · الحجم: 19 ك.ب

نزّل ملف ZIP

يحمل الملف ترخيص المصدر الأصلي.

التثبيت

بعد التنزيل، شغّل الأمر في الطرفية. يسأل unzip قبل أن يستبدل أي ملف موجود.

  • لهذا المشروع

    يوضع في: .claude/skills/llm-application-dev-similarity-search-patterns/

    mkdir -p .claude/skills && unzip ~/Downloads/llm-application-dev-similarity-search-patterns.zip -d .claude/skills

  • لحسابك على الجهاز كله

    يوضع في: ~/.claude/skills/llm-application-dev-similarity-search-patterns/

    mkdir -p ~/.claude/skills && unzip ~/Downloads/llm-application-dev-similarity-search-patterns.zip -d ~/.claude/skills

التعليمات

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

الملفات

  • مجلدreferences15 ك.ب
    • details.md15 ك.ب
  • LICENSE1 ك.ب
  • SKILL.md2.7 ك.ب

التعليقات (0)

لا تعليقات بعد. كن أول من يعلّق.

سجّل الدخول لتعلّق. التعليق من المستوى 1 (عضو).

أبلغ

عناصر مشابهة

  • مهارةمستورد

    aeon

    This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns

    BSD-3-Clauseالملفات: 12

  • مهارةمستورد

    agent-management

    Create, manage, and orchestrate AI agents using the AI Maestro CLI. Use when the user asks to "create agent", "list agents", "delete agent", "hibernate agent", "wake agent", "install plugin", "show agent", "restart agent", or any agent life

    MITالملفات: 1

  • مهارةمستورد

    agent-memory-mcp

    A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).

    MITالملفات: 1

  • مهارةمستورد

    agent-tool-builder

    Tools are how AI agents interact with the world. A well-designed tool is the difference between an agent that works and one that hallucinates, fails silently, or costs 10x more tokens than necessary. This skill covers tool design from sche

    MITالملفات: 1

  • مهارةمستورد

    agents-crewai

    Multi-agent orchestration framework for autonomous AI collaboration. Use when building teams of specialized agents working together on complex tasks, when you need role-based agent collaboration with memory, or for production workflows requ

    MITالملفات: 4

  • مهارةمستورد

    agents-langchain

    Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for bui

    MITالملفات: 4