mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[PR #11876] [MERGED] Fix: wrong citation order for chromadb, wrong order for hybrid search #9608
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/11876
Author: @mahenning
Created: 3/19/2025
Status: ✅ Merged
Merged: 3/21/2025
Merged by: @tjbck
Base:
dev← Head:fix--rag-sorting📝 Commits (1)
ec8fc72Fix wrong order for chromadb📊 Changes
1 file changed (+20 additions, -11 deletions)
View changed files
📝
backend/open_webui/retrieval/utils.py(+20 -11)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
This PR fixes multiple embedding distance related issues with chromadb.
Fixed
Additional Information
reverseparameter inmerge_and_sort_query_resultswhen chromadb is used. But the results of the hybrid search uses scores of the reranker, which are already correctly ordered (0 is worst, 1 is best). This led to picking the k worst results instead of the best ones.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.