EDB Embedded Models v1.4.0 (LTS)

The EDB Embedded Models component runs inference inside a Postgres cluster using the AIDB extension's built-in models. No external inference service is involved: embeddings and small-model text generation execute on the database CPU, producing data that's already where you want it for downstream Postgres operations.

Choosing the right component

Use the EDB Embedded Models component when:

  • You want text or image embeddings produced locally on the cluster, with no external network call.
  • You want small-model text generation (T5, Llama-Instruct, Qwen2, SmolLM2) close to the data, for tasks that don't need a large frontier model.
  • You're building a flow that combines a single embedding step with vector storage in the same cluster.

Use a different component if:

Prerequisites

  • An HM cluster with the aidb extension installed.
  • At least one supported embedded model registered in aidb.list_models(). Supported providers: bert_local, clip_local, t5_local, llama_instruct_local, qwen2_local, smollm2_local.
  • An HM machine-user access key and the database user/password saved in Langflow as Global Variables.

Inputs

Connection

FieldTypeRequiredDefaultNotes
Connection ModeDropdownYesHybrid ManagerHybrid Manager or Direct Connection. Switches the connection fields that follow.
Hybrid Manager URLTextNoAdvanced. Override the default HM URL.
HM Machine User KeySecretYesHM_API_KEYDefaults to the global variable named HM_API_KEY.
Hybrid Manager ProjectDropdownYesPopulated from your HM projects.
Hybrid Manager DatabaseDropdownYesThe cluster running aidb.
Database GroupDropdownNoCluster group, for example primary or reader.
Database Connection TypeDropdownYesFor example, read or read/write.
User for the databaseTextYesHM_DB_USERDefaults to the HM_DB_USER global variable.
Password for the databaseSecretYesHM_DB_PASSWORDDefaults to the HM_DB_PASSWORD global variable.
Default database name overrideTextNoAdvanced. Override the cluster default when listing databases.
Database NameDropdownYesThe database with aidb installed.

In Direct Connection mode the HM cluster fields are replaced with Database Host and Database Port.

Model selection

FieldTypeRequiredDefaultNotes
ModelDropdownYesPopulated from aidb.list_models() against the selected database. Use the refresh button if you've just registered a model.
Model CapabilityDropdownYesAvailable capabilities depend on the selected model. See Capabilities.

Capability-specific inputs

The fields that follow the capability dropdown depend on what Model Capability is set to.

When Model Capability is Text Embedding:

FieldTypeRequiredDefaultNotes
Text InputMessage/DataNoText to embed. If empty, the component outputs the embeddings model itself (useful for wiring into a vector store, see Outputs).

When Model Capability is Text Generation:

FieldTypeRequiredDefaultNotes
PromptMessageYesThe prompt to send to the model.
TemperatureSliderNo0.1Advanced. Controls randomness. Range 0–1.
Max TokensIntegerNoAdvanced. Maximum tokens to generate. Range 1–4096.

When Model Capability is Image Embedding:

FieldTypeRequiredDefaultNotes
ImageData/MessageYesThe image to embed. Connect a File component or upstream image-producing component.

Outputs

Outputs vary by capability:

CapabilityOutputTypeCarries
Text Embedding (with text supplied)EmbeddingData{input, embedding, model, embedding_dim} for the supplied text.
Text Embedding (text empty)EmbeddingDataThe embeddings model itself, suitable for passing to a vector store component.
Image EmbeddingEmbeddingData{input, embedding, model, embedding_dim} for the supplied image.
Text GenerationResponseMessageThe model's generated text.

Capabilities

The Model Capability dropdown lists only the capabilities of the selected model. Mapping of the built-in models:

ModelCapabilities
bert_localText Embedding
clip_localText Embedding, Image Embedding
t5_localText Embedding, Text Generation
llama_instruct_localText Generation
qwen2_localText Generation
smollm2_localText Generation

If a model has a single capability the dropdown is hidden and the capability is selected automatically.

Note
  • Inference runs on the database cluster's CPU, not on the HM control plane and not on a model server cluster. Large workloads will compete with regular database queries on that cluster's CPU and memory.
  • The component uses aidb.encode_text, aidb.encode_text_batch (batch embedding on the vector-store output path, when Text Input is empty), aidb.encode_image, and aidb.decode_text under the hood. See the AIDB documentation for details on each function.