Skip to content

Tables in KDB.AI

This section contains details the list of available tables (sometimes alternatively called indexes) in KDB.AI and key parameters that can be tailored to specific use cases, ensuring that you can harness the full potential of kdb.ai indexing capabilities.

FLAT

The flat search performs an exhaustive search against all vectors in the search space it can be configured with a number of distance metrics. As the search is exhaustive it will find the exact nearest neighbors without approximations.

  • Build Parameters
option description type required default
dims Number of dimensions long true 8
  • Search Parameters
option description type required default
neighbors The number of nearest neighbors to be returned long false 5

IVF

When using a Flat Inverted File search, you firstly train the table on a set of points that are used to generate cluster centroids using a k-means algorithm. The data is not partitioned into a cluster based on centroid distance. The search is performed by running a flat search against the most relevant clusters. As only a subset of the data is searched, the results are returned much quicker, but as a consequence can be less accurate.

  • Build Parameters
option description type required default
nclusters Number of clusters int false 8
  • Search Parameters
option description type required default
neighbors The number of nearest neighbors to be returned int false 5
nclusters The number of clusters to be traversed in the search int false 2

Training is required, to initialize the IVF index.

IVFPQ

You can compress input data using the product quantization method before applying the IVF schema above. This is known as IVFPQ. This can greatly reduce the size of the table held in memory and improve search speeds.

  • Build Parameters
option description type required default
nclusters Number of clusters int false 8
nsplits Number of splits int false 8
nbits Number of bits int false 8
  • Search Parameters
option description type required default
neighbors The number of nearest neighbors to be returned int false 5
nclusters The number of clusters to be traversed in the search int false 2

Training is required, to initialize the IVFPQ index.

HNSW

A HNSW table establishes connections between vertices in the graph based on their distances. These links are instrumental in enabling efficient traversal and navigation through the hierarchical graph during the search process. The HNSW table can be searched to navigate through the layers of the graph to find increasingly similar data in the graph. This approach is extremely efficient with search performance a measure of the complexity of the graph.

  • Build Parameters
option description type required default
dims Number of dimensions long true 8
efConstruction Nodes considered at each step (construction) int false 8
M Valence of each node in graph int false 8
  • Search Parameters
option description type required default
neighbors The number of nearest neighbors to be returned int false 5
efSearch Nodes considered at each step (search) int false 8