[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74FEZT0S6F5QWWQRMYM374B":3,"skill-same:01M74FEZT0S6F5QWWQRMYM374B":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":13,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M74FEZT0S6F5QWWQRMYM374B","qdrant-vector-search",null,"High-performance vector similarity search engine for RAG and semantic search. Use when building production RAG systems requiring fast nearest neighbor search, hybrid search with filtering, or scalable vector storage with Rust-powered performance.","lzy18001500226\u002FMoSim","lzy18001500226","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F152623587?v=4","01M71ZMEX36NK05B642131DEEK","01M71ZMEXSMX72KPVNJ572G0CM",0,"MIT","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FPlatforms\u002Fhermes-agent\u002Foptional-skills\u002Fmlops\u002Fqdrant\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: qdrant-vector-search\ndescription: High-performance vector similarity search engine for RAG and semantic search. Use when building production RAG systems requiring fast nearest neighbor search, hybrid search with filtering, or scalable vector storage with Rust-powered performance.\nversion: 1.0.0\nauthor: Orchestra Research\nlicense: MIT\ndependencies: [qdrant-client>=1.12.0]\nplatforms: [linux, macos, windows]\nmetadata:\n  hermes:\n    tags: [RAG, Vector Search, Qdrant, Semantic Search, Embeddings, Similarity Search, HNSW, Production, Distributed]\n\n---\n\n# Qdrant - Vector Similarity Search Engine\n\nHigh-performance vector database written in Rust for production RAG and semantic search.\n\n## When to use Qdrant\n\n**Use Qdrant when:**\n- Building production RAG systems requiring low latency\n- Need hybrid search (vectors + metadata filtering)\n- Require horizontal scaling with sharding\u002Freplication\n- Want on-premise deployment with full data control\n- Need multi-vector storage per record (dense + sparse)\n- Building real-time recommendation systems\n\n**Key features:**\n- **Rust-powered**: Memory-safe, high performance\n- **Rich filtering**: Filter by any payload field during search\n- **Multiple vectors**: Dense, sparse, multi-dense per point\n- **Quantization**: Scalar, product, binary for memory efficiency\n- **Distributed**: Raft consensus, sharding, replication\n- **REST + gRPC**: Both APIs with full feature parity\n\n**Use alternatives instead:**\n- **Chroma**: Simpler setup, embedded use cases\n- **FAISS**: Maximum raw speed, research\u002Fbatch processing\n- **Pinecone**: Fully managed, zero ops preferred\n- **Weaviate**: GraphQL preference, built-in vectorizers\n\n## Quick start\n\n### Installation\n\n```bash\n# Python client\npip install qdrant-client\n\n# Docker (recommended for development)\ndocker run -p 6333:6333 -p 6334:6334 qdrant\u002Fqdrant\n\n# Docker with persistent storage\ndocker run -p 6333:6333 -p 6334:6334 \\\n    -v $(pwd)\u002Fqdrant_storage:\u002Fqdrant\u002Fstorage \\\n    qdrant\u002Fqdrant\n```\n\n### Basic usage\n\n```python\nfrom qdrant_client import QdrantClient\nfrom qdrant_client.models import Distance, VectorParams, PointStruct\n\n# Connect to Qdrant\nclient = QdrantClient(host=\"localhost\", port=6333)\n\n# Create collection\nclient.create_collection(\n    collection_name=\"documents\",\n    vectors_config=VectorParams(size=384, distance=Distance.COSINE)\n)\n\n# Insert vectors with payload\nclient.upsert(\n    collection_name=\"documents\",\n    points=[\n        PointStruct(\n            id=1,\n            vector=[0.1, 0.2, ...],  # 384-dim vector\n            payload={\"title\": \"Doc 1\", \"category\": \"tech\"}\n        ),\n        PointStruct(\n            id=2,\n            vector=[0.3, 0.4, ...],\n            payload={\"title\": \"Doc 2\", \"category\": \"science\"}\n        )\n    ]\n)\n\n# Search with filtering\nresults = client.search(\n    collection_name=\"documents\",\n    query_vector=[0.15, 0.25, ...],\n    query_filter={\n        \"must\": [{\"key\": \"category\", \"match\": {\"value\": \"tech\"}}]\n    },\n    limit=10\n)\n\nfor point in results:\n    print(f\"ID: {point.id}, Score: {point.score}, Payload: {point.payload}\")\n```\n\n## Core concepts\n\n### Points - Basic data unit\n\n```python\nfrom qdrant_client.models import PointStruct\n\n# Point = ID + Vector(s) + Payload\npoint = PointStruct(\n    id=123,                              # Integer or UUID string\n    vector=[0.1, 0.2, 0.3, ...],        # Dense vector\n    payload={                            # Arbitrary JSON metadata\n        \"title\": \"Document title\",\n        \"category\": \"tech\",\n        \"timestamp\": 1699900000,\n        \"tags\": [\"python\", \"ml\"]\n    }\n)\n\n# Batch upsert (recommended)\nclient.upsert(\n    collection_name=\"documents\",\n    points=[point1, point2, point3],\n    wait=True  # Wait for indexing\n)\n```\n\n### Collections - Vector containers\n\n```python\nfrom qdrant_client.models import VectorParams, Distance, HnswConfigDiff\n\n# Create with HNSW configuration\nclient.create_collection(\n    collection_name=\"documents\",\n    vectors_config=VectorParams(\n        size=384,                        # Vector dimensions\n        distance=Distance.COSINE         # COSINE, EUCLID, DOT, MANHATTAN\n    ),\n    hnsw_config=HnswConfigDiff(\n        m=16,                            # Connections per node (default 16)\n        ef_construct=100,                # Build-time accuracy (default 100)\n        full_scan_threshold=10000        # Switch to brute force below this\n    ),\n    on_disk_payload=True                 # Store payload on disk\n)\n\n# Collection info\ninfo = client.get_collection(\"documents\")\nprint(f\"Points: {info.points_count}, Vectors: {info.vectors_count}\")\n```\n\n### Distance metrics\n\n| Metric | Use Case | Range |\n|--------|----------|-------|\n| `COSINE` | Text embeddings, normalized vectors | 0 to 2 |\n| `EUCLID` | Spatial data, image features | 0 to ∞ |\n| `DOT` | Recommendations, unnormalized | -∞ to ∞ |\n| `MANHATTAN` | Sparse features, discrete data | 0 to ∞ |\n\n## Search operations\n\n### Basic search\n\n```python\n# Simple nearest neighbor search\nresults = client.search(\n    collection_name=\"documents\",\n    query_vector=[0.1, 0.2, ...],\n    limit=10,\n    with_payload=True,\n    with_vectors=False  # Don't return vectors (faster)\n)\n```\n\n### Filtered search\n\n```python\nfrom qdrant_client.models import Filter, FieldCondition, MatchValue, Range\n\n# Complex filtering\nresults = client.search(\n    collection_name=\"documents\",\n    query_vector=query_embedding,\n    query_filter=Filter(\n        must=[\n            FieldCondition(key=\"category\", match=MatchValue(value=\"tech\")),\n            FieldCondition(key=\"timestamp\", range=Range(gte=1699000000))\n        ],\n        must_not=[\n            FieldCondition(key=\"status\", match=MatchValue(value=\"archived\"))\n        ]\n    ),\n    limit=10\n)\n\n# Shorthand filter syntax\nresults = client.search(\n    collection_name=\"documents\",\n    query_vector=query_embedding,\n    query_filter={\n        \"must\": [\n            {\"key\": \"category\", \"match\": {\"value\": \"tech\"}},\n            {\"key\": \"price\", \"range\": {\"gte\": 10, \"lte\": 100}}\n        ]\n    },\n    limit=10\n)\n```\n\n### Batch search\n\n```python\nfrom qdrant_client.models import SearchRequest\n\n# Multiple queries in one request\nresults = client.search_batch(\n    collection_name=\"documents\",\n    requests=[\n        SearchRequest(vector=[0.1, ...], limit=5),\n        SearchRequest(vector=[0.2, ...], limit=5, filter={\"must\": [...]}),\n        SearchRequest(vector=[0.3, ...], limit=10)\n    ]\n)\n```\n\n## RAG integration\n\n### With sentence-transformers\n\n```python\nfrom sentence_transformers import SentenceTransformer\nfrom qdrant_client import QdrantClient\nfrom qdrant_client.models import VectorParams, Distance, PointStruct\n\n# Initialize\nencoder = SentenceTransformer(\"all-MiniLM-L6-v2\")\nclient = QdrantClient(host=\"localhost\", port=6333)\n\n# Create collection\nclient.create_collection(\n    collection_name=\"knowledge_base\",\n    vectors_config=VectorParams(size=384, distance=Distance.COSINE)\n)\n\n# Index documents\ndocuments = [\n    {\"id\": 1, \"text\": \"Python is a programming language\", \"source\": \"wiki\"},\n    {\"id\": 2, \"text\": \"Machine learning uses algorithms\", \"source\": \"textbook\"},\n]\n\npoints = [\n    PointStruct(\n        id=doc[\"id\"],\n        vector=encoder.encode(doc[\"text\"]).tolist(),\n        payload={\"text\": doc[\"text\"], \"source\": doc[\"source\"]}\n    )\n    for doc in documents\n]\nclient.upsert(collection_name=\"knowledge_base\", points=points)\n\n# RAG retrieval\ndef retrieve(query: str, top_k: int = 5) -> list[dict]:\n    query_vector = encoder.encode(query).tolist()\n    results = client.search(\n        collection_name=\"knowledge_base\",\n        query_vector=query_vector,\n        limit=top_k\n    )\n    return [{\"text\": r.payload[\"text\"], \"score\": r.score} for r in results]\n\n# Use in RAG pipeline\ncontext = retrieve(\"What is Python?\")\nprompt = f\"Context: {context}\\n\\nQuestion: What is Python?\"\n```\n\n### With LangChain\n\n```python\nfrom langchain_community.vectorstores import Qdrant\nfrom langchain_community.embeddings import HuggingFaceEmbeddings\n\nembeddings = HuggingFaceEmbeddings(model_name=\"all-MiniLM-L6-v2\")\nvectorstore = Qdrant.from_documents(documents, embeddings, url=\"http:\u002F\u002Flocalhost:6333\", collection_name=\"docs\")\nretriever = vectorstore.as_retriever(search_kwargs={\"k\": 5})\n```\n\n### With LlamaIndex\n\n```python\nfrom llama_index.vector_stores.qdrant import QdrantVectorStore\nfrom llama_index.core import VectorStoreIndex, StorageContext\n\nvector_store = QdrantVectorStore(client=client, collection_name=\"llama_docs\")\nstorage_context = StorageContext.from_defaults(vector_store=vector_store)\nindex = VectorStoreIndex.from_documents(documents, storage_context=storage_context)\nquery_engine = index.as_query_engine()\n```\n\n## Multi-vector support\n\n### Named vectors (different embedding models)\n\n```python\nfrom qdrant_client.models import VectorParams, Distance\n\n# Collection with multiple vector types\nclient.create_collection(\n    collection_name=\"hybrid_search\",\n    vectors_config={\n        \"dense\": VectorParams(size=384, distance=Distance.COSINE),\n        \"sparse\": VectorParams(size=30000, distance=Distance.DOT)\n    }\n)\n\n# Insert with named vectors\nclient.upsert(\n    collection_name=\"hybrid_search\",\n    points=[\n        PointStruct(\n            id=1,\n            vector={\n                \"dense\": dense_embedding,\n                \"sparse\": sparse_embedding\n            },\n            payload={\"text\": \"document text\"}\n        )\n    ]\n)\n\n# Search specific vector\nresults = client.search(\n    collection_name=\"hybrid_search\",\n    query_vector=(\"dense\", query_dense),  # Specify which vector\n    limit=10\n)\n```\n\n### Sparse vectors (BM25, SPLADE)\n\n```python\nfrom qdrant_client.models import SparseVectorParams, SparseIndexParams, SparseVector\n\n# Collection with sparse vectors\nclient.create_collection(\n    collection_name=\"sparse_search\",\n    vectors_config={},\n    sparse_vectors_config={\"text\": SparseVectorParams(index=SparseIndexParams(on_disk=False))}\n)\n\n# Insert sparse vector\nclient.upsert(\n    collection_name=\"sparse_search\",\n    points=[PointStruct(id=1, vector={\"text\": SparseVector(indices=[1, 5, 100], values=[0.5, 0.8, 0.2])}, payload={\"text\": \"document\"})]\n)\n```\n\n## Quantization (memory optimization)\n\n```python\nfrom qdrant_client.models import ScalarQuantization, ScalarQuantizationConfig, ScalarType\n\n# Scalar quantization (4x memory reduction)\nclient.create_collection(\n    collection_name=\"quantized\",\n    vectors_config=VectorParams(size=384, distance=Distance.COSINE),\n    quantization_config=ScalarQuantization(\n        scalar=ScalarQuantizationConfig(\n            type=ScalarType.INT8,\n            quantile=0.99,        # Clip outliers\n            always_ram=True      # Keep quantized in RAM\n        )\n    )\n)\n\n# Search with rescoring\nresults = client.search(\n    collection_name=\"quantized\",\n    query_vector=query,\n    search_params={\"quantization\": {\"rescore\": True}},  # Rescore top results\n    limit=10\n)\n```\n\n## Payload indexing\n\n```python\nfrom qdrant_client.models import PayloadSchemaType\n\n# Create payload index for faster filtering\nclient.create_payload_index(\n    collection_name=\"documents\",\n    field_name=\"category\",\n    field_schema=PayloadSchemaType.KEYWORD\n)\n\nclient.create_payload_index(\n    collection_name=\"documents\",\n    field_name=\"timestamp\",\n    field_schema=PayloadSchemaType.INTEGER\n)\n\n# Index types: KEYWORD, INTEGER, FLOAT, GEO, TEXT (full-text), BOOL\n```\n\n## Production deployment\n\n### Qdrant Cloud\n\n```python\nfrom qdrant_client import QdrantClient\n\n# Connect to Qdrant Cloud\nclient = QdrantClient(\n    url=\"https:\u002F\u002Fyour-cluster.cloud.qdrant.io\",\n    api_key=\"your-api-key\"\n)\n```\n\n### Performance tuning\n\n```python\n# Optimize for search speed (higher recall)\nclient.update_collection(\n    collection_name=\"documents\",\n    hnsw_config=HnswConfigDiff(ef_construct=200, m=32)\n)\n\n# Optimize for indexing speed (bulk loads)\nclient.update_collection(\n    collection_name=\"documents\",\n    optimizer_config={\"indexing_threshold\": 20000}\n)\n```\n\n## Best practices\n\n1. **Batch operations** - Use batch upsert\u002Fsearch for efficiency\n2. **Payload indexing** - Index fields used in filters\n3. **Quantization** - Enable for large collections (>1M vectors)\n4. **Sharding** - Use for collections >10M vectors\n5. **On-disk storage** - Enable `on_disk_payload` for large payloads\n6. **Connection pooling** - Reuse client instances\n\n## Common issues\n\n**Slow search with filters:**\n```python\n# Create payload index for filtered fields\nclient.create_payload_index(\n    collection_name=\"docs\",\n    field_name=\"category\",\n    field_schema=PayloadSchemaType.KEYWORD\n)\n```\n\n**Out of memory:**\n```python\n# Enable quantization and on-disk storage\nclient.create_collection(\n    collection_name=\"large_collection\",\n    vectors_config=VectorParams(size=384, distance=Distance.COSINE),\n    quantization_config=ScalarQuantization(...),\n    on_disk_payload=True\n)\n```\n\n**Connection issues:**\n```python\n# Use timeout and retry\nclient = QdrantClient(\n    host=\"localhost\",\n    port=6333,\n    timeout=30,\n    prefer_grpc=True  # gRPC for better performance\n)\n```\n\n## References\n\n- **[Advanced Usage](references\u002Fadvanced-usage.md)** - Distributed mode, hybrid search, recommendations\n- **[Troubleshooting](references\u002Ftroubleshooting.md)** - Common issues, debugging, performance tuning\n\n## Resources\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fqdrant\u002Fqdrant (22k+ stars)\n- **Docs**: https:\u002F\u002Fqdrant.tech\u002Fdocumentation\u002F\n- **Python Client**: https:\u002F\u002Fgithub.com\u002Fqdrant\u002Fqdrant-client\n- **Cloud**: https:\u002F\u002Fcloud.qdrant.io\n- **Version**: 1.12.0+\n- **License**: Apache 2.0\n","# Qdrant - Vector Similarity Search Engine\n\nHigh-performance vector database written in Rust for production RAG and semantic search.\n\n## When to use Qdrant\n\n**Use Qdrant when:**\n- Building production RAG systems requiring low latency\n- Need hybrid search (vectors + metadata filtering)\n- Require horizontal scaling with sharding\u002Freplication\n- Want on-premise deployment with full data control\n- Need multi-vector storage per record (dense + sparse)\n- Building real-time recommendation systems\n\n**Key features:**\n- **Rust-powered**: Memory-safe, high performance\n- **Rich filtering**: Filter by any payload field during search\n- **Multiple vectors**: Dense, sparse, multi-dense per point\n- **Quantization**: Scalar, product, binary for memory efficiency\n- **Distributed**: Raft consensus, sharding, replication\n- **REST + gRPC**: Both APIs with full feature parity\n\n**Use alternatives instead:**\n- **Chroma**: Simpler setup, embedded use cases\n- **FAISS**: Maximum raw speed, research\u002Fbatch processing\n- **Pinecone**: Fully managed, zero ops preferred\n- **Weaviate**: GraphQL preference, built-in vectorizers\n\n## Quick start\n\n### Installation\n\n```bash\n# Python client\npip install qdrant-client\n\n# Docker (recommended for development)\ndocker run -p 6333:6333 -p 6334:6334 qdrant\u002Fqdrant\n\n# Docker with persistent storage\ndocker run -p 6333:6333 -p 6334:6334 \\\n    -v $(pwd)\u002Fqdrant_storage:\u002Fqdrant\u002Fstorage \\\n    qdrant\u002Fqdrant\n```\n\n### Basic usage\n\n```python\nfrom qdrant_client import QdrantClient\nfrom qdrant_client.models import Distance, VectorParams, PointStruct\n\n# Connect to Qdrant\nclient = QdrantClient(host=\"localhost\", port=6333)\n\n# Create collection\nclient.create_collection(\n    collection_name=\"documents\",\n    vectors_config=VectorParams(size=384, distance=Distance.COSINE)\n)\n\n# Insert vectors with payload\nclient.upsert(\n    collection_name=\"documents\",\n    points=[\n        PointStruct(\n            id=1,\n            vector=[0.1, 0.2, ...],  # 384-dim vector\n            payload={\"title\": \"Doc 1\", \"category\": \"tech\"}\n        ),\n        PointStruct(\n            id=2,\n            vector=[0.3, 0.4, ...],\n            payload={\"title\": \"Doc 2\", \"category\": \"science\"}\n        )\n    ]\n)\n\n# Search with filtering\nresults = client.search(\n    collection_name=\"documents\",\n    query_vector=[0.15, 0.25, ...],\n    query_filter={\n        \"must\": [{\"key\": \"category\", \"match\": {\"value\": \"tech\"}}]\n    },\n    limit=10\n)\n\nfor point in results:\n    print(f\"ID: {point.id}, Score: {point.score}, Payload: {point.payload}\")\n```\n\n## Core concepts\n\n### Points - Basic data unit\n\n```python\nfrom qdrant_client.models import PointStruct\n\n# Point = ID + Vector(s) + Payload\npoint = PointStruct(\n    id=123,                              # Integer or UUID string\n    vector=[0.1, 0.2, 0.3, ...],        # Dense vector\n    payload={                            # Arbitrary JSON metadata\n        \"title\": \"Document title\",\n        \"category\": \"tech\",\n        \"timestamp\": 1699900000,\n        \"tags\": [\"python\", \"ml\"]\n    }\n)\n\n# Batch upsert (recommended)\nclient.upsert(\n    collection_name=\"documents\",\n    points=[point1, point2, point3],\n    wait=True  # Wait for indexing\n)\n```\n\n### Collections - Vector containers\n\n```python\nfrom qdrant_client.models import VectorParams, Distance, HnswConfigDiff\n\n# Create with HNSW configuration\nclient.create_collection(\n    collection_name=\"documents\",\n    vectors_config=VectorParams(\n        size=384,                        # Vector dimensions\n        distance=Distance.COSINE         # COSINE, EUCLID, DOT, MANHATTAN\n    ),\n    hnsw_config=HnswConfigDiff(\n        m=16,                            # Connections per node (default 16)\n        ef_construct=100,                # Build-time accuracy (default 100)\n        full_scan_threshold=10000        # Switch to brute force below this\n    ),\n    on_disk_payload=True                 # Store payload on disk\n)\n\n# Collection info\ninfo = client.get_collection(\"documents\")\nprint(f\"Points: {info.points_count}, Vectors: {info.vectors_count}\")\n```\n\n### Distance metrics\n\n| Metric | Use Case | Range |\n|--------|----------|-------|\n| `COSINE` | Text embeddings, normalized vectors | 0 to 2 |\n| `EUCLID` | Spatial data, image features | 0 to ∞ |\n| `DOT` | Recommendations, unnormalized | -∞ to ∞ |\n| `MANHATTAN` | Sparse features, discrete data | 0 to ∞ |\n\n## Search operations\n\n### Basic search\n\n```python\n# Simple nearest neighbor search\nresults = client.search(\n    collection_name=\"documents\",\n    query_vector=[0.1, 0.2, ...],\n    limit=10,\n    with_payload=True,\n    with_vectors=False  # Don't return vectors (faster)\n)\n```\n\n### Filtered search\n\n```python\nfrom qdrant_client.models import Filter, FieldCondition, MatchValue, Range\n\n# Complex filtering\nresults = client.search(\n    collection_name=\"documents\",\n    query_vector=query_embedding,\n    query_filter=Filter(\n        must=[\n            FieldCondition(key=\"category\", match=MatchValue(value=\"tech\")),\n            FieldCondition(key=\"timestamp\", range=Range(gte=1699000000))\n        ],\n        must_not=[\n            FieldCondition(key=\"status\", match=MatchValue(value=\"archived\"))\n        ]\n    ),\n    limit=10\n)\n\n# Shorthand filter syntax\nresults = client.search(\n    collection_name=\"documents\",\n    query_vector=query_embedding,\n    query_filter={\n        \"must\": [\n            {\"key\": \"category\", \"match\": {\"value\": \"tech\"}},\n            {\"key\": \"price\", \"range\": {\"gte\": 10, \"lte\": 100}}\n        ]\n    },\n    limit=10\n)\n```\n\n### Batch search\n\n```python\nfrom qdrant_client.models import SearchRequest\n\n# Multiple queries in one request\nresults = client.search_batch(\n    collection_name=\"documents\",\n    requests=[\n        SearchRequest(vector=[0.1, ...], limit=5),\n        SearchRequest(vector=[0.2, ...], limit=5, filter={\"must\": [...]}),\n        SearchRequest(vector=[0.3, ...], limit=10)\n    ]\n)\n```\n\n## RAG integration\n\n### With sentence-transformers\n\n```python\nfrom sentence_transformers import SentenceTransformer\nfrom qdrant_client import QdrantClient\nfrom qdrant_client.models import VectorParams, Distance, PointStruct\n\n# Initialize\nencoder = SentenceTransformer(\"all-MiniLM-L6-v2\")\nclient = QdrantClient(host=\"localhost\", port=6333)\n\n# Create collection\nclient.create_collection(\n    collection_name=\"knowledge_base\",\n    vectors_config=VectorParams(size=384, distance=Distance.COSINE)\n)\n\n# Index documents\ndocuments = [\n    {\"id\": 1, \"text\": \"Python is a programming language\", \"source\": \"wiki\"},\n    {\"id\": 2, \"text\": \"Machine learning uses algorithms\", \"source\": \"textbook\"},\n]\n\npoints = [\n    PointStruct(\n        id=doc[\"id\"],\n        vector=encoder.encode(doc[\"text\"]).tolist(),\n        payload={\"text\": doc[\"text\"], \"source\": doc[\"source\"]}\n    )\n    for doc in documents\n]\nclient.upsert(collection_name=\"knowledge_base\", points=points)\n\n# RAG retrieval\ndef retrieve(query: str, top_k: int = 5) -> list[dict]:\n    query_vector = encoder.encode(query).tolist()\n    results = client.search(\n        collection_name=\"knowledge_base\",\n        query_vector=query_vector,\n        limit=top_k\n    )\n    return [{\"text\": r.payload[\"text\"], \"score\": r.score} for r in results]\n\n# Use in RAG pipeline\ncontext = retrieve(\"What is Python?\")\nprompt = f\"Context: {context}\\n\\nQuestion: What is Python?\"\n```\n\n### With LangChain\n\n```python\nfrom langchain_community.vectorstores import Qdrant\nfrom langchain_community.embeddings import HuggingFaceEmbeddings\n\nembeddings = HuggingFaceEmbeddings(model_name=\"all-MiniLM-L6-v2\")\nvectorstore = Qdrant.from_documents(documents, embeddings, url=\"http:\u002F\u002Flocalhost:6333\", collection_name=\"docs\")\nretriever = vectorstore.as_retriever(search_kwargs={\"k\": 5})\n```\n\n### With LlamaIndex\n\n```python\nfrom llama_index.vector_stores.qdrant import QdrantVectorStore\nfrom llama_index.core import VectorStoreIndex, StorageContext\n\nvector_store = QdrantVectorStore(client=client, collection_name=\"llama_docs\")\nstorage_context = StorageContext.from_defaults(vector_store=vector_store)\nindex = VectorStoreIndex.from_documents(documents, storage_context=storage_context)\nquery_engine = index.as_query_engine()\n```\n\n## Multi-vector support\n\n### Named vectors (different embedding models)\n\n```python\nfrom qdrant_client.models import VectorParams, Distance\n\n# Collection with multiple vector types\nclient.create_collection(\n    collection_name=\"hybrid_search\",\n    vectors_config={\n        \"dense\": VectorParams(size=384, distance=Distance.COSINE),\n        \"sparse\": VectorParams(size=30000, distance=Distance.DOT)\n    }\n)\n\n# Insert with named vectors\nclient.upsert(\n    collection_name=\"hybrid_search\",\n    points=[\n        PointStruct(\n            id=1,\n            vector={\n                \"dense\": dense_embedding,\n                \"sparse\": sparse_embedding\n            },\n            payload={\"text\": \"document text\"}\n        )\n    ]\n)\n\n# Search specific vector\nresults = client.search(\n    collection_name=\"hybrid_search\",\n    query_vector=(\"dense\", query_dense),  # Specify which vector\n    limit=10\n)\n```\n\n### Sparse vectors (BM25, SPLADE)\n\n```python\nfrom qdrant_client.models import SparseVectorParams, SparseIndexParams, SparseVector\n\n# Collection with sparse vectors\nclient.create_collection(\n    collection_name=\"sparse_search\",\n    vectors_config={},\n    sparse_vectors_config={\"text\": SparseVectorParams(index=SparseIndexParams(on_disk=False))}\n)\n\n# Insert sparse vector\nclient.upsert(\n    collection_name=\"sparse_search\",\n    points=[PointStruct(id=1, vector={\"text\": SparseVector(indices=[1, 5, 100], values=[0.5, 0.8, 0.2])}, payload={\"text\": \"document\"})]\n)\n```\n\n## Quantization (memory optimization)\n\n```python\nfrom qdrant_client.models import ScalarQuantization, ScalarQuantizationConfig, ScalarType\n\n# Scalar quantization (4x memory reduction)\nclient.create_collection(\n    collection_name=\"quantized\",\n    vectors_config=VectorParams(size=384, distance=Distance.COSINE),\n    quantization_config=ScalarQuantization(\n        scalar=ScalarQuantizationConfig(\n            type=ScalarType.INT8,\n            quantile=0.99,        # Clip outliers\n            always_ram=True      # Keep quantized in RAM\n        )\n    )\n)\n\n# Search with rescoring\nresults = client.search(\n    collection_name=\"quantized\",\n    query_vector=query,\n    search_params={\"quantization\": {\"rescore\": True}},  # Rescore top results\n    limit=10\n)\n```\n\n## Payload indexing\n\n```python\nfrom qdrant_client.models import PayloadSchemaType\n\n# Create payload index for faster filtering\nclient.create_payload_index(\n    collection_name=\"documents\",\n    field_name=\"category\",\n    field_schema=PayloadSchemaType.KEYWORD\n)\n\nclient.create_payload_index(\n    collection_name=\"documents\",\n    field_name=\"timestamp\",\n    field_schema=PayloadSchemaType.INTEGER\n)\n\n# Index types: KEYWORD, INTEGER, FLOAT, GEO, TEXT (full-text), BOOL\n```\n\n## Production deployment\n\n### Qdrant Cloud\n\n```python\nfrom qdrant_client import QdrantClient\n\n# Connect to Qdrant Cloud\nclient = QdrantClient(\n    url=\"https:\u002F\u002Fyour-cluster.cloud.qdrant.io\",\n    api_key=\"your-api-key\"\n)\n```\n\n### Performance tuning\n\n```python\n# Optimize for search speed (higher recall)\nclient.update_collection(\n    collection_name=\"documents\",\n    hnsw_config=HnswConfigDiff(ef_construct=200, m=32)\n)\n\n# Optimize for indexing speed (bulk loads)\nclient.update_collection(\n    collection_name=\"documents\",\n    optimizer_config={\"indexing_threshold\": 20000}\n)\n```\n\n## Best practices\n\n1. **Batch operations** - Use batch upsert\u002Fsearch for efficiency\n2. **Payload indexing** - Index fields used in filters\n3. **Quantization** - Enable for large collections (>1M vectors)\n4. **Sharding** - Use for collections >10M vectors\n5. **On-disk storage** - Enable `on_disk_payload` for large payloads\n6. **Connection pooling** - Reuse client instances\n\n## Common issues\n\n**Slow search with filters:**\n```python\n# Create payload index for filtered fields\nclient.create_payload_index(\n    collection_name=\"docs\",\n    field_name=\"category\",\n    field_schema=PayloadSchemaType.KEYWORD\n)\n```\n\n**Out of memory:**\n```python\n# Enable quantization and on-disk storage\nclient.create_collection(\n    collection_name=\"large_collection\",\n    vectors_config=VectorParams(size=384, distance=Distance.COSINE),\n    quantization_config=ScalarQuantization(...),\n    on_disk_payload=True\n)\n```\n\n**Connection issues:**\n```python\n# Use timeout and retry\nclient = QdrantClient(\n    host=\"localhost\",\n    port=6333,\n    timeout=30,\n    prefer_grpc=True  # gRPC for better performance\n)\n```\n\n## References\n\n- **[Advanced Usage](references\u002Fadvanced-usage.md)** - Distributed mode, hybrid search, recommendations\n- **[Troubleshooting](references\u002Ftroubleshooting.md)** - Common issues, debugging, performance tuning\n\n## Resources\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fqdrant\u002Fqdrant (22k+ stars)\n- **Docs**: https:\u002F\u002Fqdrant.tech\u002Fdocumentation\u002F\n- **Python Client**: https:\u002F\u002Fgithub.com\u002Fqdrant\u002Fqdrant-client\n- **Cloud**: https:\u002F\u002Fcloud.qdrant.io\n- **Version**: 1.12.0+\n- **License**: Apache 2.0\n",{"name":5,"author":23,"license":14,"version":24,"metadata":25,"platforms":37,"description":7,"dependencies":41},"Orchestra Research","1.0.0",{"hermes":26},{"tags":27},[28,29,30,31,32,33,34,35,36],"RAG","Vector Search","Qdrant","Semantic Search","Embeddings","Similarity Search","HNSW","Production","Distributed",[38,39,40],"linux","macos","windows",[42],"qdrant-client>=1.12.0","main","e0ec177d00f087cb04e90206b2f7d3aa2f5a1350","References\u002FAgent\u002FPlatforms\u002Fhermes-agent\u002Foptional-skills\u002Fmlops\u002Fqdrant","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim","https:\u002F\u002Fgithub.com\u002Flzy18001500226","2026-08-31 23:29:00",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add lzy18001500226\u002FMoSim --skill qdrant-vector-search",{"tool":55,"command":56},"bunx","bunx skills add lzy18001500226\u002FMoSim --skill qdrant-vector-search",{"tool":58,"command":59},"pnpm","pnpm dlx skills add lzy18001500226\u002FMoSim --skill qdrant-vector-search","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FPlatforms\u002Fhermes-agent\u002Foptional-skills\u002Fmlops\u002Fqdrant\u002FSKILL.md",true,[63,69],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fadvanced-usage.md","REFERENCE","参考文档",14969,"https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FPlatforms\u002Fhermes-agent\u002Foptional-skills\u002Fmlops\u002Fqdrant\u002Freferences\u002Fadvanced-usage.md",{"path":70,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Ftroubleshooting.md",12682,"https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FPlatforms\u002Fhermes-agent\u002Foptional-skills\u002Fmlops\u002Fqdrant\u002Freferences\u002Ftroubleshooting.md",[74,84,92,100,108,116],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":78,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":83},"01M78RK6JGRPTD3TDSMTQWDQ9P","skill-installer","Install Codex skills into $CODEX_HOME\u002Fskills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fskill-installer\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fskill-installer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":78,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":83},"01M78RK29KVRDQXSMVZX1GQTJN","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fskill-creator\u002Flicense.txt","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fskill-creator\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":78,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":83},"01M78RJPF3210Y5DA9VJ6JMMG6","openai-docs","Use for Codex models\u002Fpricing, scheduled tasks, skills, settings, setup, troubleshooting, customization, automations, and self-knowledge—including 'you,' 'your,' 'this app,' or 'this coding agent' when they refer to Codex—and for OpenAI APIs\u002Fproducts and ChatGPT Work. Also use for model choice\u002Fmigration, prompting, SDKs, Responses, Realtime, agents, evals, and Chat\u002FWork\u002FCodex comparisons. Do not use for generic app\u002Fsoftware tasks that merely mention Codex.","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fopenai-docs\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fopenai-docs\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":78,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":83},"01M78RJH7X67C5AY8ZVS7RQNWJ","imagegen","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fimagegen\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002Fsrc\u002FAgent\u002Fcodex-main\u002Fcodex-rs\u002Fskills\u002Fsrc\u002Fassets\u002Fsamples\u002Fimagegen\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":78,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":83},"01M78RBBAYMJ6T3ZMAYHCFM6G7","skill-creator-cc","Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FWorkflow\u002Fokwinds\u002Fmiscellany\u002Fagent\u002Fskills\u002Fskill-creator-cc\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FWorkflow\u002Fokwinds\u002Fmiscellany\u002Fagent\u002Fskills\u002Fskill-creator-cc\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":120,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":124},"01M76VV9V2R9FZTVGMJZV7Y996","prd-writing-guide","Write complete, unambiguous PRDs that development teams can implement without guesswork. Includes requirement discovery framework, structured documentation methodology, completeness checklists, and common pitfall avoidance. Use when: writing new PRDs, reviewing PRD drafts, validating requirement completeness, preparing for engineering handoff. Triggers: 'write PRD', '写PRD', '产品需求文档', '需求文档', '需求规格', '需求评审', '完善需求', 'create requirements doc', 'product requirements', 'feature spec', 'requirements document'. Anti-triggers: 'technical design doc', 'architecture design', 'implementation plan', 'API design', '架构设计', '技术方案', '实现方案', '接口设计'.","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FWorkflow\u002Fokwinds\u002Fmiscellany\u002Fagent\u002Fskills\u002Fprd-writing-guide\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Flzy18001500226\u002FMoSim\u002Fblob\u002Fmain\u002FReferences\u002FAgent\u002FWorkflow\u002Fokwinds\u002Fmiscellany\u002Fagent\u002Fskills\u002Fprd-writing-guide\u002FSKILL.md",[],[],"2026-11-12 13:55:43"]