mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 23:21:44 -05:00
[GH-ISSUE #3764] Logging and Document RAG Broken? (KeyError: 'dimension') #133103
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ProjectMoon on GitHub (Jul 10, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/3764
Bug Report
Update: oookay. So, upgrading the remote ChromaDB server to 0.5.3 triggers embedding again. So, if you are using remote ChromaDB, it probably needs to be upgraded. And possibly the data nuked too.
Description
Bug Summary:
Two problems reported in this bug, though it's mostly about the RAG failure:
Original Sumary
I am running 0.3.8. However, the logging seems to have ... stopped. Basically nothing shows up in the logs, until I restart the container. Then, a little bit shows up.
I tried setting up Tika, and pointed OpenWebUI at it. It SEEMS like the context search is triggered, but my embedding model never gets loaded. I switched back to the default content extraction engine, and still no embeddings seem to be generated. Is there something odd going on?
I do have hybrid search turned on.
Document upload succeeds according to browser console. But it's... weirdly fast. Usually the content extraction is done immediately. But now I see no embeddings generated.
It seems like the LLM is being given a search context, but nothing's in it. No citations are given, and responses don't reference uploaded or referenced documents.
Environment
Open WebUI Version: 0.3.8
Ollama (if applicable): 0.2.2
Operating System: Gentoo Linux + Docker
Browser (if applicable): Firefox
Reproduction Details
store_docs_in_vector_dbmethod fails withKeyError: 'dimension', seemingly around the create collection call.Logs and Screenshots
https://github.com/open-webui/open-webui/issues/3764#issuecomment-2221279283
Installation Method
Docker
Additional Information
After some tracing with printlns and container restarts, I think that the RAG failure is related to the ChromaDB create collection call. See: https://github.com/open-webui/open-webui/issues/3764#issuecomment-2221279283
Embedding engine (e.g. sentence-transfomers vs ollama) doesn't seem to matter for this issue.
@zono50 commented on GitHub (Jul 10, 2024):
I was literally just logging in to report this same issue. I can't seem to scan epub files anymore, and when i do docker logs -f and then the ID, i get this
/ _ \ _ __ ___ _ __ \ \ / /| | | | | |_ |
| | | | ' \ / _ \ '_ \ \ \ /\ / / _ \ '_ | | | || |
| || | |) | / | | | \ V V / / |) | || || |
_/| ./ _|| || _/_/ _|./ _/|_|
||
v0.3.8 - building the best open-source AI user interface.
https://github.com/open-webui/open-webui
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL
and that's it.
Mine will scan in pdfs, but i have a bunch of linux books i want to scan in that are epub, and it won't add them in.
@ProjectMoon commented on GitHub (Jul 10, 2024):
The logging is probably unrelated, but it doesn't help in diagnosing the problem with RAG. Python has a particular oddity when it comes to buffered output in Docker. This can usually be worked around with
python -u. Not sure why it started in the latest release.But the RAG pipeline not functioning is rather odd, and I am wondering if it's a problem with the certain combination of settings. Do you have an Ollama embedding model?
@zono50 commented on GitHub (Jul 10, 2024):
I have an option for the ollama embedding model, also the default sentence transformers. Do i have to setup anything special for the ollama embedding model to choose that as the embedding model engine?
@ProjectMoon commented on GitHub (Jul 10, 2024):
Sorry, should have been more clear with my question. Are you using the ollama embedding model as the embedding engine? Or sentence transformers?
@zono50 commented on GitHub (Jul 10, 2024):
i'm using sentence transformers
@ricky-davis commented on GitHub (Jul 10, 2024):
Can confirm I'm getting no logs after the github link as well
@ProjectMoon commented on GitHub (Jul 10, 2024):
OK so after a bunch of tracing with print statements and container restarts, I have traced this down to something likely wrong with the ChromaDB
create_collectioncall.I should note that I am using a remote ChromaDB server, so I am using the HTTP client.
Here is (part of) the RAG code:
Resulting logs, visible on container restart:
@ProjectMoon commented on GitHub (Jul 10, 2024):
Aaaand... yes.
https://github.com/chroma-core/chroma/issues/2440
This is a problem in upstream ChromaDB. OpenWebUI is using ChromaDB 0.5.3, which causes this problem.
@zono50 commented on GitHub (Jul 10, 2024):
gotcha, is there a work around for this currently?
@ProjectMoon commented on GitHub (Jul 10, 2024):
Are you using a remote ChromaDB?
Edit: upgrading my ChromaDB server to 0.5.3 makes everything work again. So probably the release notes need to be updated to mention this for people using remote ChromaDB. It shouldn't be noticed by people using the in-memory one (I think).
Now, as for the logging... that's another story.
Edit 2: Also had to completely nuke the ChromaDB instance to make things work properly again, clearing it of documents that were already uploaded and failed.
@tjbck commented on GitHub (Jul 10, 2024):
Thanks for the report, will promptly update the changelog to mention the ChromaDB update requirement!