VoyageTextEmbedder
Compute text embeddings using models by Voyage. VoyageTextEmbedder
is used in query pipelines to compute the user query embedding.
Basic Information
Third Party Integration
Voyage AI is a third party integration developed by an external provider and is not maintained by deepset. While we encourage you to explore it, we recommend reviewing it carefully to ensure it meets your needs.
- Pipeline type: Query
- Type:
haystack_integrations.components.embedders.voyage_embedders.VoyageTextEmbedder
- Components it typically connects with:
Query
:VoyageTextEmbedder
receives the query to be embedded from theQuery
input component.Retrievers
:VoyageTextEmbedder
can send the embedded query to a Retriever.
Inputs
Name | Type | Description |
---|---|---|
documents | List of Document objects | The documents to embed. |
Outputs
Name | Type | Description |
---|---|---|
documents | List of Document objects | Documents with the calculated embeddings stored in their embedding metadata field. |
meta | Dictionary | Information about the usage of the model. |
Overview
VoyageTextEmbedder
calculates vector representations for strings. It's used in query pipelines to embed user query. It's typically used after Query
and before Retrievers
. VoyageTextEmbedder
is an external integration, which means it was added by a Haystack community member and is maintained by them. For most recent information about this component, check the GitHub repository.
If you use VoyageTextEmbedder
in your query pipeline, you must use VoyageDocumentEmbedder
to embed the documents in your indexing pipeline, with the same model.
Embedding Models in Query and Indexing Pipelines
The embedding model you use to embed documents in your indexing pipeline must be the same as the embedding model you use to embed the query in your query pipeline.
This means the embedders for your indexing and query pipelines must match. For example, if you use
CohereDocumentEmbedder
to embed your documents, you should useCohereTextEmbedder
with the same model to embed your queries.
Authorization
For details, check Use Voyage AI Models.
Usage Example
In this example, VoyageTextEmbedder
receives the query from Query
and then sends the output documents to DocumentWriter
.
And here is the YAML configuration:
components:
...
OpenSearchEmbeddingRetriever:
type: haystack_integrations.components.retrievers.opensearch.embedding_retriever.OpenSearchEmbeddingRetriever
init_parameters:
document_store: null
filters: null
top_k: 10
filter_policy: replace
custom_query: null
raise_on_failure: true
efficient_filtering: false
VoyageTextEmbedder:
type: haystack_integrations.components.embedders.voyage_embedders.voyage_text_embedder.VoyageTextEmbedder
init_parameters:
model: voyage-2
input_type: query
truncate: null
prefix: ''
suffix: ''
..
connections:
- sender: VoyageTextEmbedder.embedding
receiver: OpenSearchEmbeddingRetriever.query_embedding
max_runs_per_component: 100
metadata: {}
inputs:
query:
- VoyageTextEmbedder.text
Init Parameters
For the initialization parameters, check the init()
method of the component in GitHub.
Updated 18 days ago