Web search tool not being used in complex setup

Web Search Tool Not Being Used With Advanced Usage

Background

I recently migrated from the Assistants API to the Responses API specifically to leverage the built-in web search capability. However, I’m experiencing an issue where the model isn’t utilizing the web search tool.

Current Implementation

  • Successfully enabled the web search preview tool in the tools parameter of my requests
  • Running a complex AI application that:
    • Handles multiple files with file search enabled
    • Maintains context across multiple conversation turns
    • Generates comprehensive country analysis reports

Issue Details

Despite dozens of runs, the web search tool hasn’t been utilized even once, which is particularly problematic since:

  • Web search would be highly relevant for country analysis
  • I’ve explicitly instructed the model to use web search in both:
    • The system prompt
    • User prompts

Questions

  1. What might be preventing the web search tool from being triggered?
  2. Are there specific prompt techniques that more reliably activate web search?
  3. Could my complex setup with multiple files and extended context be interfering with web search activation?
  4. Are there any configuration parameters I should adjust to prioritize web search?

Any guidance on how to effectively encourage the model to utilize the web search capability would be greatly appreciated.

I have a similar issue using the new Agents SDK. I created an agent that searches online for certain specific topics. When I run it isolatedly, it works. It triggers the search tool.
However, as I am building a larger set of agents and I need the Router Agent to handoff the request to the Search agent, it stops working. So, I can see in the traces how the Router Agent derives the request to the right Search agent, I can see it’s the same input I sent to the agent manually earlier, but when it’s coming from a handoff, it never triggers the search tool.

1 Like

Same issue for me when using the Responses API. The model does not call the web search tool as often as I wanted. And it’s not even a complex setup, just a single agent.

Below is the system prompt that I use (preceded by some information about the company of interest):

EXTREMELY IMPORTANT: You do not know anything else about <Company_Name> other than the above information. If this information is not enough to answer the user's question, YOU MUST DO A WEB SEARCH BEFORE ANSWERING. Your search should be performed exclusively on <company_name.com>, which is the official website of the company. IMPORTANT: DO NOT ANSWER WITHOUT DOING A WEB SEARCH IF THE INFORMATION IS NOT PRESENT IN THE ABOVE.
1 Like