weaviate-advanced
БесплатноБез исполняемых скриптовНе проверенAdvanced Weaviate 1.27+ features. Native hybrid (BM25+vector) search, modules (reranker, generative), multi-tenancy, replication, compression (PQ / BQ / SQ)…
от claude-dev-suite★ 51 звезда на GitHubОб этом скилле
Weaviate Advanced
Client Setup (v4 Python)
import weaviate
from weaviate.classes.init import Auth, AdditionalConfig, Timeout
client = weaviate.connect_to_weaviate_cloud(
cluster_url="https://my-cluster.weaviate.network",
auth_credentials=Auth.api_key("..."),
headers={"X-OpenAI-Api-Key": "..."}, # for generative/vectorizer modules
additional_config=AdditionalConfig(timeout=Timeout(init=10, query=60)),
)
# Self-hosted
# client = weaviate.connect_to_local(host="localhost", port=8080, grpc_port=50051)
Collection Creation with Modules
from weaviate.classes.config import (
Configure, Property, DataType, VectorDistances, Tokenization,
)
client.collections.create(
name="Docs",
vectorizer_config=Configure.Vectorizer.text2vec_openai(
model="text-embedding-3-large",
dimensions=1024, # MRL truncation
),
generative_config=Configure.Generative.openai(model="gpt-4o-mini"),
reranker_config=Configure.Reranker.cohere(model="rerank-english-v3.0"),
vector_index_config=Configure.VectorIndex.hnsw(
distance_metric=VectorDistances.COSINE,
ef_construction=128,
max_connections=32,
ef=-1, # dynamic ef (autotuned)
quantizer=Configure.VectorIndex.Quantizer.pq(
segments=128,
centroids=256,
training_limit=100_000,
),
),
inverted_index_config=Configure.inverted_index(
bm25_b=0.75, bm25_k1=1.2,
),
multi_tenancy_config=Configure.multi_tenancy(
enabled=True,
auto_tenant_creation=True,
auto_tenant_activation=True,
),
replication_config=Configure.replication(factor=3, async_enabled=True),
sharding_config=Configure.sharding(virtual_per_physical=128, desired_count=3),
properties=[
Property(name="content", data_type=DataType.TEXT,
tokenization=Tokenization.WORD),
Property(name="title", data_type=DataType.TEXT),
Property(name="tags", data_type=DataType.TEXT_ARRAY,
tokenization=Tokenization.FIELD),
Property(name="created_at", data_type=DataType.DATE),
],
)
Native Hybrid Search (BM25 + Vector)
Weaviate computes BM25 and vector search server-side and fuses with a weighted convex combination or Relative Score Fusion.
from weaviate.classes.query import HybridFusion, Filter, MetadataQuery
docs = client.collections.get("Docs").with_tenant("acme")
result = docs.query.hybrid(
query="how do I revoke an OAuth token",
alpha=0.7, # 1=pure vector, 0=pure BM25
fusion_type=HybridFusion.RELATIVE_SCORE,
limit=10,
filters=Filter.by_property("tags").contains_any(["auth", "oauth"]),
return_metadata=MetadataQuery(score=True, explain_score=True),
)
for o in result.objects:
print(o.metadata.score, o.properties["title"])
Reranking (module-based)
from weaviate.classes.query import Rerank
result = docs.query.hybrid(
query="how do I revoke an OAuth token",
alpha=0.5,
limit=50,
rerank=Rerank(prop="content", query="revoke OAuth token"),
# top scorer after rerank is returned first
)
Pairing: broad hybrid (limit=50) → reranker trims to the top-K that actually answers the query.
Generative Search (RAG in one call)
from weaviate.classes.generate import GenerativeConfig
result = docs.generate.hybrid(
query="how do I revoke an OAuth token",
alpha=0.6,
limit=5,
grouped_task="Using the provided context, answer concisely with citations.",
generative_provider=GenerativeConfig.openai(model="gpt-4o-mini"),
)
print(result.generative.text)
Multi-Tenancy
Weaviate implements first-class tenants: each tenant is a physical shard and can be hot / cold / frozen.
from weaviate.classes.tenants import Tenant, TenantActivityStatus
docs.tenants.create([Tenant(name="acme"), Tenant(name="globex")])
# Offload inactive tenants to cloud storage (reduces RAM)
docs.tenants.update([
Tenant(name="globex", activity_status=TenantActivityStatus.OFFLOADED),
])
# Reactivate on first query (if auto_tenant_activation=True)
tenant_docs = docs.with_tenant("acme")
Compression Tradeoffs
| Option | Memory reduction | Speed | Recall impact |
|---|---|---|---|
| PQ (Product Quantization) | 8-32x | Fast | -1 to -5% |
| BQ (Binary) | 32x | Very fast | -5 to -15% (rescore) |
| SQ (Scalar) | 4x | Fast | < -1% |
Binary Quantization
client.collections.get("Docs").config.update(
vector_index_config=Configure.VectorIndex.hnsw(
quantizer=Configure.VectorIndex.Quantizer.bq(rescore_limit=100, cache=True),
),
)
Binary with rescore_limit=100 means: search in bit-space, then rescore top 100
with full vectors. This recovers most of the lost recall.
Scalar Quantization
quantizer = Configure.VectorIndex.Quantizer.sq(
training_limit=100_000,
rescore_limit=50,
ca
Установить weaviate-advanced в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobWriteEditFAQ
Что делает скилл weaviate-advanced?
Advanced Weaviate 1.27+ features. Native hybrid (BM25+vector) search, modules (reranker, generative), multi-tenancy, replication, compression (PQ / BQ / SQ), async indexing, sharding, and Weaviate Cloud vs self-hosted tradeoffs. USE WHEN: user mentions "Weaviate", "hybrid BM25", "weaviate multi-tenant", "weaviate reranker", "weaviate generative", "weaviate compression", "PQ BQ SQ weaviate" DO NOT USE FOR: basic vector DB usage - use `ai-integration/vector-databases`; other stores - use other `vector-stores/*`
Как установить скилл weaviate-advanced?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл weaviate-advanced запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub