Skip to main content

Data model

Ahnlich organizes everything into stores. Understanding the store and the shape of what goes inside it is most of what you need to be productive.

Store

A store is a named container for your data — the equivalent of a collection in a document database or a table in a relational one. A store fixes two things up front:

  • a dimension — the length every vector in it must have, and
  • an optional set of predicates — the metadata fields you plan to filter on.

Many stores can coexist on one server, each isolated from the others, so you can separate data by application, environment, or tenant.

Entry: key + value

Each item in a store is an entry made of two parts:

  • Key — a vector (StoreKey), a list of floats whose length matches the store's dimension. This is what similarity search compares against.
  • Value — a StoreValue: a map of metadata fields (predicates) describing the entry, e.g. {author: "Asimov", genre: "SciFi"}.
🗂️ Store — my_storedimension · 4Key — vectorValue — metadata[0.12, 0.98, 0.34, 0.55]{author: Asimov, genre: SciFi}[0.44, 0.10, 0.77, 0.02]{author: Le Guin, genre: SciFi}
A store holds entries — each a key (vector) paired with a value (metadata).

Two kinds of store

You providePortVectors are…
Vector DB storeraw vectors1369supplied by you
AI storetext or images1370generated for you

The operations — insert, similarity search, filtering — are the same for both; only the input differs.