Skip to main content
This page shows how to store dense vectors with metadata in a collection and configure collections with different distance metrics.
Install the Python client library: pip install actian-vectorai-client. The examples on this page use random vectors for demonstration. In production, generate vectors from an embedding model.

Store a dense vector

The following example creates a collection and stores a vector with metadata. In production, you generate vectors using pre-trained embedding models like Sentence Transformers, OpenAI embeddings, or custom neural networks. The embedding model determines the vector dimension and semantic properties.

Store vectors with different distance metrics

The distance metric you choose determines how VectorAI DB measures similarity between vectors. The following example creates two collections using different metrics and inserts test vectors into each.
The distance metric cannot be changed after collection creation. For details, see Vectors overview.