| name | vector-store |
| description | Vector store schema protection and migration management |
🗄️ Vector Store SKILL
Purpose
PROTECTED: Vector store schema management. Changes require pre-modification checklist validation.
Supported Vector Stores
1. Pinecone (Cloud)
import pinecone
from langchain_pinecone import PineconeVectorStore
pinecone.init(api_key="your-key")
index = pinecone.Index("rag-demo")
vector_store = PineconeVectorStore(index, embeddings)
Schema: {dimension: 1536, metric: "cosine"}
2. Milvus (Self-hosted/Cloud)
from langchain_community.vectorstores import Milvus
vector_store = Milvus(
embeddings,
connection_args={"host": "localhost", "port": "19530"},
collection_name="rag_demo",
index_params={"metric_type": "IP", "index_type": "IVF_FLAT"}
)
3. Chroma (Local)
from langchain_community.vectorstores import Chroma
vector_store = Chroma(
collection_name="rag_demo",
embedding_function=embeddings,
persist_directory="./chroma_db"
)
4. FAISS (Local)
from langchain_community.vectorstores import FAISS
vector_store = FAISS.from_documents(documents, embeddings)
vector_store.save_local("./faiss_index")
Schema Protection Rules
HALT before:
- Dimension change → Breaks all vectors
- Metric change → Affects rankings
CAUTION before:
3. Metadata schema change → Migration needed
See: templates/rag-checklist.md
Migration Playbook
Scenario: Change Embedding Model
python scripts/export_vectors.py --output backup.json
python scripts/create_index.py --dimension 3072
python scripts/reindex.py --model text-embedding-3-large
export VECTOR_STORE_INDEX="rag-demo-v2"
python scripts/monitor_quality.py
Full guide: docs/protected-schemas.md
Last Updated: 2025-12-04
Version: 1.0
Adapted from: WHRESUME blog-protection-SKILL.md