Skip to main content

LLM Get Embeddings

The LLM Get Embeddings task retrieves numerical vector representations of words, phrases, sentences, or documents that have been previously generated or learned by the model. Unlike the LLM Generate Embeddings task, which creates vector representations from input data, this task focuses on efficiently accessing pre-existing embeddings. This is useful for utilizing embeddings that have already been computed and stored without regenerating them.

The LLM Get Embeddings task accesses pre-computed embeddings stored in a vector database. It retrieves vectors based on specified parameters, such as vector database, namespace, index, and embedding source. This task enables efficient querying of stored embeddings to fetch relevant data quickly.

Task parameters

Configure these parameters for the LLM Get Embeddings task.

ParameterDescriptionRequired/Optional
inputParameters.vectorDBThe vector database from which data is to be retrieved.

Note: If you haven’t configured the vector database on your Orkes Conductor cluster, navigate to the Integrations tab and configure your required provider. Refer to the documentation on how to integrate Vector Databases with Orkes console.
Required.
inputParameters.namespaceNamespaces are separate isolated environments within the database to manage and organize vector data effectively. Choose from the available namespace configured within the chosen vector database.

The usage and terminology of the namespace field vary depending on the integration:
  • For Pinecone, the namespace field is applicable.
  • For Weaviate, the namespace field is not applicable.
  • For MongoDB, the namespace field is referred to as “Collection” in MongoDB.
  • For Postgres, the namespace field is referred to as “Table” in Postgres.
Required.
inputParameters.indexThe index in your vector database where the indexed text or data was stored.

The terminology of the index field varies depending on the integration:
  • For Weaviate, the index field indicates the class name.
  • For other integrations, it denotes the index name.
Required.
inputParameters.embeddingsThe embeddings from which the stored data will be retrieved. This should be from the same embedding model used to create the embeddings stored in the specified index.Required.

Task configuration

This is the task configuration for an LLM Store Embeddings task.

{
"name": "llm_get_embeddings_task",
"taskReferenceName": "llm_get_embeddings_task_ref",
"inputParameters": {
"vectorDB": "pineconedb",
"namespace": "myNewModel",
"index": "test",
"embeddings": "${llm_generate_embeddings_task_ref.output}" // Can be passed as variable from preceding task
},
"type": "LLM_GET_EMBEDDINGS"
}

Task output

The LLM Get Embeddings task will return the following parameters.

ParameterDescription
resultA JSON array containing the results of the query.
scoreRepresents a value quantifying the degree of likeness between a specific item and a query vector, facilitating ranking and ordering of results. Higher scores denote stronger relevance to the query vector.
metadataAn object containing additional metadata related to the retrieved document.
docIdThe unique identifier of the queried document.
parentDocIdAn identifier that denotes a parent document in hierarchical or relational data structures.
textThe actual content retrieved.

Adding an LLM Get Embeddings task in UI

To add an LLM Get Embeddings task:

  1. In your workflow, select the (+) icon and add an LLM Get Embeddings task.
  2. Choose the Vector database, Namespace, and Index to store the embeddings.
  3. Choose the Embedding from which the stored data is to be retrieved.

LLM Get Embeddings Task - UI