Previewing the new native vector search

Announcing native vector search in TypeDB which lets you query embeddings directly in your existing database.

Ganesh Hananda


Applications that require vector search typically incorporate a separate vector database. This creates an unnecessary level of maintenance overhead.

We think that embeddings should be integrated with entities and relationships they relate to for greater efficiency.

We are pleased to announce that we are now introducing native vector search in TypeDB: a new vector type (32-bit) and a cosine similarity function, so you can query embeddings directly in your existing database.

Diving a bit into the usage – the feature set is comprised of a new type vector:

define
attribute content value string;
attribute embedding value vector(584, "float32");
entity document owns content @key, owns embedding;

As well as a vector similarity function cosine_similarity_search that is seamlessly integrated with other existing TypeQL constructs:

match
let $e in cosine_similarity_search(embedding, vector([...], 0.5));
$d isa document, has content $c, has embedding $e;
select $c;

Currently an alpha / experimental feature, this new capability lets you take vector embeddings generated by your chosen LLM, store them directly within your database, and seamlessly query them later alongside your existing data.

We’re opening this up to a limited number of early alpha testers right now! Shoot us a DM on Discord or LinkedIn to get access.

Share this article

TypeDB Newsletter

Stay up to date with the latest TypeDB announcements and events.

Subscribe to newsletter

Further Learning

Feedback