vectordb
БесплатноБез исполняемых скриптовНе проверенVector database operations for embeddings and semantic search. Activate for Pinecone, Weaviate, Chroma, pgvector, RAG, and similarity search.
от TheLobbi★ 22 звезды на GitHubОб этом скилле
Vector Database Skill
Provides comprehensive vector database capabilities for the Golden Armada AI Agent Fleet Platform.
When to Use This Skill
Activate this skill when working with:
- Semantic search implementation
- RAG (Retrieval Augmented Generation)
- Embedding storage and retrieval
- Similarity search
- Vector index management
Embedding Generation
```python import openai from anthropic import Anthropic
OpenAI embeddings
def get_openai_embedding(text: str) -> list[float]: response = openai.embeddings.create( model="text-embedding-3-small", input=text ) return response.data[0].embedding
Batch embeddings
def get_batch_embeddings(texts: list[str]) -> list[list[float]]: response = openai.embeddings.create( model="text-embedding-3-small", input=texts ) return [item.embedding for item in response.data] ```
Pinecone
```python from pinecone import Pinecone, ServerlessSpec
Initialize
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
Create index
pc.create_index( name="agents", dimension=1536, metric="cosine", spec=ServerlessSpec( cloud="aws", region="us-west-2" ) )
Get index
index = pc.Index("agents")
Upsert vectors
index.upsert( vectors=[ { "id": "agent-1", "values": embedding, "metadata": { "name": "Claude Agent", "type": "claude", "description": "General assistant" } } ], namespace="production" )
Query
results = index.query( vector=query_embedding, top_k=10, include_metadata=True, namespace="production", filter={"type": {"$eq": "claude"}} )
for match in results.matches: print(f"{match.id}: {match.score} - {match.metadata}")
Delete
index.delete(ids=["agent-1"], namespace="production") ```
Chroma
```python import chromadb from chromadb.config import Settings
Initialize
client = chromadb.PersistentClient(path="./chroma_db")
Create collection
collection = client.get_or_create_collection( name="agents", metadata={"hnsw:space": "cosine"} )
Add documents
collection.add( ids=["agent-1", "agent-2"], embeddings=[embedding1, embedding2], documents=["Document 1 text", "Document 2 text"], metadatas=[ {"type": "claude", "version": "3"}, {"type": "gpt", "version": "4"} ] )
Query
results = collection.query( query_embeddings=[query_embedding], n_results=10, where={"type": "claude"}, include=["documents", "metadatas", "distances"] )
Update
collection.update( ids=["agent-1"], metadatas=[{"type": "claude", "version": "3.5"}] )
Delete
collection.delete(ids=["agent-1"]) ```
pgvector (PostgreSQL)
```sql -- Enable extension CREATE EXTENSION vector;
-- Create table CREATE TABLE documents ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), content TEXT NOT NULL, embedding vector(1536), metadata JSONB DEFAULT '{}' );
-- Create index (IVFFlat for larger datasets) CREATE INDEX ON documents USING ivfflat (embedding vector_cosine_ops) WITH (lists = 100);
-- Or HNSW for better recall CREATE INDEX ON documents USING hnsw (embedding vector_cosine_ops);
-- Insert INSERT INTO documents (content, embedding, metadata) VALUES ('Document content', '[0.1, 0.2, ...]', '{"type": "manual"}');
-- Similarity search SELECT id, content, 1 - (embedding <=> $1) AS similarity FROM documents ORDER BY embedding <=> $1 LIMIT 10;
-- With filter SELECT id, content, 1 - (embedding <=> $1) AS similarity FROM documents WHERE metadata->>'type' = 'manual' ORDER BY embedding <=> $1 LIMIT 10; ```
Python with pgvector
```python from pgvector.sqlalchemy import Vector from sqlalchemy import Column, String, JSON from sqlalchemy.dialects.postgresql import UUID
class Document(Base): tablename = 'documents'
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
content = Column(String, nullable=False)
embedding = Column(Vector(1536))
metadata = Column(JSON, default={})
Insert
doc = Document( content="Document content", embedding=embedding, metadata={"type": "manual"} ) session.add(doc) session.commit()
Query
from sqlalchemy import select from pgvector.sqlalchemy import cosine_distance
results = session.execute( select(Document) .order_by(cosine_distance(Document.embedding, query_embedding)) .limit(10) ).scalars().all() ```
RAG Implementation
```python class RAGService: def init(self, vector_store, llm_client): self.vector_store = vector_store self.llm = llm_client
async def query(self, question: str, top_k: int = 5) -> str:
# 1. Generate query embedding
query_embedding = await self.get_embedding(question)
# 2. Retrieve relevant documents
docs = await self.vector_store.search(
embedding=query_embe
Установить vectordb в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteEditGlobGrepFAQ
Что делает скилл vectordb?
Vector database operations for embeddings and semantic search. Activate for Pinecone, Weaviate, Chroma, pgvector, RAG, and similarity search.
Как установить скилл vectordb?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vectordb запускает скрипты?
Нет, скилл состоит только из инструкций (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