DocumentationAPI Reference📓 Tutorials🧑‍🍳 Cookbook🤝 Integrations💜 Discord🎨 Studio (Waitlist)
Documentation

Embedders

Embedders in Haystack transform texts or Documents into vector representations using pre-trained models. You can then use the embeddings in your pipeline for tasks like question answering, information retrieval, and more.

The embeddings produced by Haystack embedders are fixed-length vectors. They capture contextual information and semantic relationships within the text. The primary goal of embeddings is to transform text into a format the language model can understand and process in a more nuanced and contextually aware way.

These are the Embedders available in Haystack:

EmbedderDescription
AmazonBedrockTextEmbedderComputes embeddings for text (such as a query) using models through Amazon Bedrock API.
AmazonBedrockDocumentEmbedderComputes embeddings for Documents using models through Amazon Bedrock API.
AzureOpenAITextEmbedderComputes embeddings for text (such as a query) using OpenAI models deployed through Azure.
AzureOpenAIDocumentEmbedderComputes embeddings for Documents using OpenAI models deployed through Azure.
CohereTextEmbedderEmbeds a simple string (such as a query) with a Cohere model. Requires an API key from Cohere
CohereDocumentEmbedderEmbeds a list of Documents with a Cohere model. Requires an API key from Cohere.
FastembedTextEmbedderComputes the embeddings of a string using embedding models supported by Fastembed.
FastembedDocumentEmbedderComputes the embeddings of a list of Documents using the models supported by Fastembed.
FastembedSparseTextEmbedderEmbeds a simple string (such as a query) into a sparse vector using the models supported by Fastembed.
FastembedSparseDocumentEmbedderEnriches a list of documents with their sparse embeddings using the models supported by Fastembed.
GradientTextEmbedderComputes embeddings for text (such as a query) using models deployed through the Gradient AI platform.
GradientDocumentEmbedderComputes embeddings for Documents using models deployed through the Gradient AI platform.
HuggingFaceTEIDocumentEmbedderComputes embeddings for Documents using the TEI library.
HuggingFaceTEITextEmbedderCmputes embeddings for text using the TEI library.
JinaTextEmbedderEmbeds a simple string (such as a query) with a Jina AI Embeddings model. Requires an API key from Jina AI.
JinaDocumentEmbedderEmbeds a list of Documents with a Jina AI Embeddings model. Requires an API key from Jina AI.
MistralTextEmbedderTransforms a string into a vector using the Mistral API and models.
MistralDocumentEmbedderComputes the embeddings of a list of Documents using the Mistral API and models.
OllamaTextEmbedderComputes the embeddings of a string using embedding models compatible with the Ollama Library.
OllamaDocumentEmbedderComputes the embeddings of a list of Documents using embedding models compatible with the Ollama Library.
OpenAIDocumentEmbedderEmbeds a list of Documents with an OpenAI embedding model. Requires an API key from an active OpenAI account.
OpenAITextEmbedderEmbeds a simple string (such as a query) with an OpenAI embedding model. Requires an API key from an active OpenAI account.
SentenceTransformersTextEmbedderEmbeds a simple string (such as a query) using a Sentence Transformer model.
SentenceTransformersDocumentEmbedderEmbeds a list of documents with a Sentence Transformer model.

Related Links

See the parameters details in our API reference: