मुख्य सामग्री पर जाएँ
Skillpedia
मशीन लर्निंग41k · #6726

similarity-search-patterns

यह क्या करती है

यह टूल बड़े डेटा में मिलती-जुलती जानकारी खोजने में मदद करता है, जैसे किसी विशाल कैटलॉग में 'मिलते-जुलते आइटम' ढूँढना। यह इसके लिए उन्नत तरीके इस्तेमाल करता है, जो तेज़ और कारगर होते हैं।

कब इस्तेमाल करें

  • ✓जब आप ऐसा सर्च सिस्टम बनाना चाहते हैं जो आपके सवाल का मतलब समझे।
  • ✓जब दस्तावेज़ों के आधार पर सवालों के जवाब देने वाला सिस्टम बना रहे हों।
  • ✓उत्पादों या कंटेंट के लिए पर्सनलाइज़्ड सुझाव बनाने के लिए।

Skill का लिंक

https://github.com/wshobson/agents/blob/main/plugins/llm-application-dev/skills/similarity-search-patterns/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/wshobson/agents/blob/main/plugins/llm-application-dev/skills/similarity-search-patterns/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“वीगन खाने के बारे में इस टेक्स्ट से मिलते-जुलते दस्तावेज़ खोजो।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

अंदर से यह आपके डेटा को संख्याओं (vectors) में बदलता है और गणितीय तरीकों से पता लगाता है कि कौन सी संख्याएँ एक-दूसरे के सबसे करीब हैं। फिर इन्हें खास इंडेक्स में व्यवस्थित करता है, ताकि खोज बहुत तेज़ हो।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

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
अक्सर पूछे जाने वाले सवाल

'distance metrics' क्या होते हैं?

ये गणितीय सूत्र हैं जो मापते हैं कि दो संख्या-समूह (vectors) एक-दूसरे से कितने 'दूर' या 'नज़दीक' हैं। इससे मिलती-जुलती जानकारी खोजने में मदद मिलती है।

'index types' क्या हैं?

ये डेटा को व्यवस्थित करने के अलग-अलग तरीके हैं, ताकि खोज तेज़ हो सके। कुछ ज़्यादा सटीक होते हैं, कुछ ज़्यादा तेज़, और हर एक अलग आकार के डेटा के लिए अच्छा होता है।

'hybrid search' क्या है?

यह मतलब-आधारित (semantic) खोज को सटीक कीवर्ड खोज के साथ मिलाना है। इससे ऐसे नतीजे मिलते हैं जो मतलब के हिसाब से भी सही हों और उनमें आपके लिखे शब्द भी हों।

जानकारी

लेखक का मूल विवरण

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

repo: wshobson/agents

लोकप्रियता

GitHub स्टार
41k
रैंकिंग में स्थान
#6726
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills