Open jeugregg opened 2 months ago
Actually, the issue is that by default langchain add an option : embed_instruction embed_instruction: str = "passage: "
And it kills everything with 'mxbai-embed-large'.
So to pass the test we need to add this when declaring model :
ollama_emb = OllamaEmbeddings(model="mxbai-embed-large", embed_instruction="")
I don't know if it is a good example to be actually accurate. What do you think that we need to use? I am going to try :
The mxbai-embed-large blog says to use :
- for embedding docs : embed_instruction = ""
- for query : query_instruction = "Represent this sentence for searching relevant passages: "
It works well with that.
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
No response
Description
THe test is not working well. It works with ollama directly but not with ollama under Langchain. Also, it works well with Llamafile under Langchain. The issue seems to be the same than here : https://github.com/ollama/ollama/issues/4207 Why is it not fixed with langchain?
System Info
System Information
Package Information
ollama : 0.2.1
Packages not installed (Not Necessarily a Problem)
The following packages were not found: