capabilities.work

Web Search Grounded Answer

A 3-step recipe with ChatGPT. We can help you get access.

Recipe · 3 steps

Web Search Grounded Answer

with ChatGPT · Artificial Intelligence Management

Generate a web-search-grounded answer and surface its citations.

  1. Create a stored response with the built-in web_search_preview tool so the model can ground its answer in live search results.
  2. Poll the response while it is still generating, looping until it leaves the in_progress status.
  3. Retrieve the completed response with web search results included to pull the answer text and the first URL citation annotation.
What you'll need to have ready
  • apiKey: OpenAI API key used as the Bearer credential.
  • model: Model ID used to generate the response (e.g. gpt-4o).
  • question: The current-events question to answer.
For your developer

Arazzo workflow chatgpt:web-search-answer, 3 operations: createResponse → getResponse → getResponse. Specs on APIs.io.