Files
open-webui/backend
Classic298andGitHub 35d946f276 fix: external knowledge bases only use the first generated search query (#33704)
With Retrieval Query Generation on, an external knowledge base (Qdrant, Milvus or pgvector) ran one search per generated query, one after another, and then kept only the results of the first query. The other searches cost time and added nothing to the answer. The searches now run at the same time and their results are merged by position (the top result of each query, then the second of each, and so on) with duplicates dropped, so every generated query contributes. Results are merged by position because scores cannot be compared the same way across vector databases: for some a higher score is better, for others a lower one.

| 3 queries, simulated search taking 0.3 s | before | after |
| --- | --- | --- |
| time | 0.9 s | 0.3 s |
| results used | first query only | all three queries |

Fixes #33184
2026-11-04 06:50:47 +09:00
..
…
…
2026-11-02 08:48:51 +09:00