How OpenAI ChatGPT search works: what the LLM does before it answers
In short
GPT draws on learned knowledge and on information retrieved through tools. scaile traced 200 Codex runs to understand how searches and page checks shape an answer, and where better content could make a difference.
To understand how a large language model answers a question, start with two things:
- What it learned during training.
- What it finds through tools while answering.
The first gives the model a starting point. The second brings in information it can use to check, expand or correct that starting point.
For brands, this matters. A useful page can become part of the information the model receives before it writes its answer.
scaile studied this process in Codex, OpenAI’s coding assistant, by tracing the searches and page checks behind GPT-generated answers. On 9 September 2026, scaile ran 100 buyer prompts twice through Codex and recorded every search query, page open and in-page check the model made before it answered.
Training gives it knowledge. Tools bring in information.
| Source | What it contributes |
|---|---|
| Training | Learned knowledge, language patterns and associations |
| Tool calls | Information retrieved for the current task, such as search results and page content |
Tool calls do not rewrite training data during a search. They add information to the current conversation that can influence the answer. OpenAI describes this as learned knowledge versus information supplied in context. OpenAI’s explanation
The prompt, instructions and conversation history also shape how the model uses both.
What happens between the prompt and the answer?
The model works inside a harness: the software that gives it instructions, runs its tool calls and returns the results.
In scaile’s study, the model made an early decision about its next action. The harness executed it. Web activity usually began with searches, followed by selected page opens and checks for details:
- Choose searches. The model turns the task into search queries.
- Retrieve results. The tool returns titles, URLs, snippets and sometimes longer extracts.
- Check selected pages. The model requests page opens, searches within pages or runs follow-up queries.
- Write the answer. The model uses its existing knowledge and the information returned by tools.
On 9 September 2026, scaile ran 100 prompts twice:
| Observation | Result |
|---|---|
| Runs that used web tools | 188 of 200 |
| First web call contained searches only | 180 of those 188 |
| Time to the first tool action, median | 7.9 seconds |
| Page-open requests per web-using run, median | 5 |
The first tool action could also be a clarification question or another tool. The timing is not a measurement of search alone. Study data.
The pattern: the system starts gathering information early, then checks selected details before answering. This describes the tested setup, not every GPT product or mode.
Why the search layer matters for content
A final answer tells you whether a brand appeared. Tool calls help explain what information was available along the way.
Which queries did the model choose? Which pages came back? What text was returned? Which pages did it open next?
In one saved run about executing SEO and GEO work, the model searched for content workflows and CMS publishing, opened vendor homepages, pricing pages and documentation, then searched within pages for terms including Publish and $.
That gives a content team a concrete question: does the page clearly answer the capability or pricing question the model is checking?
Starting knowledge can influence the searches. Returned content can influence the next searches and the answer. Understanding that loop helps scaile identify content changes worth testing. OpenAI also describes this process of searching, reviewing results and deciding whether to continue. Web-search guide
One run, from buyer question to content test
Here is that saved run in full, as scaile recorded it. The vendor names in the model’s own queries are replaced with <vendor>; everything else is verbatim.
| Step | What the trace shows |
|---|---|
| Buyer question | “What is the best tool for executing on my SEO and GEO data to actually become visible in AI search?” |
| First search queries | AI search optimization platform execute recommendations content technical SEO <vendor> <vendor> <vendor>, then one query per vendor such as site:<vendor> AI search content workflows integrations |
| Follow-up query | site:<vendor> integrations Google Search Console Semrush Ahrefs CMS publish |
| Pages it opened | The vendor’s homepage, its pricing page, its documentation index, then the integrations page inside the documentation, then a competitor’s pricing page |
| What it searched for inside those pages | Publish, publish, $, Solo, Agents |
| Content change to test | An integrations page that names the CMS connections and the publishing step in plain words, and a pricing page that states the plan names and the price, so the model’s in-page checks for “publish” and “$” hit real text |
The model never asked the vendor to describe itself. It asked whether the product connects to a CMS and publishes, and what that costs, and it checked those two things on the pages it opened. A page that answers them explicitly is the content test scaile would run first for that buyer question.
Alpha lets scaile inspect one step directly
In the Codex setup scaile studied, web-tool requests went to:
POST https://chatgpt.com/backend-api/codex/alpha/search
An endpoint is an address software sends requests to. Alpha accepts a direct search command. This part of a request sets the query:
{
"commands": {
"search_query": [{ "q": "Software Agentur Wien" }]
}
}
scaile can inspect the returned pages without asking a model to choose that query or write an answer.
Going one layer deeper means separating the search step from the model’s decisions around it.
Try it on your own site: the free GPT Search Check sends your domain and up to three queries to this endpoint and mails you the pages it returns.
How does this differ from Responses?
With the public Responses API, you give the model a prompt and enable web search. The model constructs the search call.
| Question | Alpha | Responses with web search |
|---|---|---|
| How is the query supplied? | Directly in a search command | Through instructions to the model |
| Can the returned pages be inspected? | Yes | Yes, when requested |
| Did scaile receive extracts and crawl labels? | Yes | Yes |
| Main use in this research | Inspect an exact search query | Inspect the model’s search and answer process |
Responses exposes detailed results using web_search_call.results, and source URLs using web_search_call.action.sources. Check action.queries to see the actual query. Responses reference
In scaile’s 17 September comparison, every public API call followed the requested query exactly. Alpha’s distinction is direct command control, rather than relying on the model to follow that instruction.
The lists still differed. For Software Agentur Wien, the first paired trial returned 27 results through Alpha and 21 through Responses, with 16 exact URLs shared. Different output-budget controls mean this does not establish why the lists differed. Comparison data.
Turn the search evidence into content tests
Inspecting tool calls turns “appear in GPT’s answer” into specific work:
| What the trace shows | Content change to test |
|---|---|
| Queries focus on a specific task | Explain how the product performs that task |
| Returned text misses a key capability | Make that capability explicit in relevant page content |
| The model checks pricing or integrations | Provide clear, current details and supporting evidence |
| A page appears, but the brand is not recommended | Check whether it supports the user’s requirements |
These are hypotheses. The traces do not reveal a complete ranking formula or prove that one writing style causes a recommendation.
Keep buyer prompts fixed, change one substantive part of the content, repeat the checks and compare with an unchanged page. Measure being returned, being cited and being recommended separately.
Understand what the model searches for, improve the evidence it can find, and measure whether the final answer changes. That is the opportunity this research opens up.
Next step: the free GPT Search Check from scaile returns the pages OpenAI’s search index lists for your domain and up to three queries of your choice. It is the same search step this research inspected, run for your site.
Research scope: the process study used Codex with gpt-6-astra at xhigh effort on 9 September 2026. The separate Alpha/Responses comparison used five Alpha and six public API requests on 17 September. These observations describe specific setups, not a universal ChatGPT ranking or a controlled demonstration of content-driven uplift.


