DocsEmbedding Model

Embedding Model

The Embedding Model converts given input into numerical vectors (embeddings) that represent the semantic meaning of the input text.

In Autoflow, we use the Embedding Model to vectorize documents and store them in TiDB. This enables us to leverage TiDB’s Vector Search capability to retrieve relevant documents for user queries.

Configure Embedding Model

After logging in with an admin account, you can configure the Embedding Model in the admin panel.

  1. Click on the Models > Embedding Models tab;

  2. Click the New Embedding Model button, select your preferred embedding model provider, and configure the model parameters.

    Add Embedding Model

Supported Providers

Currently Autoflow supports the following embedding model providers:

OpenAI

OpenAI provides a variety of Embedding Models, we recommend using the OpenAI text-embedding-3-small model due to its performance and compatibility with Autoflow.

Supported Models:

Embedding ModelVector DimensionsMax Tokens
text-embedding-3-small15368191

For more information, see the OpenAI Embedding Models documentation.

OpenAI-Like

Autoflow also supports embedding model providers (such as ZhipuAI) that conform to the OpenAI API specification.

You can also use models deployed on local AI model platforms (such as vLLM and Xinference) that conform to the OpenAI API specification in Autoflow.

To use OpenAI-Like embedding model providers, you need to provide the base URL of the embedding API as the following JSON format in Advanced Settings:

{
    "api_base": "{api_base_url}"
}

ZhipuAI BigModel

For example, the embedding API endpoint for ZhipuAI is:

https://open.bigmodel.cn/api/paas/v4/embeddings

You need to set up the base URL in the Advanced Settings as follows:

{
    "api_base": "https://open.bigmodel.cn/api/paas/v4/"
}

Supported Models:

Embedding ModelVector DimensionsMax Tokens
embedding-320488192

For more information, see the ZhipuAI embedding models documentation.

vLLM

When serving locally, the default embedding API endpoint for vLLM is:

http://localhost:8000/v1/embeddings

You need to set up the base URL in the Advanced Settings as follows:

{
    "api_base": "http://localhost:8000/v1/"
}

For more information, see the vLLM documentation.

JinaAI

JinaAI provides multimodal multilingual long-context Embedding Models for RAG applications.

Supported Models:

Embedding ModelVector DimensionsMax Tokens
jina-clip-v17688192
jina-embeddings-v310248192

For more information, see the JinaAI embedding models documentation.

Cohere

Cohere provides industry-leading large language models (LLMs) and RAG capabilities tailored to meet the needs of enterprise use cases that solve real-world problems.

Supported Models:

Embedding ModelVector DimensionsMax Tokens
embed-multilingual-v3.01024512

For more information, see the Cohere Embed documentation.

Amazon Bedrock

Amazon Bedrock is a fully managed foundation models service that provides a range of large language models and embedding models.

Featured Models:

Embedding ModelVector DimensionsMax Tokens
amazon.titan-embed-text-v2:010248192
amazon.titan-embed-text-v115368192
amazon.titan-embed-g1-text-0215368192
cohere.embed-english-v31024512
cohere.embed-multilingual-v31024512

To check all embbeding models supported by Bedrock, go to Bedrock console.

To use Amazon Bedrock, you’ll need to provide a JSON Object of your AWS Credentials, as described in the AWS CLI config global settings:

{
    "aws_access_key_id": "****",
    "aws_secret_access_key": "****",
    "aws_region_name": "us-west-2"
}

For more information, see the Amazon Bedrock documentation.

Ollama

Ollama is a lightweight framework for building and running large language models and embedding models locally.

Supported Models:

Embedding ModelVector DimensionsMax Tokens
nomic-embed-text7688192
bge-m310248192

To use Ollama, you’ll need to configure the API base URL in the Advanced Settings:

{
    "api_base": "http://localhost:11434"
}

For more information, see the Ollama embedding models documentation.

Gitee AI

Gitee AI is a third-party model provider that offers ready-to-use cutting-edge model APIs for AI developers.

Supported Models:

Embedding ModelVector DimensionsMax Tokens
bge-m310248192
bge-large-zh-v1.51024512
bge-small-zh-v1.5512512

For more information, see the Gitee AI embedding models documentation.

Local Embedding Server

Autoflow’s local embedding server is a self-hosted embedding service built upon sentence-transformers and deployed on your own infrastructure.

You can choose from a variety of pre-trained models from Hugging Face, such as:

Embedding ModelVector DimensionsMax Tokens
BAAI/bge-m310248192

To configure the Local Embedding Service, set the API URL in the Advanced Settings:

{
    "api_url": "http://local-embedding-reranker:5001/api/v1/embedding"
}