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
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

Data is from reference 1, but UI shows reference 2 although using source id 1, but reference id 1 == source id = 0
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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:
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
Data is from reference 1, but UI shows reference 2 although using source id 1, but reference id 1 == source id = 0