Vector Stores: Pinecone, Qdrant, pgvector, Chroma, FAISS
Comparing managed and self-hosted stores (Pinecone, Qdrant, pgvector, Weaviate, Milvus, Chroma, FAISS), managed RAG from OpenAI and Google, HNSW and IVF index types, running Qdrant in Docker and pgvector in Postgres, when to choose what.
ENМатеріали курсів поки англійською. Інтерфейс, ШІ-наставник і перевірка завдань — українською.
Pinecone (managed)
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
pc.indexes.create(
name="docs",
schema={"fields": {"embedding": {"type": "dense_vector", "dimension": 1536, "metric": "cosine"}}},
deployment={"deployment_type": "managed", "cloud": "aws", "region": "us-east-1"},
)
index = pc.index("docs")
index.documents.upsert(
namespace="kb",
documents=[{"_id": "d1", "embedding": vec, "src": "faq"}],
)
This code is for the pinecone Python SDK 10.x. The old pc.create_index(..., spec=ServerlessSpec(...)) call is kept for compatibility: it creates a classic vector index that you write to with upsert(vectors=...). Use pc.indexes.create for new code.
Pros: zero infrastructure, auto-scale, a free Starter plan (2 GB). Cons: cost as you grow, data at the vendor, vendor lock-in.
Далі урок відкривається після безкоштовної реєстрації
Реєстрація через email або Google відкриває перші два уроки кожного курсу назавжди і 7 днів повного доступу до всього каталогу. Картка не потрібна.


