Vector DB Setup
Crafted includes a built‑in vector database for semantic search.
- Create a Collection – In the dashboard, go to Data → Vector DB and click New Collection.
- Configure dimensions – specify the embedding size (e.g., 1536 for OpenAI embeddings).
- Add documents – upload files or use the API endpoint to upsert vectors.Snippet
/api/vector-db - Query – use the SDK method .Snippet
vectorDB.search(collectionId, queryVector)
For large datasets, consider enabling sharding in the collection settings.