mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #14175] [CLOSED] feat: show generated sub-queries along sources in citation for RAG and web-search #23407
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/14175
Author: @diwakar-s-maurya
Created: 5/22/2025
Status: ❌ Closed
Base:
dev← Head:patch-4📝 Commits (1)
65d9cd5feat: show generated sub-queries along sources in citation for RAG and web-search📊 Changes
5 files changed (+146 additions, -27 deletions)
View changed files
📝
backend/open_webui/config.py(+30 -0)📝
backend/open_webui/main.py(+2 -0)📝
backend/open_webui/routers/tasks.py(+18 -4)📝
backend/open_webui/utils/middleware.py(+52 -23)📝
src/lib/components/chat/Messages/CitationsModal.svelte(+44 -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 or with web-search tool, QUERY_GENERATION_PROMPT_TEMPLATE may be used to break down the question and then search in the collection or the web. The user is unable to see what queries were made. 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 will help solve these.
This PR shows users what queries were actually sent to database for RAG and web-search. It is solves the problems mentioned above.
Added
Screenshots or Videos
Example 1: Search against knowledge collection

Query: Does jupiter has highest no of moons?
Citation:
Example 2: Web search

Query: What is temperature and humidity in Delhi today?
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.