Skip to content

Embedding Model

Embedding Model turns texts into vectors, the form in which a vector store compares them by meaning, with the embedding model of any provider in NappAI. You choose Provider (OpenAI, Google, Cohere, Mistral, Bedrock, Azure, Ollama, FastEmbed…) and that provider’s model. Inside, it works exactly like that provider’s own component.

The difference is that switching provider does not mean switching node: you change it in the field, or the application that calls the flow changes it through the API.

When to use it

  • You want to compare several embedding models with the same documents before settling on one.
  • Your application works with several vector stores, each filled with a different model, and chooses on each call which one it searches.

If the model will not change, use the provider’s own component, such as OpenAI Embeddings or FastEmbed.

Configuration

FieldWhat it does
ProviderThe model’s provider. Default: OpenAI. Choose it first: when you change it, the node asks for that provider’s credential and loads its models.
Credential (required if the provider uses one)The credential of the chosen provider. The list only shows that provider’s credentials. FastEmbed, Ollama and LM Studio need none. See Credentials.
Model NameThe provider’s embedding model. Click the refresh button to load the ones your credential can use, or type its name.

The node remembers the credential you choose for each provider: when you go back to a provider you already set up, its credential comes back by itself.

Advanced options

FieldWhat it does
Base URLThe address where a model installed on your servers answers, such as Ollama or LM Studio. Only shown with the providers that use it.
DimensionsThe size of the vectors, with the providers that can shorten them. Empty: the model’s own.
Provider SettingsOther fields of the provider’s own component, each with its own name. Fields the provider does not have are ignored.
Credentials by ProviderThe credential the node remembers for each provider. It fills itself in when you choose a credential.

Switching the provider through the API

From another application, change the provider and the model with tweaks, using the node’s ID:

"tweaks": {
"MultiProviderEmbeddings-p2r7c": { "provider": "FastEmbed", "model_name": "BAAI/bge-small-en-v1.5" }
}

Always send the model together with the provider. The provider must have been set up on the canvas before, with its credential; otherwise, send credential_id too. More in Changing fields for one call.

Output

OutputWhat it contains
EmbeddingsThe embedding model, already configured. Connect it to the Embedding input of a vector store, such as Vector Store or FAISS, or to a Text Embedder.

Example

A team wants to know whether FastEmbed’s free model finds the answers in its manual as well as OpenAI’s.

  1. Build the flow with Embedding Model connected to a Vector Store.
  2. With OpenAI, fill the manual_openai collection. Switch to FastEmbed and fill manual_fastembed.
  3. Ask both collections the same questions, each with its own model, and compare the results.

Good practices

  • Always search with the same model you filled the collection with. Each model writes vectors of its own size and meaning: if you switch model on a collection that already holds vectors, searches stop finding what was there. Use one collection per model, or load the documents again after switching.
  • The spend is recorded on the chosen provider’s credential, and its limits apply.