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:
- You need a Hybrid Manager-hosted large-model inference endpoint. Use EDB Model Server or EDB Embeddings.
- You want to retrieve from an existing knowledge base rather than compute new embeddings. Use EDB Knowledge Base.
Prerequisites
- An HM cluster with the
aidbextension 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
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| Connection Mode | Dropdown | Yes | Hybrid Manager | Hybrid Manager or Direct Connection. Switches the connection fields that follow. |
| Hybrid Manager URL | Text | No | Advanced. Override the default HM URL. | |
| HM Machine User Key | Secret | Yes | HM_API_KEY | Defaults to the global variable named HM_API_KEY. |
| Hybrid Manager Project | Dropdown | Yes | Populated from your HM projects. | |
| Hybrid Manager Database | Dropdown | Yes | The cluster running aidb. | |
| Database Group | Dropdown | No | Cluster group, for example primary or reader. | |
| Database Connection Type | Dropdown | Yes | For example, read or read/write. | |
| User for the database | Text | Yes | HM_DB_USER | Defaults to the HM_DB_USER global variable. |
| Password for the database | Secret | Yes | HM_DB_PASSWORD | Defaults to the HM_DB_PASSWORD global variable. |
| Default database name override | Text | No | Advanced. Override the cluster default when listing databases. | |
| Database Name | Dropdown | Yes | The database with aidb installed. |
In Direct Connection mode the HM cluster fields are replaced with Database Host and Database Port.
Model selection
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| Model | Dropdown | Yes | Populated from aidb.list_models() against the selected database. Use the refresh button if you've just registered a model. | |
| Model Capability | Dropdown | Yes | Available 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:
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| Text Input | Message/Data | No | Text 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:
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| Prompt | Message | Yes | The prompt to send to the model. | |
| Temperature | Slider | No | 0.1 | Advanced. Controls randomness. Range 0–1. |
| Max Tokens | Integer | No | Advanced. Maximum tokens to generate. Range 1–4096. |
When Model Capability is Image Embedding:
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| Image | Data/Message | Yes | The image to embed. Connect a File component or upstream image-producing component. |
Outputs
Outputs vary by capability:
| Capability | Output | Type | Carries |
|---|---|---|---|
| Text Embedding (with text supplied) | Embedding | Data | {input, embedding, model, embedding_dim} for the supplied text. |
| Text Embedding (text empty) | Embedding | Data | The embeddings model itself, suitable for passing to a vector store component. |
| Image Embedding | Embedding | Data | {input, embedding, model, embedding_dim} for the supplied image. |
| Text Generation | Response | Message | The model's generated text. |
Capabilities
The Model Capability dropdown lists only the capabilities of the selected model. Mapping of the built-in models:
| Model | Capabilities |
|---|---|
bert_local | Text Embedding |
clip_local | Text Embedding, Image Embedding |
t5_local | Text Embedding, Text Generation |
llama_instruct_local | Text Generation |
qwen2_local | Text Generation |
smollm2_local | Text 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, andaidb.decode_textunder the hood. See the AIDB documentation for details on each function.