Web search prompt doesn't used, and noisy RAG #1246

Closed
opened 2025-11-11 14:41:03 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @Fusseldieb on GitHub (Jun 13, 2024).

Bug Report

Description

Bug Summary:
When using the web search capability, it seemingly skips the web search prompt and simply uses the original question prompt.
Eg. if I ask "Make a Google search to tell me who's Fusseldieb", it just skips to "Searching 'Make a Google search to tell me who's Fusseldieb'...
When looking at the logs, it really does search for the whole original prompt. Seems like the prompt to transform the query into a Google search doesn't get executed, or ignored.


Also, when searching on the web, when it reads individual searches, it doesn't trim the output, which makes it very noisy, and uses A LOT of useless tokens.
See below.

Steps to Reproduce:

  • Enable the web search capability within the "+" icon.
  • Ask anything

Expected Behavior:

  • Pass through the query transformation prompt

Actual Behavior:

  • It searches the exact prompt

Environment

  • Open WebUI Version: 0.3.4

  • Operating System: Debian GNU/Linux 11 (bullseye)

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Logs and Screenshots

Docker Container Logs:

INFO:root:trying to web search with ('duckduckgo', 'Search the exact term "Fusseldieb" for me')
[SearchResult(...

Screenshots (if applicable):
image


image

Installation Method

Docker

Additional Information

Suggestion: I think this would ideally be a pipeline, not a built-in function.

Originally created by @Fusseldieb on GitHub (Jun 13, 2024). # Bug Report ## Description **Bug Summary:** When using the web search capability, it seemingly skips the web search prompt and simply uses the original question prompt. Eg. if I ask "Make a Google search to tell me who's Fusseldieb", it just skips to `"Searching 'Make a Google search to tell me who's Fusseldieb'...` When looking at the logs, it really does search for the whole original prompt. Seems like the prompt to transform the query into a Google search doesn't get executed, or ignored. --- Also, when searching on the web, when it reads individual searches, it doesn't trim the output, which makes it very noisy, and uses A LOT of useless tokens. See below. **Steps to Reproduce:** - Enable the web search capability within the "+" icon. - Ask anything **Expected Behavior:** - Pass through the query transformation prompt **Actual Behavior:** - It searches the exact prompt ## Environment - **Open WebUI Version:** 0.3.4 - **Operating System:** Debian GNU/Linux 11 (bullseye) ## Reproduction Details **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. ## Logs and Screenshots **Docker Container Logs:** ``` INFO:root:trying to web search with ('duckduckgo', 'Search the exact term "Fusseldieb" for me') [SearchResult(... ``` **Screenshots (if applicable):** ![image](https://github.com/open-webui/open-webui/assets/4715129/9d3dadcb-b9ef-4bab-a02f-1b770978db57) --- ![image](https://github.com/open-webui/open-webui/assets/4715129/08a22962-149c-4549-a3e2-be8dbf5a1749) ## Installation Method Docker ## Additional Information Suggestion: I think this would ideally be a pipeline, not a built-in function.
Author
Owner

@justinh-rahb commented on GitHub (Jun 13, 2024):

@AeneasZhu that is unrelated to this issue.

@justinh-rahb commented on GitHub (Jun 13, 2024): @AeneasZhu that is unrelated to this issue.
Author
Owner

@tjbck commented on GitHub (Jun 13, 2024):

You can change the prompt length threshold from admin settings!

@tjbck commented on GitHub (Jun 13, 2024): You can change the prompt length threshold from admin settings!
Author
Owner

@Fusseldieb commented on GitHub (Jun 13, 2024):

@tjbck Thanks for answering, however that doesn't quite address the issues.

The bug in which it skips through the query prompt is, well, a bug.

And while the prompt length threshold can indeed be adjusted, the issue is that it doesn't "clean up" endless ("\n", newlines) which may come from web searches. This is less important, but I still think it's worth mentioning, as both are related to the web search feature.

I think this issue should only be closed if at least the bug is solved.

@Fusseldieb commented on GitHub (Jun 13, 2024): @tjbck Thanks for answering, however that doesn't quite address the issues. The bug in which it skips through the query prompt is, well, a bug. And while the prompt length threshold can indeed be adjusted, the issue is that it doesn't "clean up" endless ("\n", newlines) which may come from web searches. This is less important, but I still think it's worth mentioning, as both are related to the web search feature. I think this issue should only be closed if at least the _bug_ is solved.
Author
Owner

@EFLKumo commented on GitHub (Jun 16, 2024):

The length threshold means that when your prompt word exceeds the threshold before a web search keyword is generated with the LLM instead of using your request directly, so if you want to generate web search keywords by LLM every time, you should set the threshold to 0.

@EFLKumo commented on GitHub (Jun 16, 2024): The length threshold means that when your prompt word **exceeds** the threshold before a web search keyword is generated with the LLM instead of using your request directly, so if you want to generate web search keywords by LLM every time, you should set the threshold to `0`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#1246