alicloud-ai-search-dashvector
Build vector retrieval with DashVector using the Python SDK. Use when creating collections, upserting docs, and running similarity search with filters in…
от modbender★ 21 звезда на GitHub
Установить alicloud-ai-search-dashvector в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Category: provider
DashVector Vector Search
Use DashVector to manage collections and perform vector similarity search with optional filters and sparse vectors.
Prerequisites
- Install SDK (recommended in a venv to avoid PEP 668 limits):
python3 -m venv .venv
. .venv/bin/activate
python -m pip install dashvector
- Provide credentials and endpoint via environment variables:
DASHVECTOR_API_KEYDASHVECTOR_ENDPOINT(cluster endpoint)
Normalized operations
Create collection
name(str)dimension(int)metric(str:cosine|dotproduct|euclidean)fields_schema(optional dict of field types)
Upsert docs
docslist of{id, vector, fields}or tuples- Supports
sparse_vectorand multi-vector collections
Query docs
vectororid(one required; if both empty, only filter is applied)topk(int)filter(SQL-like where clause)output_fields(list of field names)include_vector(bool)
Quickstart (Python SDK)
import os
import dashvector
from dashvector import Doc
client = dashvector.Client(
api_key=os.getenv("DASHVECTOR_API_KEY"),
endpoint=os.getenv("DASHVECTOR_ENDPOINT"),
)
# 1) Create a collection
ret = client.create(
name="docs",
dimension=768,
metric="cosine",
fields_schema={"title": str, "source": str, "chunk": int},
)
assert ret
# 2) Upsert docs
collection = client.get(name="docs")
ret = collection.upsert(
[
Doc(id="1", vector=[0.01] * 768, fields={"title": "Intro", "source": "kb", "chunk": 0}),
Doc(id="2", vector=[0.02] * 768, fields={"title": "FAQ", "source": "kb", "chunk": 1}),
]
)
assert ret
# 3) Query
ret = collection.query(
vector=[0.01] * 768,
topk=5,
filter="source = 'kb' AND chunk >= 0",
output_fields=["title", "source", "chunk"],
include_vector=False,
)
for doc in ret:
print(doc.id, doc.fields)
Script quickstart
python skills/ai/search/alicloud-ai-search-dashvector/scripts/quickstart.py
Environment variables:
DASHVECTOR_API_KEYDASHVECTOR_ENDPOINTDASHVECTOR_COLLECTION(optional)DASHVECTOR_DIMENSION(optional)
Optional args: --collection, --dimension, --topk, --filter.
Notes for Claude Code/Codex
- Prefer
upsertfor idempotent ingestion. - Keep
dimensionaligned to your embedding model output size. - Use filters to enforce tenant or dataset scoping.
- If using sparse vectors, pass
sparse_vector={token_id: weight, ...}when upserting/querying.
Error handling
- 401/403: invalid
DASHVECTOR_API_KEY - 400: invalid collection schema or dimension mismatch
- 429/5xx: retry with exponential backoff
References
DashVector Python SDK:
Client.create,Collection.upsert,Collection.querySource list:
references/sources.md
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- agents/openai.yaml
- references/sources.md
- scripts/quickstart.py
FAQ
Что делает скилл alicloud-ai-search-dashvector?
Build vector retrieval with DashVector using the Python SDK. Use when creating collections, upserting docs, and running similarity search with filters in Claude Code/Codex.
Как установить скилл alicloud-ai-search-dashvector?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл alicloud-ai-search-dashvector запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…