Bug Report
Installation Method
Docker, via docker compose.
Environment
-
Open WebUI Version: v0.5.16
-
Ollama (if applicable): N/A
-
Operating System: Ubuntu 22.04
-
Browser (if applicable): Firefox 125.0.3
Confirmation:
Expected Behavior:
When using RAG with Focused Retrieval enabled (Full Context Mode disabled), the context should be populated with relevant information extracted from the uploaded document, even if the document is small. The LLM should be able to answer at least specific questions based on this context.
Actual Behavior:
When using RAG with Focused Retrieval enabled, the context is often empty, even with very small documents. The LLM reports that the context is empty and cannot answer questions related to the document's content. Disabling Focused Retrieval (enabling Full Context Mode) resolves the issue, and the context is correctly populated. In both cases, nevertheless, the vector db (prismas, milvus, pgvector...) is correctly populated with embeddings.
Description
Bug Summary:
RAG with Focused Retrieval often results in an empty context, preventing the LLM from answering questions about uploaded documents, even minimal ones. Disabling Focused Retrieval fixes the problem.
Reproduction Details
Steps to Reproduce:
- Start a new chat in OpenWebUI.
- Ensure "Full Context Mode" is disabled in Settings (or that "Focused Retrieval" is enabled in the right pane. This is the default setting (unfortunately).
- Upload a small document (e.g., a simple text file with a few sentences, a small PDF, or a minimal DOCX/XLSX). I used a TXT file containing only "This is a test document for RAG dated 2025-02-25."
- Select any LLM.
- Ask the LLM a question about the document's content, such as "What is in the context?" or "What does the document say?", "Are there dates in the context?".
- Observe that the LLM responds that the context is empty.
- Go to Settings and enable "Full Context Mode" (or disable "Focused Retrieval" in the RAG section).
- Repeat steps 5 and 6. Observe that the LLM now correctly answers based on the document's content.
Logs and Screenshots
Browser Console Logs:
(No relevant errors in the browser console.)
Docker Container Logs:
(No relevant errors in the Docker container logs related to RAG processing. Happy to provide full logs if needed, but they are quite verbose.)
Screenshots/Screen Recordings (if applicable):
I can provide screenshots if necessary, but the steps above are very straightforward to reproduce. The key visual difference is the LLM's response indicating an empty context vs. a response based on the document.
Additional Information
This issue seems to be related to how Focused Retrieval processes and selects relevant chunks from the document. Maybe the "Full Context Mode" bypasses this chunk selection and provides the entire processed document to the LLM, which explains why it works correctly. The issue is consistent across different LLMs and document types (txt, pdf, docx, xlsx). I would like to know better how Focused Retrieval is supposed to work.
Bug Report
Installation Method
Docker, via docker compose.
Environment
Open WebUI Version: v0.5.16
Ollama (if applicable): N/A
Operating System: Ubuntu 22.04
Browser (if applicable): Firefox 125.0.3
Confirmation:
Expected Behavior:
When using RAG with Focused Retrieval enabled (Full Context Mode disabled), the context should be populated with relevant information extracted from the uploaded document, even if the document is small. The LLM should be able to answer at least specific questions based on this context.
Actual Behavior:
When using RAG with Focused Retrieval enabled, the context is often empty, even with very small documents. The LLM reports that the context is empty and cannot answer questions related to the document's content. Disabling Focused Retrieval (enabling Full Context Mode) resolves the issue, and the context is correctly populated. In both cases, nevertheless, the vector db (prismas, milvus, pgvector...) is correctly populated with embeddings.
Description
Bug Summary:
RAG with Focused Retrieval often results in an empty context, preventing the LLM from answering questions about uploaded documents, even minimal ones. Disabling Focused Retrieval fixes the problem.
Reproduction Details
Steps to Reproduce:
Logs and Screenshots
Browser Console Logs:
(No relevant errors in the browser console.)
Docker Container Logs:
(No relevant errors in the Docker container logs related to RAG processing. Happy to provide full logs if needed, but they are quite verbose.)
Screenshots/Screen Recordings (if applicable):
I can provide screenshots if necessary, but the steps above are very straightforward to reproduce. The key visual difference is the LLM's response indicating an empty context vs. a response based on the document.
Additional Information
This issue seems to be related to how Focused Retrieval processes and selects relevant chunks from the document. Maybe the "Full Context Mode" bypasses this chunk selection and provides the entire processed document to the LLM, which explains why it works correctly. The issue is consistent across different LLMs and document types (txt, pdf, docx, xlsx). I would like to know better how Focused Retrieval is supposed to work.