OpenAI’s New Web Search Capabilities for Chat Completions
A new action called ‘create chat completions by web search’ has been added to OpenAI’s suite of tools, enabling users to leverage web scraping capabilities directly through an API endpoint. This functionality can be accessed by navigating to an action block, selecting ‘add item’, ‘integrations’, and then choosing ‘OpenAI’, where you’ll find the ‘create chat completion by web search’ option.
This feature allows for targeted web searches that can be configured in several ways. Users can either define specific websites for OpenAI to search or allow it to perform a free web search across the internet. The search results are then processed and returned as an AI-generated response.
Setting Up Web Search Parameters
When configuring this action, users can set various parameters to refine the search:
- System message – provides context and instructions for the AI
- Remembrance – toggle context awareness
- Model selection – defaults to GPT-4o mini search preview if left blank
- Web search context size – controls how much information is retrieved
- Location parameters – country (using ISO codes), region, and city
- Time zone settings – for location-specific searches
- Citation options – can be included or removed
- Token limits – similar to regular completions
Practical Application for Business Data
One powerful application demonstrated is the ability to restrict searches to a specific knowledge base or website. In the example shown, OpenAI was instructed to only search a particular knowledge base for answers, with explicit instructions to only use information found on that website and not reference any other sources.
When tested with the question “Do you have WhatsApp bots?”, the system quickly returned relevant information found on the specified website, confirming WhatsApp bot integration capabilities through providers like Metacloud API, Commbot 360 dialog, and Twilio. The response included the source URL with a search UTM parameter.
A second test query about ticket features also successfully retrieved information exclusively from the target knowledge base, as evidenced by the “UKB” (knowledge base) references in the returned sources.
Benefits for Businesses
This functionality provides a streamlined way for businesses to create AI assistants that can search through their own documentation or websites to provide accurate, up-to-date information to users. By limiting the search scope to authorized business data, companies can ensure that responses remain on-brand and factually correct according to their own documentation.
The tool works equally well for searching through general websites, as long as appropriate parameters are defined in the system message to guide the search process.