[GH-ISSUE #10979] Knowledge correct, Source ID wrong, Reference ID correct #31628

Closed
opened 2026-04-25 05:32:41 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @apunkt on GitHub (Feb 28, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/10979

Installation Method

pip v24.0, python 3.12

Environment

  • Open WebUI Version: [v0.5.18]

  • Ollama (if applicable): [v0.5.7]

  • Operating System: [Ubuntu 24.04]

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

The model is using knowledge from RAG and references this knowledge correctly.

Actual Behavior:

Model is using knowledge correctly, then uses a source id = 1 to reference the knowledge, the filename for this reference is however the filename of the referenced file = 2

Description

Inspecting the answer of the model the information is to be confirmed from source id = 1
Reference id = 1 is the correct file name right under the answer in the UI.
The model uses [1] in the answer, which the UI translates to the filename that is shown as reference id = 2 under the answer. Looking into the json conversation protocol the sources start with 0.
But lables start with 1.

Bug Summary:
I assume that this is an indexing issue.

pseudo

Modelanswer containing information from file 'DATA' using source id [1], but UI shows reference file [2]

References from: 1DATA 2NODATA

/pseudo

conversation.json shows that reference id 1 == source id 0, reference id 2 == source id 1

Reproduction Details

Steps to Reproduce:
Use a model with citation capabilities.
Use a knowledge in combination with the model.
Use 2 files with contrary information, ask about details of 1 file.
Confirm the model answer is from file 1, check sources and references

Logs and Screenshots

Image

Data is from reference 1, but UI shows reference 2 although using source id 1, but reference id 1 == source id = 0

Originally created by @apunkt on GitHub (Feb 28, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/10979 ## Installation Method pip v24.0, python 3.12 ## Environment - **Open WebUI Version:** [v0.5.18] - **Ollama (if applicable):** [v0.5.7] - **Operating System:** [Ubuntu 24.04] **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [ ] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: The model is using knowledge from RAG and references this knowledge correctly. ## Actual Behavior: Model is using knowledge correctly, then uses a source id = 1 to reference the knowledge, the filename for this reference is however the filename of the referenced file = 2 ## Description Inspecting the answer of the model the information is to be confirmed from source id = 1 Reference id = 1 is the correct file name right under the answer in the UI. The model uses [1] in the answer, which the UI translates to the filename that is shown as reference id = 2 under the answer. Looking into the json conversation protocol the sources start with 0. But lables start with 1. **Bug Summary:** I assume that this is an indexing issue. pseudo Modelanswer containing information from file 'DATA' using source id [1], but UI shows reference file [2] References from: 1DATA 2NODATA /pseudo conversation.json shows that reference id 1 == source id 0, reference id 2 == source id 1 ## Reproduction Details **Steps to Reproduce:** Use a model with citation capabilities. Use a knowledge in combination with the model. Use 2 files with contrary information, ask about details of 1 file. Confirm the model answer is from file 1, check sources and references ## Logs and Screenshots ![Image](https://github.com/user-attachments/assets/b0e40356-2f91-4d6f-aa4d-a275b44aaf0a) Data is from reference 1, but UI shows reference 2 although using source id 1, but reference id 1 == source id = 0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#31628