You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm attempting to utilize the ChromaQueryTextRetriever following this example and encountering an error of chromadb.errors.InvalidDimensionException: Embedding dimension 384 does not match collection dimensionality 768.
Error message chromadb.errors.InvalidDimensionException: Embedding dimension 384 does not match collection dimensionality 768.
Expected behavior
Expected to receive known output variable “documents”: a list of Documents.
Additional context
My documents have been embedded using OllamaDocumentEmbedder via the nomic-embed-text model. With my still developing sense of what's going on (new to this), I believe this error may be due to the default chromadb embedding_function utilizing all-MiniLM-L6-v2 as mentioned here: https://docs.trychroma.com/embeddings#default-all-minilm-l6-v2 not matching the model used to generate the embeddings.
Describe the bug
I'm attempting to utilize the ChromaQueryTextRetriever following this example and encountering an error of
chromadb.errors.InvalidDimensionException: Embedding dimension 384 does not match collection dimensionality 768
.Error message
chromadb.errors.InvalidDimensionException: Embedding dimension 384 does not match collection dimensionality 768
.Expected behavior
Expected to receive known output variable “documents”: a list of Documents.
Additional context
My documents have been embedded using
OllamaDocumentEmbedder
via thenomic-embed-text
model. With my still developing sense of what's going on (new to this), I believe this error may be due to the defaultchromadb
embedding_function utilizingall-MiniLM-L6-v2
as mentioned here: https://docs.trychroma.com/embeddings#default-all-minilm-l6-v2 not matching the model used to generate the embeddings.However, because
chroma-haystack
(0.15.0) depends onchromadb (<0.4.20)
OllamaEmbeddingFunction is not available yet, (https://github.com/chroma-core/chroma/blob/0.5.0/chromadb/utils/embedding_functions.py#L966) only just added in chromadb 0.5.0.Describe the solution you'd like
I believe removing the pin on chomadb
<0.4.20
and allowing latest v0.5.0
(which introducedOllamaEmbeddingFunction
) will resolve the issue.To Reproduce
OllamaDocumentEmbedder(model="nomic-embed-text")
and persist to chroma document store.ChromaQueryTextRetriever(document_store)
chromadb.errors.InvalidDimensionException
.FAQ Check
System:
chromadb
The text was updated successfully, but these errors were encountered: