The llm.embed: automation command interfaces with Large Language Model (LLM) providers to generate text vector embeddings.

(Added in 11.1)

Authentication and API calls are automatically handled by the command.

You simply provide a list of texts: to embed.

llm.embed:
  output: results
  inputs:
    llm:
      ollama:
        api_endpoint_url: http://host.docker.internal:11434
        model: nomic-embed-text
    texts:
      0: What is Cerb?
      1: Cerb automates customer service inboxes and workflows.

Syntax

inputs:

Key Type Notes
llm: list The LLM provider and model to use.
texts: list A list of text passages to embed.

llm:

The LLM provider is one of:

llm:
  aws_bedrock:
    api_endpoint_url: https://bedrock-runtime.us-east-1.amazonaws.com
    authentication: cerb:connected_account:aws
    dimensions: 1024
    model: amazon.titan-embed-text-v2:0
  huggingface:
    api_endpoint_url: https://api-inference.huggingface.co
    authentication: cerb:connected_account:huggingface
    model: BAAI/bge-large-en-v1.5
  ollama:
    api_endpoint_url: http://host.docker.internal:11434
    model: nomic-embed-text
  openai:
    api_endpoint_url: https://api.openai.com
    authentication: cerb:connected_account:openai
    model: text-embedding-3-large
  pinecone:
    api_endpoint_url: https://api.pinecone.io
    authentication: cerb:connected_account:pinecone
    model: multilingual-e5-large
  together:
    api_endpoint_url: https://api.together.xyz
    authentication: cerb:connected_account:together
    model: BAAI/bge-base-en-v1.5
  voyage:
    api_endpoint_url: https://api.voyageai.com
    authentication: cerb:connected_account:voyage
    model: voyage-3

The model: key is the name of the model to use. This must be a text embedding model.

The authentication: key is a connected account in URI format (e.g. cerb:connected_account:name) for API authentication. This may be omitted for local models like Ollama.

The optional api_endpoint_url: key overrides the default endpoint. For instance, this can be used with the openai: provider for any compatible API (e.g. SambaNova), or a locally hosted Ollama server.

texts:

The text passages to embed.

texts:
  0: What is Cerb?
  1@text:
    Cerb automates customer service inboxes and workflows.
    Build helpful AI agents, share high-productivity workspaces, and integrate with any API.

The text keys must be unique but are arbitrary.

output:

The key specified in output: is set to a dictionary with the following structure:

Key Description
embeddings A list of text vector embeddings.
output:
  embeddings:
    0@list:
      0.0071278084
      4.2720723E-5
      0.14210764
      # ...
    1@list:
      -0.0115925
      -0.005974933
      -0.14457184
      # ...