Use this file to discover all available pages before exploring further.
This short guide shows you how to create a collection, insert vectors, and perform similarity search using the Python SDK.
VectorAI DB Required: This quickstart requires VectorAI DB running in a Docker container. Docker deployment is the only supported version at the moment. Setup Instructions →
Port 6573 is for the RESTful API, 6574 for gRPC, and 6575 for Local UI. The /var/lib/actian-vectorai directory is the containers location for storing Actian VectorAI DB. It should be volume-mounted to persist the data.This command hosts the RESTful API on localhost:6573, the server on localhost:6574, and the Local UI on localhost:6575.
Perform similarity search to find the top five most similar vectors:
from actian_vectorai import VectorAIClientimport randomDIMENSION = 128COLLECTION = "products"with VectorAIClient("localhost:6574") as client: # Search for similar vectors print("Searching for similar vectors...") query = [random.gauss(0, 1) for _ in range(DIMENSION)] results = client.points.search(COLLECTION, vector=query, limit=5) print(f"Found {len(results)} results:") for i, result in enumerate(results): print(f"[{i+1}] ID: {result.id}, Score: {result.score:.4f}") # Get vector with payload print("\nRetrieving vector details...") retrieved = client.points.get(COLLECTION, ids=[results[0].id]) print(f"Top result payload: {retrieved[0].payload}")