AI Connection Strings - Overview
-
In RavenDB, you can define Embeddings Generation Tasks that generate embeddings from the content of your documents. These embeddings are stored in a dedicated collection within the database and enable vector search on your document content.
-
Each embeddings generation task must define a connection string to an embedding provider.
This connection string specifies where the embeddings will be generated, allowing RavenDB to integrate with external services such as OpenAI and any other OpenAI-compatible providers, as well as Azure OpenAI,
Hugging Face, Google AI, Ollama, Mistral AI, or RavenDB’s embedded model (bge-micro-v2). -
While each task can have only one connection string, you can define multiple connection strings in your database to support different providers or configurations.
A single connection string can also be reused across multiple tasks in the database. -
These connection strings can be created from:
- The AI Connection Strings view in the Studio, where you can create, edit, and delete connection strings that are not in use.
- The Client API - examples are available in the dedicated articles for each provider.
- In this article:
The AI Connection Strings view

The AI Connection Strings view
-
Go to the AI Hub menu.
-
Open the AI Connection Strings view.
-
Click "Add new" to create a new connection string.
-
View the list of all AI connection strings that have been defined.
-
Edit or delete a connection string.
Only connection strings that are not in use by a task can be deleted.
Creating an AI connection string

Create connection string
-
Name
Enter a unique name for the connection string. -
Identifier
Enter a unique identifier for the connection string.
Each AI connection string in the database must have a distinct identifier.If not specified, or when clicking the "Regenerate" button,
RavenDB automatically generates the identifier based on the connection string name. For example:- If the connection string name is: "My connection string to Google AI"
- The generated identifier will be: "my-connection-string-to-google-ai"
Allowed characters: only lowercase letters (a-z), numbers (0-9), and hyphens (-).
See how this identifier is used in the embeddings cache collection. -
Regenerate
Click "Regenerate" to automatically create an identifier based on the connection string name. -
Connector
Select an AI provider from the dropdown menu.
This will open a dialog where you can configure the connection details.
Configuration details for each provider are explained in the following articles: -
Once you complete all configurations for the selected provider in the dialog,
save the connection string definition.