issue: Model does not generate an answer after web search (shows raw <context> instead) #6790

Closed
opened 2025-11-11 17:05:51 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @gamersalpha on GitHub (Oct 28, 2025).

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

0.6.34

Ollama Version (if applicable)

0.12.6

Operating System

Debian 13

Browser (if applicable)

brave

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

The model should generate a normal answer using the retrieved web search context (RAG), for example: summarize the information found about the user question.
After the web search runs, I expect the assistant to reply in natural language.

Actual Behavior

The model does not generate an answer.
Instead, it only outputs the injected RAG context as raw XML-like text, for example:

<context>
<source id="1" name="Ariana Grande album">Ariana Grande Albums and Discography</source>
<source id="2" name="Ariana Grande album">Ariana Grande discography - Wikipedia</source>
</context>

<user_query>
Tell me what you can find about Ariana Grande’s latest album using web search.
</user_query>

No final answer is produced.

Steps to Reproduce

I am running Docker containers for:

open-webui (image: ghcr.io/open-webui/open-webui:main)

ollama (accessible at http://ollama:11434)

searxng (accessible at http://searxng:8080)
All services are on the same Docker network.

Environment variables for open-webui include:

ENABLE_RAG_WEB_SEARCH: True
RAG_WEB_SEARCH_ENGINE: "searxng"
SEARXNG_QUERY_URL: "http://searxng:8080/search?q=<query>&format=json"
ENABLE_OLLAMA: True
OLLAMA_API_BASE_URL: "http://ollama:11434"
DEFAULT_MODEL: "gemma3:270m"

In the UI, I select the model gemma3:270m from Ollama.

I ask a question that triggers web search, for example:

"Tell me what you can find about Ariana Grande’s latest album using web search."

Open WebUI successfully performs a web search through SearxNG.

I can see “Sources récupérées: 2”.

The logs show that documents were fetched, embedded, and added to a vector DB.

After that, instead of a summarized answer, the chat response from the model only prints the / / <user_query> block, and stops.

There is no actual generated answer.

Logs & Screenshots

Image

Additional Information

Web search itself is working:
calling http://searxng:8080/search?q=test&format=json from inside the open-webui container returns valid JSON.

Retrieval/embedding also works: vectors are created and stored.

The only missing piece is generation: the model never turns the context into an answer.

Question:
Is this expected with small Ollama models (like gemma3:270m)?

Originally created by @gamersalpha on GitHub (Oct 28, 2025). ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version 0.6.34 ### Ollama Version (if applicable) 0.12.6 ### Operating System Debian 13 ### Browser (if applicable) brave ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using 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. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior The model should generate a normal answer using the retrieved web search context (RAG), for example: summarize the information found about the user question. After the web search runs, I expect the assistant to reply in natural language. ### Actual Behavior The model does not generate an answer. Instead, it only outputs the injected RAG context as raw XML-like text, for example: ``` <context> <source id="1" name="Ariana Grande album">Ariana Grande Albums and Discography</source> <source id="2" name="Ariana Grande album">Ariana Grande discography - Wikipedia</source> </context> <user_query> Tell me what you can find about Ariana Grande’s latest album using web search. </user_query> ``` No final answer is produced. ### Steps to Reproduce I am running Docker containers for: open-webui (image: ghcr.io/open-webui/open-webui:main) ollama (accessible at http://ollama:11434) searxng (accessible at http://searxng:8080) All services are on the same Docker network. Environment variables for open-webui include: ``` ENABLE_RAG_WEB_SEARCH: True RAG_WEB_SEARCH_ENGINE: "searxng" SEARXNG_QUERY_URL: "http://searxng:8080/search?q=<query>&format=json" ENABLE_OLLAMA: True OLLAMA_API_BASE_URL: "http://ollama:11434" DEFAULT_MODEL: "gemma3:270m" ``` In the UI, I select the model gemma3:270m from Ollama. I ask a question that triggers web search, for example: "Tell me what you can find about Ariana Grande’s latest album using web search." Open WebUI successfully performs a web search through SearxNG. I can see “Sources récupérées: 2”. The logs show that documents were fetched, embedded, and added to a vector DB. After that, instead of a summarized answer, the chat response from the model only prints the <context> / <source> / <user_query> block, and stops. There is no actual generated answer. ### Logs & Screenshots <img width="1331" height="418" alt="Image" src="https://github.com/user-attachments/assets/941b9fe6-1b25-4bb4-a482-c8e8da2d0c35" /> ### Additional Information Web search itself is working: calling http://searxng:8080/search?q=test&format=json from inside the open-webui container returns valid JSON. Retrieval/embedding also works: vectors are created and stored. The only missing piece is generation: the model never turns the context into an answer. Question: Is this expected with small Ollama models (like gemma3:270m)?
GiteaMirror added the bug label 2025-11-11 17:05:51 -06:00
Author
Owner

@gamersalpha commented on GitHub (Oct 28, 2025):

OK i try with a model and works

Image
@gamersalpha commented on GitHub (Oct 28, 2025): OK i try with a model and works <img width="1111" height="345" alt="Image" src="https://github.com/user-attachments/assets/7e4ca25c-e3ab-4511-b932-34c5ab9728fd" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#6790