Suggestion Regarding Document Retrieval in OpenWebUI #2256

Closed
opened 2025-11-11 15:03:27 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @BennisonDevadoss on GitHub (Oct 1, 2024).

I've been using OpenWebUI recently and encountered something that might be a bug, though I’m not entirely sure. Here's the situation:

When I upload multiple documents, the RAG (Retrieval-Augmented Generation) system retrieves the top 5 chunks from each document for answering queries. This raises a concern: since I’m uploading multiple documents, the combined context length increases significantly. While I can extend the context length to a certain limit, it's not infinite, meaning the model cannot fully understand the entire context.

Additionally, this seems to affect the accuracy of the citations. The chunks retrieved across all uploaded documents don’t always align closely with the user's query, making the citations less accurate in the WebUI interface.

To address this, I suggest that instead of creating separate collections for each uploaded document, all documents could be stored in a single collection. This way, when querying, the retrieval would occur against that single collection, returning a maximum of 5 chunks. This approach would better manage context length and improve citation accuracy.

What do you all think? Is this an actual issue, or am I missing something?

Originally created by @BennisonDevadoss on GitHub (Oct 1, 2024). I've been using OpenWebUI recently and encountered something that might be a bug, though I’m not entirely sure. Here's the situation: When I upload multiple documents, the RAG (Retrieval-Augmented Generation) system retrieves the top 5 chunks from each document for answering queries. This raises a concern: since I’m uploading multiple documents, the combined context length increases significantly. While I can extend the context length to a certain limit, it's not infinite, meaning the model cannot fully understand the entire context. Additionally, this seems to affect the accuracy of the citations. The chunks retrieved across all uploaded documents don’t always align closely with the user's query, making the citations less accurate in the WebUI interface. To address this, I suggest that instead of creating separate collections for each uploaded document, all documents could be stored in a single collection. This way, when querying, the retrieval would occur against that single collection, returning a maximum of 5 chunks. This approach would better manage context length and improve citation accuracy. What do you all think? Is this an actual issue, or am I missing something?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#2256