Vector database selection, indexing strategies, and semantic search optimization.
View on GitHubpluginagentmarketplace/custom-plugin-ai-engineer
ai-engineer-plugin
January 20, 2026
Select agents to install to:
npx add-skill https://github.com/pluginagentmarketplace/custom-plugin-ai-engineer/blob/main/skills/vector-databases/SKILL.md -a claude-code --skill vector-databasesInstallation paths:
.claude/skills/vector-databases/# Vector Databases
Master vector storage and retrieval for AI applications.
## Quick Start
### Chroma (Local Development)
```python
import chromadb
from chromadb.utils import embedding_functions
# Initialize client
client = chromadb.Client() # In-memory
# client = chromadb.PersistentClient(path="./chroma_db") # Persistent
# Create collection with embedding function
embedding_fn = embedding_functions.SentenceTransformerEmbeddingFunction(
model_name="all-MiniLM-L6-v2"
)
collection = client.create_collection(
name="documents",
embedding_function=embedding_fn
)
# Add documents
collection.add(
documents=["Document 1 text", "Document 2 text"],
metadatas=[{"source": "file1"}, {"source": "file2"}],
ids=["doc1", "doc2"]
)
# Query
results = collection.query(
query_texts=["search query"],
n_results=5
)
```
### Pinecone (Cloud Production)
```python
from pinecone import Pinecone, ServerlessSpec
# Initialize
pc = Pinecone(api_key="YOUR_API_KEY")
# Create index
pc.create_index(
name="documents",
dimension=1536, # OpenAI embedding dimension
metric="cosine",
spec=ServerlessSpec(cloud="aws", region="us-west-2")
)
index = pc.Index("documents")
# Upsert vectors
index.upsert(vectors=[
{"id": "doc1", "values": embedding1, "metadata": {"text": "..."}},
{"id": "doc2", "values": embedding2, "metadata": {"text": "..."}}
])
# Query
results = index.query(
vector=query_embedding,
top_k=10,
include_metadata=True
)
```
### Weaviate
```python
import weaviate
from weaviate.classes.config import Configure, Property, DataType
# Connect
client = weaviate.connect_to_local() # or connect_to_wcs()
# Create collection (class)
collection = client.collections.create(
name="Document",
vectorizer_config=Configure.Vectorizer.text2vec_openai(),
properties=[
Property(name="content", data_type=DataType.TEXT),
Property(name="source", data_type=DataType.TEXT)
]
)
# Add objects
collection.data.in