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

Embedders

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

📘

For general guidance on how to choose an Embedder that would be right for you, read our Choosing the Right Embedder page.

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.
HuggingFaceAPIDocumentEmbedderComputes document embeddings using various Hugging Face APIs.
HuggingFaceAPITextEmbedderEmbeds strings using various Hugging Face APIs.
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.
NvidiaTextEmbedderEmbeds a simple string (such as a query) into a vector.
NvidiaDocumentEmbedderEnriches the metadata of documents with an embedding of their content.
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.
OptimumTextEmbedderEmbeds text using models loaded with the Hugging Face Optimum library.
OptimumDocumentEmbedderComputes documents’ embeddings using models loaded with the Hugging Face Optimum library.
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: