Requests – DB
The Ahnlich DB is an in-memory vector key–value store designed for storing embeddings or vectors alongside their metadata (key–value maps).
It provides AI/ML engineers with the ability to:
-
Store and retrieve embeddings.
-
Search for similar vectors using linear similarity algorithms (Cosine, Euclidean).
-
Perform searches with non-linear similarity algorithms (such as KD-Tree).
-
Filter results based on metadata values.
This makes it possible to build intelligent search and recommendation systems that combine vector similarity with metadata-based filtering.
Example
A query to retrieve the 2 most similar vectors to [0.2, 0.1] from the store my_store, using cosine similarity, while excluding any items where the metadata field page is equal to "hidden":
GETSIMN 2 WITH [0.2, 0.1] USING cosinesimilarity IN my_store WHERE (page != hidden)
Below is a breakdown of common DB request examples: