mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-17 03:03:27 -06:00
[PR #14106] [CLOSED] feat: Show generated sub-queries along sources in citation for RAG and web-search #39020
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/14106
Author: @diwakar-s-maurya
Created: 5/20/2025
Status: ❌ Closed
Base:
dev← Head:patch-4📝 Commits (1)
0aba8f2Show generated sub-queries along sources in citation for RAG.📊 Changes
2 files changed (+79 additions, -2 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+47 -2)📝
src/lib/components/chat/Messages/CitationsModal.svelte(+32 -0)📄 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
At present, when user asks a question against a knowledge collection, QUERY_GENERATION_PROMPT_TEMPLATE may be used to break down the question and then search in the collection. The user cannot see what queries were made to the knowledge base. This makes it difficult to understand why a source was fetched, cannot know what/how many queries the original question was broken into, cannot see impact of template change on queries easily.
Showing the actual queries sent to knowledge collection will help solve these.
The change made in PR works for web-search too.
Added
It shows users what queries were actually sent to database for RAG. It is solves the problems mentioned above, makes the system "look smart" and improves transparency with the user.
Screenshots or Videos
Query: Does jupiter has highest no of moons?

Citation:
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.