-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] LlamaIndex embeddings using wrong method #515
Comments
the object is used to call the functions, but agree that we might want to consider text_embedding_batch() |
Right, but I think we also don't want to ignore the fact that its pretty common for embedding models to embed queries and documents differently (cohere and nomic are both examples that need this) Maybe this needs to be a parameter on the request? |
I've also noticed that the embeddings API in general only works by sending a single piece of text at a time. This is neither efficient nor openai compatible sadly Related PR: run-llama/llama_index#16666 |
Hi, this problem has been fixed in PR #892 |
@logan-markewich Could you please help close the issue if the PR works? Thanks. |
The llamaindex tea embeddings are using a private method
GenAIComps/comps/embeddings/llama_index/embedding_tei.py
Line 21 in cd83854
It's not clear to me if the embedding service is meant to handle query embeddings or document embeddings. But either way, we should be using
embed_model.get_text_embedding(text)
orembed_model.get_query_embedding(query)
Likely we should have two endpoints, one for query and one for normal text documents.
We might also want to consider using
get_text_embeddings_batch()
instead of processing one document at a time, but again, depends on how we want to define our embedding endpointsThe text was updated successfully, but these errors were encountered: