AI Connection Strings - Overview
-
AI connection strings define how RavenDB connects to external AI models.
Each connection string specifies the provider and the model to use.
The model can be either a chat model or a text embedding model. -
These connection strings are then used by AI-powered features in RavenDB, such as:
- Embeddings Generation Tasks -
use text embedding models to generate vector embeddings from document content for vector search. - Gen AI Tasks and AI Agents -
interact with chat models for reasoning, summarization, or conversational workflows.
- Embeddings Generation Tasks -
-
RavenDB supports connecting to the following external providers:
OpenAI & OpenAI compatible providers, Azure OpenAI,
Google AI, Vertex AI, Ollama, Hugging Face, and Mistral AI,
or to 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. -
The AI 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.
- The AI Connection Strings view in the Studio -
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 (from the Studio)

-
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 (-).
For exmaple, 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. -
Model type
Select the type of model you want to interact with:- Chat model
Select this type to use a conversational model for content generation and dialogue. - Text embedding model
Select this type to generate vector embeddings from your document content for vector search.
- Chat model
-
Connector
Select an AI provider from the dropdown menu.
This opens a dialog where you can configure the connection details for the selected provider.The list of available providers is filtered based on the selected model type.
(Some providers are currently supported in RavenDB only for text embedding models).Configuration details for each provider are explained in the following articles:
- Azure Open AI
- Google AI (embeddings only)
- Hugging Face (embeddings only)
- Ollama
- OpenAI
- Mistral AI (embeddings only)
- Vertex AI (embeddings only)
- Embedded model (bge-micro-v2) (embeddings only)
-
Once you complete all configurations for the selected provider in the dialog,
save the connection string definition.