feat: Option to set "Full context mode" for file upload and knowledge retrieval individually. #18632
Replies: 11 comments 22 replies
-
|
We use OWUI since more than a year now in production.
We get these responses all the time, I tried to upload this and ask this, but it did not work well, can you help me, what did I do wrong. If there was a logic, that checks after extracting the text: If there would be an option in the Admin-Settings to set the "entire-document-threshold", in thousand tokens. Making full context for uploaded documents the default would be a 5 star quality improvement for me and all my users. |
Beta Was this translation helpful? Give feedback.
-
|
You can manually enable full context mode for uploaded files, but right now it can not be set as default. The logic check sounds nice, but the problem is that at the document extraction step (the step where the document length would be known), OWUI does not know the model context length or the model tokenizer. Also, what if the document is uploaded mid-chat? How is it handled then with the length? Would it be okay if the document fills 90% of the context window? |
Beta Was this translation helpful? Give feedback.
-
|
I made a PR to at least set the default for uploaded documents to full content mode: #19166 |
Beta Was this translation helpful? Give feedback.
-
|
Thx Marko, I did not expect that quick rework :) but your PR is very welcome. I hope that Tim is willing to commit your changes very soon. |
Beta Was this translation helpful? Give feedback.
-
|
I have a related PR that allows admins to configure interface Default settings for users Besides i understand Tim's reasoning. This should probably be a user sided toggle |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
I also understand Tim's reasons, some settings should be user-related, but I cannot count anymore how often I wished to have a full context by default. As we get the requests all the time... Most users just silently drop that system if it does not work as expected, for them, it is the most basic thing to get a document summarized... |
Beta Was this translation helpful? Give feedback.
-
|
To be honest, I am fine with a user side toggle as long as it gets implemented. :) |
Beta Was this translation helpful? Give feedback.
-
|
Soooooo you guys wanna make a new PR to implement this as a ... user sided interface setting after my PR for modifying the interface settings from admin panel was merged? sounds like the ideal solution for you then? :D |
Beta Was this translation helpful? Give feedback.
-
|
FYI everyone: #18684 and with this comment here: #18684 (comment) you can set the interface settings for all users for now |
Beta Was this translation helpful? Give feedback.
-
|
I'm sorry if there is some kind of solution I missed, but what about having two options when dragging files into the chat windows — like a splitscreen (left, query mode; right, full context)? I don't if it's possible to filter for file extensions... In any case, if there is no way to have RAG as well as attach full files as default, this is an issue. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Check Existing Issues
Problem Description
Focus Retrieval mode does not work well on uploaded documents, we noticed that switching to full context / full document mode at the uploaded document fixed that issue and requests give good answers.
As discussed in the Issue #18581 the Option would be to enable full context mode:
- this is then also disabling RAG + Hybrid Search (reranking)
If you upload a single document in the chat, it still showes that focused retrieval mode is active (maybe a bug)
It does the "Retrieval Query Generation" still, but actually it pass the full document context to the LLM.
Just checked the LiteLLM Logs. Showed me 65K tokens on the request. That is what we want, nice!
BUT..... for Knowledge Collection this is causing a retrieval of ALL Documents from the Collection.

This is somehow expected as the RAG + Hybrid Search is disabled too.
So the "enable full context mode" does actually work for Document upload (only shows wrong if you click onto the file)
But i cannot activate it, as it would cause RAG for Knowledge Collections to not work anymore.
Desired Solution you'd like
So, having an option to set that individually for file uploads and knowledge collections would be a feature i would desire a lot.
Thx, best regards, Robert
Alternatives Considered
We could also discuss if disabling RAG on Knowledge Collections makes sense at all (maybe made sense some early versions) ?
Cannot imagine using Knowledge collections with passing all documents to the LLM makes any sense to anyone.
So maybe it would be wise to rename the Option from "full context mode" to "full context mode for uploaded files" and only apply that to the file upload retrieval without touching the RAG + Hybrid Search Options for Knowledge Collections.
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions