Originally created by @clang88 on GitHub (Nov 13, 2024).
Bug Report
Installation Method
Docker via ghcr.io/open-webui/open-webui:main
Environment
Open WebUI Version: 0.3.35
Operating System: Ubuntu 22.04
Browser (if applicable): Chrome 130
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:
Percentage score for relevance should be high, if semantic distance is low (score is close to 1). Percentage score for relevance is low, if semantic distance is high (score is close to 0).
Actual Behavior:
Highly relevant chunks are marked as "low relevance" with a low percentage score (also colored in red), wheras irelvant chunks are marked with a high percentage score (green).
Description
Bug Summary:
Relevance percentage score is misleading, because irrelevant chunks have high percentage and highly relevant scores have low percentage.
Reproduction Details
Steps to Reproduce:
Upload a document or select a knowledge collection
Ask model a question that can be answered with knowledge from document
Check citations to see that percentage is the wrong way around.
Logs and Screenshots
Screenshots/Screen Recordings (if applicable):
Highly relevant chunk (answers exactly the question "How to create an entry in Kalcium Quickterm":
Irrelevant chunk (just a table of contents):
Additional Information
The issue is likely in this piece of code:
src/lib/components/chat/Messages/CitationsModal.svelte
function calculatePercentage(distance: number) {
if (distance < 0) return 100;
if (distance > 1) return 0;
return Math.round((1 - distance) * 10000) / 100;
}
It should be like this:
function calculatePercentage(distance: number) {
if (distance < 0) return 0;
if (distance > 1) return 100;
return Math.round(distance * 10000) / 100;
}
Originally created by @clang88 on GitHub (Nov 13, 2024).
# Bug Report
## Installation Method
Docker via ghcr.io/open-webui/open-webui:main
## Environment
- **Open WebUI Version:** 0.3.35
- **Operating System:** Ubuntu 22.04
- **Browser (if applicable):** Chrome 130
**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.
- [x] I have included the browser console logs.
- [x] 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:
Percentage score for relevance should be high, if semantic distance is low (score is close to 1). Percentage score for relevance is low, if semantic distance is high (score is close to 0).
## Actual Behavior:
Highly relevant chunks are marked as "low relevance" with a low percentage score (also colored in red), wheras irelvant chunks are marked with a high percentage score (green).
## Description
**Bug Summary:**
Relevance percentage score is misleading, because irrelevant chunks have high percentage and highly relevant scores have low percentage.
## Reproduction Details
**Steps to Reproduce:**
1) Upload a document or select a knowledge collection
2) Ask model a question that can be answered with knowledge from document
3) Check citations to see that percentage is the wrong way around.
## Logs and Screenshots
**Screenshots/Screen Recordings (if applicable):**
Highly relevant chunk (answers exactly the question "How to create an entry in Kalcium Quickterm":

Irrelevant chunk (just a table of contents):

## Additional Information
The issue is likely in this piece of code:
src/lib/components/chat/Messages/CitationsModal.svelte
```
function calculatePercentage(distance: number) {
if (distance < 0) return 100;
if (distance > 1) return 0;
return Math.round((1 - distance) * 10000) / 100;
}
```
It should be like this:
```
function calculatePercentage(distance: number) {
if (distance < 0) return 0;
if (distance > 1) return 100;
return Math.round(distance * 10000) / 100;
}
```
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 @clang88 on GitHub (Nov 13, 2024).
Bug Report
Installation Method
Docker via ghcr.io/open-webui/open-webui:main
Environment
Open WebUI Version: 0.3.35
Operating System: Ubuntu 22.04
Browser (if applicable): Chrome 130
Confirmation:
Expected Behavior:
Percentage score for relevance should be high, if semantic distance is low (score is close to 1). Percentage score for relevance is low, if semantic distance is high (score is close to 0).
Actual Behavior:
Highly relevant chunks are marked as "low relevance" with a low percentage score (also colored in red), wheras irelvant chunks are marked with a high percentage score (green).
Description
Bug Summary:
Relevance percentage score is misleading, because irrelevant chunks have high percentage and highly relevant scores have low percentage.
Reproduction Details
Steps to Reproduce:
Logs and Screenshots
Screenshots/Screen Recordings (if applicable):


Highly relevant chunk (answers exactly the question "How to create an entry in Kalcium Quickterm":
Irrelevant chunk (just a table of contents):
Additional Information
The issue is likely in this piece of code:
src/lib/components/chat/Messages/CitationsModal.svelte
It should be like this: