Skip to main content
View source

OpenAI (Embedding)

View as Markdown

A RocketRide embedding node that turns document chunks and questions into OpenAI API vectors; choose it when both ingestion and retrieval should use the same hosted text embedding model.

About OpenAI

OpenAI develops AI services and APIs. This node uses its embedding API through the langchain-openai integration to represent text as numeric vectors.

What it does

The node adds an embedding and embedding_model to documents and questions. Choose it over embedding_transformer when the selected embedding model should be called through OpenAI rather than loaded as a local sentence transformer. Documents in one write are sent to embed_documents as a batch; questions use embed_query.

Lanes

Lane inLane outDescription
documentsdocumentsEmbeds document chunks for storage.
questionsquestionsEmbeds questions for matching against stored vectors.

Profiles

Default: Text Small - A highly efficient model (text-embedding-3-small).

ProfileModelContext tokens
text-embedding-3-small (default)text-embedding-3-small8,191
text-embedding-3-largetext-embedding-3-large8,191
text-embedding-ada-002text-embedding-ada-0028,191
text-embedding-004text-embedding-0042,048
text-embedding-005text-embedding-0052,048
text-embedding-3-small-inferencetext-embedding-3-small-inference8,191
text-embedding-ada-002-v2text-embedding-ada-002-v28,191
text-embedding-large-exp-03-07text-embedding-large-exp-03-078,192
text-embedding-preview-0409text-embedding-preview-04093,072

This node currently supports text-embedding-3-small, text-embedding-3-large, and text-embedding-ada-002. The other declared profiles require LiteLLM routing, which this node does not currently implement; selecting one sends its model name to the OpenAI endpoint and fails during the startup probe.

Configuration

Select the profile used for both document ingestion and question embedding. The wrapper reads the profile’s configured model and token limit, and probes the selected model with dummy at startup to discover the vector size; account for that small startup request.

Model

The model value is passed to OpenAIEmbeddings. Keep the same profile for ingestion and querying the same vector index; changing it can change the vector representation and makes previously stored vectors unsuitable for new questions.

Authentication

Set the secure llm.cloud.apikey field for the selected profile. RocketRide resolves this field as apikey and passes it to OpenAIEmbeddings. If no configured key is available, langchain-openai can fall back to the engine process's OPENAI_API_KEY environment variable. The startup probe fails when neither source provides a usable key.

Upstream docs

Schema

FieldTypeDescriptionDefault
openai_embed.modelstringModel name
OpenAI model to use for embedding
openai_embed.profilestringModel
OpenAI embedding model
"text-embedding-3-small"

Dependencies

  • openai
  • langchain-openai