Vector Database
A vector database stores embeddings and helps search by meaning.
Simple idea: it is a database for semantic search.
Why It Matters
Normal databases are good for exact matches:
Find user where email = xVector databases are good for meaning-based matches:
Find documents similar to "AI data leakage risk"How It Works
- Convert documents into Embeddings.
- Store the vectors with metadata.
- Convert the user question into an embedding.
- Search for nearby vectors.
- Return the most relevant chunks.
- Use those chunks in RAG.
Common Options
- pgvector.
- Qdrant.
- Pinecone.
- Weaviate.
- Milvus.
- Elasticsearch vector search.
What to Store
| Field | Example |
|---|---|
| Text chunk | Paragraph from a policy doc |
| Embedding | Numerical vector |
| Source | GDPR Guide.md |
| Date | Last updated date |
| Permissions | Who can access it |
| Product | CookieYes, WebYes, WebToffee |
Design Tips
- Store metadata with every chunk.
- Use access control for private docs.
- Re-index when documents change.
- Track retrieval quality.
- Avoid sending sensitive data to external systems without review.
CookieYes Ideas
- Privacy-law knowledge base.
- Customer support search.
- Cookie and tracker classification knowledge.
- AI governance policy retrieval.
Mozilor Ideas
- Accessibility remediation knowledge base.
- WooCommerce agent playbooks.
- Product documentation search.
- Internal company research search.