mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #10979] Knowledge correct, Source ID wrong, Reference ID correct #16099
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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