LLM Get Embeddings
A system task to retrieve numerical vector representations of words, phrases, sentences, or documents that have been previously generated or learned by the model. Unlike the process of generating embeddings (LLM Generate Embeddings task), which involves creating vector representations from input data, this task focuses on efficiently accessing pre-existing embeddings. This is particularly useful when you have already computed and stored embeddings and want to utilize them without regeneration.
Definitions
{
"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}"
},
"type": "LLM_GET_EMBEDDINGS"
}
Input Parameters
Parameter | Description |
---|---|
vectorDB | Choose the vector database from which data is to be retrieved. Note:If you haven’t configured the vector database on your Orkes console, navigate to the Integrations tab and configure your required provider. Refer to the documentation on how to integrate Vector Databases with Orkes console. |
namespace | Choose from the available namespace configured within the chosen vector database. Namespaces are separate isolated environments within the database to manage and organize vector data effectively. Note: The namespace field has different names and applicability based on the integration:
|
index | Choose the index in your vector database where indexed text or data was stored. Note:For Weaviate integration, this field refers to the class name, while for other integrations, it denotes the index name. |
embeddings | Select the embeddings from which the stored data is to be retrieved. This should be from the same embedding model used to create the embeddings stored in the specified index. |
Output Parameters
Parameter | Description |
---|---|
result | A JSON array containing the results of the query. |
score | Represents a value that quantifies the degree of likeness between a specific item and a query vector, facilitating the ranking and ordering of results. Higher scores denote a stronger resemblance or relevance to the query vector. |
metadata | An object containing additional metadata related to the retrieved document. |
docId | Displays the unique identifier of the document queried. |
parentDocId | Another identifier that might denote a parent document in hierarchical or relational data structures. |
text | Actual content of the document retrieved. |
Examples
- UI
- JSON
- Add task type LLM Get Embeddings.
- Choose the vector database & namespace.
- Provide the input parameters.
{
"name": "llm_generate_embeddings_task",
"taskReferenceName": "llm_generate_embeddings_task_ref",
"inputParameters": {
"llmProvider": "azure_openai",
"model": "text-davinci-003",
"text": "${workflow.input.text}"
},
"type": "LLM_GENERATE_EMBEDDINGS"
},
{
"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}"
},
"type": "LLM_GET_EMBEDDINGS"
}
],
"inputParameters": [
"text"
]