Interface VectorOptions

Represents the options for the vector search.

Field

dimension - The dimension of the vectors.

Field

metric - The similarity metric to use for the vector search.

Field

service - Options related to configuring the automatic embedding service (vectorize)

interface VectorOptions {
    dimension?: number;
    metric?: "cosine" | "euclidean" | "dot_product";
    service?: VectorizeServiceOptions;
}

Properties

dimension?: number

The dimension of the vectors stored in the collection.

If service is not provided, this must be set. Otherwise, the necessity of this being set comes on a per-model basis:

  • Some models have default vector dimensions which may be flexibly modified
  • Some models have no default dimension, and must be given an explicit one
  • Some models require a specific dimension that's already set by default

You can find out more information about each model in the DataStax docs, or through DbAdmin.findEmbeddingProviders.

metric?: "cosine" | "euclidean" | "dot_product"

The similarity metric to use for the vector search.

See intro to vector databases for more details.

The options for defining the embedding service used for vectorize, to automatically transform your text into a vector ready for semantic vector searching.

You can find out more information about each provider/model in the DataStax docs, or through DbAdmin.findEmbeddingProviders.