# Text Embedding

Generate vectors for document text and attach them to the original document records.

Use this node when later workflow steps need documents with embeddings. To build a searchable knowledge base directly, use [Embed and Add to Knowledge Base](knowledge-index.md).

## Configure input and model

| Input or setting | Description |
| --- | --- |
| `documents` | Required nonempty array, usually from parsing, cleaning, or chunking |
| `model` | Text embedding model; defaults to the workspace text embedding service configuration |

Choose a model that supports text embeddings. If no model is selected, the workspace must have an available text embedding service configured.

## Use the output

The output is still `documents`. The node embeds nonempty content into each record's `embedding` field and retains metadata.

Vectors remain in the output documents. Connect a writing node to persist them, or a knowledge base writing node to build a retrieval index.

## Example: embed chunks

Flow: General Document Parsing → Segment → Text Embedding.

Pass the full chunk array as `documents` and select a text embedding model. Check that each record contains both its text and the corresponding vector.

## Related pages

- [Variables and data flow](../../variables-and-data.md)
- [Run and debug](../../run-debug.md)
