Auto-generate embeddings with vectorize

For Serverless (Vector) databases, you can bring your own embeddings or use Astra DB vectorize to automatically generate embeddings through an embedding provider integration:

Bring your own embeddings

Generate your own embeddings on the client side, and then import them when you load data.

Auto-generate embeddings with vectorize

Configure an embedding provider integration, and then use vectorize to automatically generate embeddings from text for any operation that requires a vector.

Learn more about embedding providers

Embedding providers are services that help you generate embeddings for your data to perform vector search queries.

The provider handles infrastructure, model maintenance, and other tasks necessary to generate embeddings from embedding models.

Providers may use one or more models to generate embeddings. When choosing an embedding provider, consider factors like the available embedding models, vector dimensions, supported data types, quality, accuracy, scalability, and so on.

Supported embedding providers

Vectorize generates embeddings through integrations with supported embedding providers:

External providers

Integrate your embedding provider account with Astra DB.

Astra-hosted providers

Use a DataStax-managed embedding provider hosted within Astra. Databases in supported regions can automatically use these integrations for new collections.

Astra DB Serverless offers the following embedding provider integrations:

Embedding provider External Astra-hosted Docs

Azure OpenAI

check

Get started

Hugging Face - Dedicated

check

Get started

Hugging Face - Serverless

check

Get started

Jina AI

check

Get started

Mistral AI

check

Get started

NVIDIA

check

Get started

OpenAI

check

Get started

Upstage

check

Get started

Voyage AI

check

Get started

External embedding provider integrations

To use an external embedding provider with Astra DB vectorize, you must add the embedding provider integration to your Astra DB organization, and then you can select your embedding provider when you create collections.

All providers follow the same general integration process. However, each provider has specific configuration options, such as models, dimensions, credentials, and other parameters. For complete instructions, see the documentation for your embedding provider.

Your external embedding provider integration uses your embedding provider account to generate embeddings. You can incur billed charges for this use according to your agreement with your provider.

Embedding provider authentication

Astra DB needs authorization to request embeddings from your embedding provider. To do this, you provide credentials that authenticate Astra DB to your embedding provider account:

  1. Add the external embedding provider integration to your Astra DB organization.

  2. Add embedding provider credentials, such as API keys or access tokens.

  3. Add databases to the credentials' scoped databases. This makes the integration available to new collections in the scoped databases.

  4. Create a collection in a scoped database, select the embedding provider integration, and then select a credential from the pool of credentials that are available to the database.

    If you can’t choose your integration or credential when you create a collection, see Potential scope delay.

  5. Load data into the collection to auto-generate embeddings with vectorize. Astra DB vectorize uses the selected credential to request embeddings from your embedding provider.

For complete instructions, see the documentation for your embedding provider.

After you configure an embedding provider integration, you can manage the integration’s credentials and scoped databases in the Astra Portal. Go to Integrations, and then select the embedding provider integration that you want to manage. You can add or remove credentials and change the scoped databases for each credential.

When you remove a credential from Astra DB, the credential is not removed from your embedding provider account. Make sure to delete the credential from your embedding provider account if you no longer need it.

Removing a credential immediately disables vectorize embedding generation in all collections that use the removed credential.

For greater access control, you can add multiple credentials, and each credential can have different scoped databases. You can also add the same database to multiple credential scopes. However, when you create a collection, you choose only one integration and one credential, regardless of the number of integrations or credentials that are available to the database.

Scoped databases

Embedding provider integrations aren’t inherently available to all databases. You decide the databases and collections that can use each integration.

To make an external embedding provider integration available to a database, you must link the database to an embedding provider credential. When you do this, you add the database to the credential’s scoped databases. When you create a collection in a scoped database, you can choose from the integrations and credentials that are available to the database.

You can add a new database to a credential’s scope as soon as you create the database, even while the database is initializing. Once the database becomes active, you can create collections that use the external embedding provider integration.

Potential scope delay

Usually, when you add a database to a credential’s scope, the integration is almost immediately available to new collections that you create in the database. Rarely, Astra DB can take a few minutes to propagate a scope change. You might encounter an error or delay when you try to create a collection in the following scenarios:

  • When you add extensive multi-region databases to a credential’s scope, it can take time to propagate the change to all regions.

  • When you add a new embedding provider integration while creating a collection in the Astra Portal, it can take time to activate the integration. This includes adding the database to the new credential’s scope.

If you can’t select your integration when you create a collection, make sure the database is scoped to at least one of the provider’s credentials in Astra DB. If the database is in scope and you recently added the integration or credential, wait a few minutes and try again.

Change providers or credentials

When you create a vector-enabled collection, you select the collection’s embedding generation method, which can include an embedding provider integration and credential. These selections are permanent for the life of the collection.

You must create a new collection if you want to do any of the following:

  • Change the collection’s embedding generation method.

  • Use a different embedding provider integration.

  • Use a different embedding provider credential.

If you need to rotate credentials, add the new credential to the integration in Astra DB, add scoped databases, and then create new collections that use the new credential. If possible, do this before you remove the old credential to avoid a gap in embedding generation.

When you remove a credential from Astra DB, the credential is not removed from your embedding provider account. Make sure to delete the credential from your embedding provider account if you no longer need it.

Removing a credential immediately disables vectorize embedding generation in all collections that use the removed credential.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com