Skip to content

Introducing OasysDB#

OasysDB Use Case

OasysDB is a flexible, performant, and easy to use vector database for storing and searching high-dimensional vectors. OasysDB is built in Rust but provides a Python binding for you to use in your Python projects.

The goal of OasysDB is to be a vector database with a great developer experience throughout the lifecycle of the project; from early development to production. In addition to an easy-to-use API, OasysDB can be used in 3 different ways:

  • Embedded
    Run OasysDB directly inside your application.

  • Hosted
    Run OasysDB as a standalone server.
    Coming soon

  • Distributed
    Run sharded OasysDB instances.
    Coming not so soon 😉

OasysDB as a Vector Database#

You can think of OasysDB as a NoSQL/document database like MongoDB or CouchDB, but purposefully built for indexing high-dimensional vectors. Instead of using a traditional index like B-Tree or LSM-Tree, OasysDB uses HNSW as its indexing algorithm to index the data in graphs so that it can perform fast similarity searches on the vectors.

OasysDB shares a lot of concepts with traditional NoSQL databases. It stores data in collections and multiple collections can be stored in a database. The API of the collection is also very similar to a document store where you have methods to insert, get, update, and delete records with the additional search method to find similar vectors AKA nearest neighbors.

Vector Record#

When you want to store a vector in OasysDB, you will insert vector record objects. This object contains the vector embedding itself and some additional metadata.

Embedding#

OasysDB is optimized for high-dimensional vectors of any dimensionality. You can store 2D or 3D vectors/points, but, the real power of OasysDB shines when you store high-dimensional vectors like 128D, 768D, or even 4096D vectors.

As per the benchmark, OasysDB can perform similarity searches on 1 million 4096D vectors in single-digit milliseconds which makes it a great choice for building real-time search or semantic caching systems.

  • M2 Macbook Pro with 16GB memory: 9.11ms
  • M3 Macbook Pro with 128GB memory: 3.87ms

Metadata#

When you store a vector in OasysDB, you can insert a metadata object along with the vector. The metadata is a JSON-like object that can store any information you need to associate with the vector. For example, for a use case like an image search system, you can store the image URL, title, and description of the image in the metadata object.

{
  "url": "https://www.example.com/image.jpg",
  "title": "Beautiful Sunset",
  ...
}

When performing a search, the metadata will be returned along with additional information. In most cases, you will use the metadata to display the search results to the user or in case of RAG application, you can use the metadata to generate a relevant answer.