Request DB
The Ahnlich DB Client is the foundation of the system, designed to efficiently manage, query, and retrieve vector embeddings. It provides all the tools needed to build applications that rely on vector similarity, metadata filtering, and structured querying.
In simple terms:
-
DB Service: Where your vectors are stored, indexed, and retrieved.
-
It supports CRUD operations, predicate-based queries, and advanced indexing strategies for optimal performance.
Core DB Featuresβ
Stores β Logical Containers for Vectorsβ
A store is the primary container for vectors. Each store groups together embeddings and their metadata. You can think of it as a dataset or collection, tailored for a specific use case (e.g., product catalog, documents, images).
Vector CRUD Operationsβ
-
Create / Insert vectors into a store.
-
Get vectors by key or predicate conditions.
-
Delete vectors by key or predicate.
This gives you full lifecycle control over your vector data.
Predicate Filteringβ
The DB supports predicate-based filtering. This allows you to retrieve or delete entries that match certain metadata conditions (e.g., job = "sorcerer").
Indexingβ
For efficiency, the DB provides indexing strategies:
-
Predicate Indexes β Speed up queries on metadata conditions.
-
Non-Linear Algorithm Indexes β Enable optimized similarity searches (e.g., KD-Tree).
Indexes ensure that even at scale, searches and lookups remain fast.
Tracing and Observabilityβ
All DB requests support metadata injection such as trace IDs. This makes it easy to track and monitor requests in distributed systems.
Example DB Requestsβ
The DB client exposes a variety of request methods. Some of the most common include:
-
Ping - Check service availability.
-
Get by Key - Retrieve specific embeddings.
-
Get by Predicate - Query vectors based on metadata conditions.
-
Create / Drop Indexes - Manage performance optimizations.
-
Delete by Key or Predicate - Remove entries from a store.
Each operation is asynchronous, ensuring high throughput for large-scale applications.
Summaryβ
The Ahnlich DB Client provides:
-
A structured way to store and organize embeddings into logical stores.
-
CRUD operations on vectors with rich filtering capabilities.
-
Predicate and algorithm indexing for performance at scale.
-
Built-in tracing support for observability.
It serves as the data backbone of Ahnlich, working hand-in-hand with the AI client to deliver semantic search and retrieval.
Below is a break down common DB request examples: