Try Pro free

Latent Space · 6 min · Mar 11, 2025

Web search combines retrieval with factual answers and citations

The guests describe search as both a Responses tool and a fine-tuned model for Chat Completions, built to retrieve information and cite it accurately.

The episode’s best minutes

Full analysis
  1. 2:18Responses API unifies agent workflows without replacing Chat Completions5 min
  2. 8:17Web search combines retrieval with factual answers and citationsPro pick 6 min
  3. 21:19The Agents SDK adds guardrails, tracing, and provider flexibility4 min
  4. 2 more moments in the full episode
“can it remain factual? Can it answer questions based on what it retrieves? And can it cite it accurately?”
Nikunj Handaat 9:21 · Latent Space
9:21

Takeaways Pro pick

  1. Search is available as a tool or a fine-tuned model.
  2. The model is optimized to answer from retrieved information and cite it.
  3. Search depth and context budgets affect cost and coverage.

About this segment

The guests describe search as both a Responses tool and a fine-tuned model for Chat Completions, built to retrieve information and cite it accurately. They discuss configurable search depth and the tradeoff between coverage and cost.

Nikunj Handa

Head of Product, API, OpenAI

Leads product for OpenAI's API, including the Decisions API that cut response times to 100–180 milliseconds.

  • Shawn Wang (swyx), Host · Co-founder, AI Engineer

    Wrote “The Rise of the AI Engineer” and founded Smol AI, maker of AI News.

  • Alessio Fanelli, Host · Founder, Kernel Labs

    Partner at Decibel, backing technical founders who build developer tools.

From “The new OpenAI Agents Platform: CUA, Web Search, Responses API, Agents SDK!!”, Mar 11, 2025. Watch the full episode

Transcript

Transcribed by machine (Whisper) from the episode’s audio, so a word may be off here and there.

  1. 8:30

    So, firstly, we're launching web search in two ways. One, in Responses API, which is our API for tools, it's going to be available as a web search tool itself. So you'll be able to go tools, turn on web search, and you're ready to go. We still wanted to give chat completions people access to real-time information. So in that chat completions API, which does not support built-in tools, we're launching the direct access to the fine-tuned model that ChatGPT for Search uses, and we call it GPT-40 Search Preview.

  2. 9:01

    And how is this model built? Basically, our search research team has been working on this for a while. Their main goal is to get information, get a bunch of information from all of our data sources that we use to gather information for search and then pick the right things and then cite them as accurately as possible. And that's what the search team has really focused on. They've done some pretty cool stuff.

  3. 9:25

    They use synthetic data techniques. They've done O-series model distillation to make these four or fine tunes really good. But yeah, the main thing is, can it remain factual? Can it answer questions based on what it retrieves? And can it cite it accurately? And that's what this fine-tuned model really excels at. And so yeah, I'm super excited that it's going to be directly available in chat completions along with being available as a tool.

  4. 9:49

    Yeah, just to clarify, if I'm using the responses API, this is a tool. But if I'm using chat completions after switch model, I cannot use O1 and call search as a tool. That's right. Exactly. I think what's really compelling, at least for me and my own uses of it so far, is that when you use Web Search as a tool, it combines nicely with every other tool and every other feature of the platform. So think about this for a second, for instance.

  5. 10:12

    Imagine you have a responses API call with the Web Search tool, but suddenly you turn on function calling and also turn on, let's say, structured outputs. now you kind of have like the ability to structure any data from the web in real time in the json schema that you need for your application so it's quite powerful when you start combining those features and tools together it's kind of like an epi for the internet almost you know like you you uh you get like access to the precise schema you need for your app yeah and then just to wrap up on the infrastructure side of it i read on the post that people publisher can choose to appear in the web search so are people by default in it like how can we get latent space in the in the web search api yeah yeah i i think uh the we have some documentation around how

  6. 10:58

    uh websites publishers can can control like what shows up in a web search tool and i think uh you should be able to like read that i think we should we should be able to get latent space in for sure Yeah, you know, I think so. I compare this to a broader trend that I started covering last year of online LLMs. Actually, Perplexity, I think, was the first to say to offer an API that is connected to search.

  7. 11:23

    And then Gemini had the sort of search grounding API. And I think you guys, I actually didn't, I missed this in the original reading of the docs, but you even give like citations with like the exact sub paragraph that is matching, which I think is the standard nowadays. I think my question is, how do we take what a knowledge cutoff is for something like this? Because now basically there's no knowledge cutoff, it's always live.

  8. 11:45

    But then there's a difference between what the model has sort of internalized in its backpropagation and what is searching up as RAG. I think it kind of depends on the use case, right? And what you want to showcase as the source. Like, for instance, you take a company like Hebea that has used this web search tool. They can combine like for credit firms or law firm, they can find like, you know, public information from the Internet with the live sources and citation that sometimes you do want to have access to as opposed to like the internal knowledge.

  9. 12:16

    But if you're building something different where like you just want to have an assistant that relies on the deep knowledge that the model has, you may not need to have these like direct citations. So I think it kind of depends on the use case a little bit. But there are many, many companies like Hebbia that will need that access to these citations to precisely know where the information comes from.

  10. 12:35

    Yeah, yeah, for sure. And then one thing on the breadth, you know, I think a lot of the deep research, open deep research implementations have this sort of hyper parameter about how deep they're searching and how wide they're searching. I don't see that in the docs, but is that something that we can tune? Is that something you recommend thinking about? Super interesting. It's definitely not a parameter today, but we should explore that.

  11. 12:58

    It's very interesting. I imagine how you would do it with the Web Search Tool and Responses API is you would have some form of agent orchestration over here where you have a planning step and then each Web Search call that you do explicitly goes a layer deeper and deeper and deeper. But it's not a parameter that's available out of the box. But it's a cool thing to think about. The only guidance I'll offer there is a lot of these implementations offer top K.

  12. 13:24

    which is like, you know, top 10, top 20, but actually you don't really want that. You want like sort of some kind of similarity cutoff, right? Like some matching score cutoff, because if there's only five things, five documents that match, fine. If there's 500 that match, maybe that's what I want. Right. But also that might make my costs very unpredictable because the costs are something like $30 per a thousand queries, right?

  13. 13:46

    So yeah. Yeah. Yeah, I guess you could have some form of like a context budget And then you're like, go as deep as you can and pick the best stuff and put it into like X number of tokens. There could be some creative ways of managing cost.