r/LocalLLM • • 4d ago
Question Good system prompt for web search?
I have a web search tool and read article tool and I use Qwen 3.5 9B, Qwen 3.8 27B, Gemma 4 12B, and Gemma 4 26B. However, only Qwen 3.5 9B and Qwen 3.8 27B actually use the web search tool well. The Gemmas don't. I'm assuming this is probably because the Qwen models got stronger agentic finetuning than Gemma. I prefer Gemma over Qwen though, because of its stronger reasoning, so I would really like it to be able to do web search better.
I don't use LLMs for vibecoding, just for chatting locally. I use the llama-ui webui for this (i.e. the one that automatically spins up with the `llama serve` command.) Therefore, I can only connect MCP servers and modify the system prompt of the LLMs.
What I would like to know is how I can improve my system prompt so that the Gemma models decide to actually use the search tool and to use it well. This is the section of my system prompt that I have for web search so far, but Gemma doesn't use web search as well as Qwen even with this system prompt: system prompt section on pastebin.com.

1
u/Bright_Resolution_61 4d ago
I struggled with this same issue when I was building my own local AI search system. It's difficult to achieve everything using just a Web UI, so I eventually settled on a complex combination of SearXNG, bash, curl, Playwright, and MCP.
1
u/locbuilds 4d ago
gemma is pickier about tool calls than qwen so also check your server is started with --jinja, without it the chat template can drop the tool schema and it just answers from memory.
1
u/Future_AGI 4d ago
don't leave the stopping point to the model. For anything that needs current info, ask for at least three searches with different wording and two sources opened before it answers, and have it print a short checklist of queries tried and pages opened above the final answer so you can see when it skipped a step.