Saltar al contenido principal

Embed

Category: RAG
Node id: embed

Generates text embeddings/vectors using configurable providers (OpenAI, Hugging Face, Cohere, local)

What it does​

  • Multi-provider text embedding (OpenAI, Hugging Face, Cohere, local)
  • Configurable embedding dimensions (1-4096)
  • Unit-length vector normalization
  • Deterministic embedding generation for testing
  • Text length tracking in output metadata

Use cases​

  • Generating embeddings for RAG vector store ingestion
  • Converting clinical text to vectors for similarity search
  • Building semantic search indices for document collections

Runtime​

  • Performance tier: fast

Input ports​

NameTypeRequiredDescription
texttextYesText to embed

Output ports​

NameTypeRequiredDescription
resultjsonNoMain result containing embedding vector, dimensions, text_length, provider, and model
successbooleanNoWhether the operation succeeded

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
ProviderproviderenumNoopenaiopenai, huggingface, cohere, localEmbedding provider to use
ModelmodelstringNotext-embedding-ada-002Embedding model name
DimensionsdimensionsnumberNo1536min 1; max 4096Embedding vector dimensions

Auth​

SettingNameTypeRequiredDefaultAllowed valuesDescription
API Keyapi_keysecretNoAPI key for cloud providers (not required for local)

Errors​

CodeDescription
TEXT_REQUIREDNo text input was provided for embedding
INVALID_PROVIDERProvider must be openai, huggingface, cohere, or local
API_KEY_REQUIREDAPI key is required for cloud providers

Runtime notes​

  • result.embedding is a float32 array of length 'dimensions' — wire to a vector-store node for indexing
  • Vectors are L2-normalized to unit length
  • The 'dimensions' config must match your vector store index dimensions exactly
  • Currently uses deterministic embeddings for testing — production requires a valid api_key for cloud providers

See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.

¿Algo no está claro? Envíe sus comentarios sobre la documentación por correo electrónico..