How Does AI Search the Web

Posted by Adam Danyal in AI Search on

When you ask Claude or ChatGPT a question, a small status line often flashes on screen: searching the web, or running code, or some other brief note about work in progress. The words make it sound like the AI has gone out, checked a page, and come back with an answer. Does the model run this search itself? No. A language model reads a prompt and writes text back. Reading and writing text is the whole job, and every other word on that status line describes something else doing the work, off in software the model never touches.

The model behind Claude or ChatGPT has no way to open a connection to the internet. A language model is a program that turns the words in a prompt into the words of a reply, nothing else built in. Every reply comes from the same two steps: words go in, words come out. So how does a live web search, or any other live task, fit inside a system built only to read and write?

Say you ask Claude for the weather in Amsterdam right now. The model has no way of knowing today’s forecast. Training ended months earlier, long before this week’s weather formed. What the model does know: a tool named web search exists and sits ready to use, because the application told it so ahead of time. So the model writes a short, structured request, a message formatted so the surrounding software reads it as an instruction rather than a stray line of conversation. The request reads: run web search for Amsterdam weather right now. At this point nothing has happened yet. The written request is only text, sitting in the conversation the same way any other sentence would sit there.

The written request lands inside the application’s own infrastructure, the ordinary software running on servers behind Claude or ChatGPT. This system makes real requests to outside services, the way any other program does. None of it is intelligent in the way the model is. The system reads the model’s request, runs the actual search, and collects results from the web, the same way it would carry out any other instruction it was built to follow.

Those results come back as raw data. The infrastructure turns the data into plain text and adds it to the conversation. Only then does the model read the text, pick out the detail worth keeping, 21 degrees and cloudy, and write the sentence you see. Every step up to that point happens without the model doing anything at all.

Anthropic’s own documentation for Claude describes the same handoff. The model writes the request, and the company’s servers carry out the search before the result returns to the conversation for the model to read.

The same pattern holds for the models behind ChatGPT. OpenAI’s documentation lays out an identical sequence: the model returns a request for a tool, the application executes it, and a second exchange carries the result back for the model to write a final response.

None of this back and forth is visible when you type a question into a chat box. The status line compresses several steps behind a short phrase: searching the web, running code, or whatever else the moment calls for. Behind each of those phrases sits a language model limited to reading and writing, handing off every other step to regular software built to make requests, wait for answers, and pass plain text along.

A language model does two things only: read words, write words. Every status line that says searching the web, or running code, or any variation on those words, sits on top of the same handoff. Ordinary software picks it up, the kind that has always known how to make a request and wait for a reply. The reading and the writing stay with the model. The traveling happens elsewhere, in code written long before the question was typed. The same split sits behind the status line of any AI product that shows one.


Sources

Anthropic, How tool use works — platform.claude.com
OpenAI, Function calling — developers.openai.com