[GH-ISSUE #8357] Faiss document dependency error #67415

Closed
opened 2026-05-04 10:17:09 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @suckseed5 on GitHub (Jan 9, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8357

What is the issue?

Hello, we have some questions about similar document matching and look forward to your reply.

image
Ollama Embeddings Model: quentinz/bge-large-zh-v1.5:latest
Vector Stores: faiss
Index: Some knowledge base about legal documents
Ask Question: What's the weather like today?

Why is the question completely unrelated to the vector library, but it still matches the content and has a high score?

OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @suckseed5 on GitHub (Jan 9, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8357 ### What is the issue? Hello, we have some questions about similar document matching and look forward to your reply. ![image](https://github.com/user-attachments/assets/529de6eb-bc87-4ac6-942d-49f75feb1744) Ollama Embeddings Model: quentinz/bge-large-zh-v1.5:latest Vector Stores: faiss Index: Some knowledge base about legal documents Ask Question: What's the weather like today? Why is the question completely unrelated to the vector library, but it still matches the content and has a high score? ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the question label 2026-05-04 10:17:09 -05:00
Author
Owner

@rick-github commented on GitHub (Jan 9, 2025):

Seems like a question for whoever wrote the scoring function.

<!-- gh-comment-id:2579258231 --> @rick-github commented on GitHub (Jan 9, 2025): Seems like a question for whoever wrote the scoring function.
Author
Owner

@suckseed5 commented on GitHub (Jan 9, 2025):

Seems like a question for whoever wrote the scoring function.

Yes, this will directly lead to matching the wrong knowledge base information.

<!-- gh-comment-id:2579285132 --> @suckseed5 commented on GitHub (Jan 9, 2025): > Seems like a question for whoever wrote the scoring function. Yes, this will directly lead to matching the wrong knowledge base information.
Author
Owner

@rick-github commented on GitHub (Jan 9, 2025):

All ollama does is provide the embedding, questions about the scoring function need to be asked in the appropriate forum. Perhaps if you provide some more information (client, framework, backend, etc), somebody could provide a pointer.

<!-- gh-comment-id:2579302352 --> @rick-github commented on GitHub (Jan 9, 2025): All ollama does is provide the embedding, questions about the scoring function need to be asked in the appropriate forum. Perhaps if you provide some more information (client, framework, backend, etc), somebody could provide a pointer.
Author
Owner

@suckseed5 commented on GitHub (Jan 9, 2025):

Just replacing the Ollama Embeddings component with HuggingFace Embeddings, it worked. Is Ollama Embeddings inaccurate?
But are there any offline embedding tools?

<!-- gh-comment-id:2579361696 --> @suckseed5 commented on GitHub (Jan 9, 2025): Just replacing the Ollama Embeddings component with HuggingFace Embeddings, it worked. Is Ollama Embeddings inaccurate? But are there any offline embedding tools?
Author
Owner

@rick-github commented on GitHub (Jan 9, 2025):

Have you tried different embedding models? Perhaps quentinz/bge-large-zh-v1.5 outputs embeddings that are too similar. Note that quentinz/bge-large-zh-v1.5 has a context length of 512 and your chunk size is 1000, so if your input is token-rich, you will be losing semantic information from the embeddings. There are many offline embedding tools, see for example fastembed.

<!-- gh-comment-id:2579445530 --> @rick-github commented on GitHub (Jan 9, 2025): Have you tried different [embedding](https://ollama.com/search?c=embedding) models? Perhaps quentinz/bge-large-zh-v1.5 outputs embeddings that are too similar. Note that quentinz/bge-large-zh-v1.5 has a context length of 512 and your chunk size is 1000, so if your input is token-rich, you will be losing semantic information from the embeddings. There are many offline embedding tools, see for example [fastembed](https://github.com/qdrant/fastembed).
Author
Owner

@pdevine commented on GitHub (Jan 11, 2025):

I'm going to go ahead and close the issue. It looks like from the model page there is a GH repo. Best to check with the authors there.

<!-- gh-comment-id:2584936284 --> @pdevine commented on GitHub (Jan 11, 2025): I'm going to go ahead and close the issue. It looks like from the [model page](https://github.com/FlagOpen/FlagEmbedding) there is a GH repo. Best to check with the authors there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#67415