mirror of
https://github.com/open-webui/open-webui.git
synced 2026-06-05 16:28:32 -05:00
[PR #17049] [MERGED] FIX: Hybrid Search #24305
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/17049
Author: @rgaricano
Created: 8/29/2025
Status: ✅ Merged
Merged: 8/31/2025
Merged by: @tjbck
Base:
dev← Head:dev-FIX_lex-sem📝 Commits (2)
292cb62FIX: Hybrid Search lexical-semantic tags647e38fRevert bypass hybrid search when BM25_weight=0📊 Changes
2 files changed (+4 additions, -9 deletions)
View changed files
📝
backend/open_webui/retrieval/utils.py(+2 -7)📝
src/lib/components/admin/Settings/Documents.svelte(+2 -2)📄 Description
FIX Error in Hybrid Search
Fix 2 errors in hibryd Search:
lexical-semantic terms are inverted
BM25 weight=1 --> lexical
BM25 weight=0 --> semantic
Errors when Hybrid Search when bm25_weight=0.
As noted in https://github.com/open-webui/open-webui/issues/17046 & https://github.com/open-webui/open-webui/discussions/16957 errors arise in this condition due to return empty list instead of fetching the actual collection data.
I opted for revert the bypass when bm25_weight=0 done in PR https://github.com/open-webui/open-webui/commit/74b1c801 because this proposal sought to save calls if bm25 weight=0, which makes sense, since that setting practically implies the same thing as disabling hybrid search.
However, it was not considered that running hybrid search with bm25 weight=0 can also be used to perform a new reranking with different cutoff values (both in terms of the number of results and the relevance threshold).
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.