AI & Vectors

Collections

Collections

A collection is an group of vector records. Records can be added to or updated in a collection. Collections can be queried at any time, but should be indexed for scalable query performance.

Each vector record has the form:


_10
Record (
_10
id: String
_10
vec: Numeric[]
_10
metadata: JSON
_10
)

For example:


_10
("vec1", [0.1, 0.2, 0.3], {"year": 1990})

Underneath every vecs collection is a Postgres table


_10
create table <collection_name> (
_10
id string primary key,
_10
vec vector(<dimension>),
_10
metadata jsonb
_10
)

where rows in the table map 1:1 with vecs vector records.

It is safe to select collection tables from outside the vecs client but issuing DDL is not recommended.