一键导入
qdrant
High-performance vector search engine for production RAG — Rust-powered, horizontal scaling, hybrid dense+sparse search, metadata filtering.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
High-performance vector search engine for production RAG — Rust-powered, horizontal scaling, hybrid dense+sparse search, metadata filtering.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Compress conversation context — summarize the current session, extract key decisions and facts, then compact history to free up context window.
Generate insights about your Claude Code usage — what topics you work on most, common patterns, productivity trends.
Route Claude Code work by complexity, risk, and tool needs. Use when deciding how much reasoning depth a task needs, whether to read project memory first, whether the task should be decomposed, and whether the work is lightweight, standard, or investigation-heavy.
Query Polymarket prediction markets for probability data and research insights on real-world events.
Search and retrieve academic papers from arXiv using their free REST API. No API key needed.
Query Base (Ethereum L2) blockchain data — wallet balances, token info, transactions, gas analysis, contract inspection. No API key required.
| name | qdrant |
| description | High-performance vector search engine for production RAG — Rust-powered, horizontal scaling, hybrid dense+sparse search, metadata filtering. |
| version | 1.0.0 |
| author | hermes-CCC (ported from Hermes Agent by NousResearch) |
| license | MIT |
| metadata | {"hermes":{"tags":["RAG","Vector-Search","Qdrant","Embeddings","Production","Distributed","Hybrid-Search"],"related_skills":["chroma","pinecone","faiss"]}} |
High-performance, Rust-powered vector database for production RAG systems. Best for self-hosted deployments needing speed and horizontal scale.
pip install qdrant-client sentence-transformers
# Run Qdrant server
docker run -d -p 6333:6333 -p 6334:6334 \
-v $(pwd)/qdrant_storage:/qdrant/storage \
qdrant/qdrant
from qdrant_client import QdrantClient
from qdrant_client.models import Distance, VectorParams
# Local Docker
client = QdrantClient(host="localhost", port=6333)
# Cloud
client = QdrantClient(
url="https://your-cluster.aws.cloud.qdrant.io",
api_key="your-api-key"
)
# In-memory (testing)
client = QdrantClient(":memory:")
client.create_collection(
collection_name="my_docs",
vectors_config=VectorParams(
size=384, # match embedding model dimension
distance=Distance.COSINE, # COSINE | EUCLID | DOT
),
)
from qdrant_client.models import PointStruct
from sentence_transformers import SentenceTransformer
import uuid
model = SentenceTransformer("all-MiniLM-L6-v2")
documents = [
{"text": "Python async programming", "source": "docs", "year": 2024},
{"text": "Machine learning with PyTorch", "source": "tutorial", "year": 2023},
]
embeddings = model.encode([d["text"] for d in documents])
points = [
PointStruct(
id=str(uuid.uuid4()),
vector=emb.tolist(),
payload=doc,
)
for doc, emb in zip(documents, embeddings)
]
client.upsert(collection_name="my_docs", points=points)
from qdrant_client.models import Filter, FieldCondition, MatchValue
query = "how to write async code?"
q_vec = model.encode([query])[0].tolist()
# Basic search
results = client.search(
collection_name="my_docs",
query_vector=q_vec,
limit=5,
)
# With metadata filter
results = client.search(
collection_name="my_docs",
query_vector=q_vec,
query_filter=Filter(
must=[FieldCondition(key="source", match=MatchValue(value="docs"))]
),
limit=5,
with_payload=True,
)
for r in results:
print(f"[{r.score:.3f}] {r.payload['text']}")
from qdrant_client.models import SparseVector, NamedSparseVector, NamedVector
# Setup collection with both dense and sparse
client.create_collection(
collection_name="hybrid",
vectors_config={
"dense": VectorParams(size=384, distance=Distance.COSINE),
},
sparse_vectors_config={
"sparse": SparseVectorParams(),
},
)
# Search with RRF fusion
from qdrant_client.models import Prefetch, FusionQuery, Fusion
results = client.query_points(
collection_name="hybrid",
prefetch=[
Prefetch(query=dense_vec, using="dense", limit=20),
Prefetch(query=SparseVector(indices=[1,5,3], values=[0.1, 0.8, 0.5]),
using="sparse", limit=20),
],
query=FusionQuery(fusion=Fusion.RRF),
limit=5,
)
from qdrant_client.models import (
Filter, FieldCondition, MatchValue, MatchAny,
Range, HasIdCondition
)
# Match value
Filter(must=[FieldCondition(key="source", match=MatchValue(value="docs"))])
# Match any of
Filter(must=[FieldCondition(key="category", match=MatchAny(any=["tech", "science"]))])
# Range filter
Filter(must=[FieldCondition(key="year", range=Range(gte=2023, lte=2025))])
# Combine
Filter(
must=[FieldCondition(key="source", match=MatchValue(value="docs"))],
should=[FieldCondition(key="year", range=Range(gte=2024))],
must_not=[FieldCondition(key="archived", match=MatchValue(value=True))],
)
# Delete by IDs
client.delete(collection_name="my_docs", points_selector=["id1", "id2"])
# Delete by filter
from qdrant_client.models import FilterSelector
client.delete(
collection_name="my_docs",
points_selector=FilterSelector(
filter=Filter(must=[FieldCondition(key="source", match=MatchValue(value="old"))])
)
)
# Collection info
info = client.get_collection("my_docs")
print(f"Vectors: {info.points_count}")
BATCH_SIZE = 100
for i in range(0, len(points), BATCH_SIZE):
batch = points[i:i+BATCH_SIZE]
client.upsert(collection_name="my_docs", points=batch)
print(f"Uploaded {min(i+BATCH_SIZE, len(points))}/{len(points)}")