OpenAI Reveals How ChatGPT’s Ad System Works: Placing Relevant Ads Without Changing Its Answers
An ad must pass through intent understanding, retrieval, scoring, and an auction—and even after winning, it may still not be shown if the context is unsuitable or it arrives too late.
ChatGPT has started selling ads. When you use it to plan a trip, choose software, or explore a new hobby, a product or service promotion clearly labeled "Sponsored" may appear beneath the response. This is part of OpenAI's business model, allowing merchants to pay to display ads within ChatGPT.
In the diagram, Headline represents the title, Description corresponds to the explanatory text, and Creative refers to the image on the right. Source: OpenAI Help Center ad creative example.
The ChatGPT ad system is the backend infrastructure responsible for selecting and placing these ads. Taking the ongoing conversation into account, it determines whether a suitable advertising opportunity exists, which ad to pick, and whether it can be displayed below the current answer.
Naturally, questions arise: If I'm just chatting about running, how does it know whether I want to buy shoes? If a brand pays, will ChatGPT show bias toward the sponsored brand in its response? Will it make me wait longer just so it can finish selecting an ad?
OpenAI recently shared the engineering principles behind this system: how ads track evolving needs across multi-turn conversations, and how the ad pipeline runs independently from answer generation.
Why Can't Every Message Be Treated as a Standalone Ad Request?
Search advertising begins with a clear trigger: a user submits search keywords, and the system retrieves candidates, ranks them, runs an auction, and displays an ad based on that query. In ChatGPT, however, someone might first mention preparing for a race, and only bring up training shoes several turns later. An initial inquiry about running does not automatically imply an intent to purchase gear.
This is precisely the example OpenAI's engineering team highlights: transitioning from general running questions to finding suitable training shoes. As goals, constraints, and preferences are gradually added, the ad system must continuously re-evaluate current intent rather than letting the very first message define the entire dialogue.
If every message were compressed into an isolated query, ads might appear prematurely, and the system would redundantly repeat similar work. To solve this, OpenAI introduced stateful ad sessions: keeping track of relevant information that has surfaced and updating it as new context arrives, rather than guessing from scratch each time.
Here, "state" can be thought of as a running record of needs maintained by the system: what was discussed earlier, what conditions were newly added, and what information has become outdated. Remembering information also means knowing whether it still applies; casually mentioning a brand or exploring a hypothetical scenario should never be mistaken for a purchase request.
Two Independent Tracks: How Can "Understanding Me" and "Leaving Answers Unchanged" Coexist?
If the ad system can use the conversation to find products, could that in turn cause ChatGPT to favor sponsors in its answers? OpenAI's disclosed approach is to separate the two workflows: responses are generated by the core ChatGPT service, while ads are selected by a separate ad service. The two sides use distinct models and codebases, sharing no content generation models.
There is no arrow returning from ad selection to answer generation. Source: OpenAI.
What is easiest to overlook in this diagram is that dashed line: an independent answer does not mean the ad system never reads the conversation. The ad side uses available session context to determine whether a suitable commercial opportunity exists; any selected ad appears as distinct sponsored content rather than being woven into the organic answer.
Running separately also means that if the ad service is slow or unavailable, answers generate as usual without waiting for ad results. Returning "no ad" is also a normal, successful outcome for the system. In OpenAI's design, an ad is delivered only when it provides value to both the user and the advertiser. While this explains how the two service pipelines are decoupled, the architectural description alone cannot prove that the product is free of bias under all circumstances.
An LLM as the Orchestrator, with Dedicated Tools Handling Retrieval and Auctions
OpenAI further trained an existing large language model specifically for advertising tasks—a process known as "post-training." The trained model acts as the orchestrator. It operates much like a tool-calling agent: first understanding the conversation, then choosing which tool to invoke next based on the findings, and retrieving or re-evaluating candidates as new information emerges.
For instance, if a user first asks about a travel itinerary and later inquires about new releases from a specific brand, the orchestrator determines whether the two are connected. It organizes this understanding process, while retrieval, budget checks, scoring, and auctions are executed by their respective tools.
The LLM iteratively calls tools based on available context; when users opt into personalization, nonsensitive information from past chats can also be considered.
Each stage in the toolchain answers a different question: retrieval tools first identify potentially relevant ads; eligibility tools verify whether candidates qualify for delivery; scoring tools evaluate relevance and predicted engagement; and auction tools determine the final winner and price.
The large language model is responsible for understanding language and scheduling these capabilities; it does not directly pick the final winner, nor does it set prices itself. When it reaches the auction stage, its role is to nominate suitable candidates to the auction tool.
Intent Rewriting and Multi-Index Retrieval: Not Treating Every Sentence as a Request to Buy
As users engage in multi-turn exchanges, the orchestrator must first rewrite complex context into representations suitable for querying ad indexes.
Take the two-day Yosemite trip example shared by OpenAI:
- Turn 1: The user asks for a sightseeing itinerary for a two-day trip to Yosemite;
- Turn 2: The user follows up asking if it will be very cold there next week;
- Turn 3: The user casually asks whether a certain outdoor brand has launched any new product lines recently.
In this scenario, the user never explicitly stated an intent to buy shoes. The orchestrator connects the itinerary with the brand inquiry and attempts retrieval related to hiking travel, rather than simply stringing the three turns into a raw search query. Possible queries might include:
[footwear suitable for hiking trips][the brand's new product line suitable for outdoor travel]
These text queries are then encoded into semantic vectors—strings of numbers that represent meaning—allowing the system to search the ad repository for conceptually similar content. "Shoes for hiking trips" does not need to match the ad copy verbatim to surface relevant candidates.
Retrieval relies on Approximate Nearest Neighbor (ANN) search: quickly finding broadly similar options to retain as many relevant candidates as possible, rather than exhaustively scanning every ad for a single absolute optimum. The system maintains multiple indexes tailored to general ads, product ads, and other needs; the product ad index also factors in positive and negative product reviews.
General ads, product ads, and other optional strategies supply candidates from various sources; the merged list is not yet the final winner.
Once the candidate pool is assembled, it must pass through three distinct layers of evaluation:
- Eligibility to compete. Are the ad and campaign still active? Does the targeting geography match? Does it meet policy requirements? Is there remaining budget, and should that budget be spent right now? Can it appear in this conversational placement? Does it need deduplication by advertiser or campaign so that the same advertiser or campaign doesn't crowd the pool? Budget pacing ensures that spend is not prematurely concentrated at inappropriate moments.
- Alignment with the current intent. Scoring tools assess semantic relevance and predict whether the user will view, click, or complete a desired "conversion"—such as making a purchase or signing up—while also referencing historical ad performance. Only candidates deemed relevant and safe advance to auction preparation.
- Final selection and pricing. Following nomination by the orchestrator, the auction tool enforces minimum relevance and value thresholds, budget pacing, quality-adjusted ranking, pricing, and final selection. Bids factor into the decision, and so does quality; the original engineering article does not disclose the specific auction formula.
Therefore, "finding a hiking shoe ad" is only the first step. It still has to satisfy delivery conditions, match the immediate intent, and win the opportunity to be displayed in the auction.
Why Winning the Auction Doesn't Guarantee Display: Racing the Clock and Delivery Receipts
Even after an ad wins the auction, it may still not appear below the current response. Conversational products must weigh two additional questions: is placing an ad appropriate at this precise moment, and can the ad arrive before the answer finishes?
The original article refers to sending the ad payload from the server to the frontend as server-side delivery, but "sent by the server" and "seen by the user" remain two distinct stages.
The sequence is: Selection → Host checks → Label sponsored and render → Acknowledgment and receipt → Log successful delivery. Rejected or interrupted ads are dropped.
If It Doesn't Arrive Before the Answer Finishes, It Won't Show This Turn
The time ChatGPT takes to generate a response varies dynamically, and the ad pipeline must finish within that window. The frontend will only display an ad in the current turn if it receives the ad payload before response generation is completely finished; if it arrives too late, it will not be shown. The answer will not pause to wait for an ad.
An Ad Can Comply with Policies and Still Be Unsuitable for the Context
Policy compliance confirms whether the ad and the conversation meet baseline advertising criteria, but pairing them together might still feel inappropriate. Even after an ad has won the auction, the orchestrator can block it if the immediate context is unsuitable. This serves as an additional checkpoint after the auction.
Where Do Ads Appear, and How Does the System Confirm Delivery?
The payload returned by the ad system contains both ad creatives—such as headlines, descriptions, destination links, and call-to-action buttons—and a short, neutral preamble generated by the model explaining how the ad connects to the conversation. Keeping the preamble distinct from the ad creative preserves the advertiser's message while preventing promotional tone from bleeding into ChatGPT's response.
In this example, a food ad appears following dinner gathering recommendations, with cards detailing product images, prices, and cook times. Source: OpenAI official interface example.
The frontend places the ad beneath the answer, clearly labeled as sponsored. According to the official sequence diagram, only after the client confirms rendering does ChatGPT send a delivery confirmation back to the ad system, which then logs a successful delivery. Winning an auction, server dispatch, actual rendering, and receipt acknowledgment must be viewed as distinct steps; these stages do not in themselves indicate which billing model is used.
Illustrative Demo · Based on original flow, not live ad test
The Same Winning Ad Can Have Three Possible Outcomes
Suppose the auction has selected a winning ad. Toggle the conditions below to see how far it gets; answer generation continues independently throughout.
- 1Auction Winner
Selected by auction tool; must still pass subsequent checks.
- 2Context Check
Appropriate; proceeding with dispatch preparation.
- 3Frontend Reception
Arrived in time; eligible for display this turn.
- 4Display & Receipt
Labeled sponsored below answer; acknowledged and reported after display.
Result: Displayed and delivery confirmed. Answer path operates as usual.
Unsuitable context: Even if the ad is compliant and wins the auction, the orchestrator can still block it.
Arrives too late: Not displayed this turn; the answer will not wait for the ad.
Data Flows, Privacy Controls, and Closed-Loop Evolution
The sustainability of an advertising system depends on objective data measurement, but the core asset of a conversational product is user trust in privacy.
The two outputs below represent aggregate measurement and data permitted for model improvement; the diagram does not specify exact anonymization techniques or data retention periods.
Privacy Boundaries and Personalization Controls
The ad service utilizes current conversation context; if a user opts into personalized ads, the orchestrator also considers available nonsensitive information from past conversations. This is an explicit prerequisite for leveraging historical context, and one cannot infer from this how individual types of data are stored, isolated, or deleted internally.
OpenAI pledges in its advertising principles that advertisers cannot view users' private conversations, nor is user data sold to advertisers; users can disable personalization and delete data used for ads at any time. The ad system making use of context is entirely different from advertisers directly accessing chat transcripts.
The left image shows toggles for "Personalize ads" and "Past chats and memory." Source: OpenAI official interface example.
How Does the System Know Which Stage to Improve?
The ad pipeline may halt at various stages or complete successfully: the turn might have been inherently unsuitable for ads; a session was started but no retrieval was run; retrieval found no candidates; candidates failed eligibility checks; or the ad was rendered and subsequent user interaction occurred. By logging these outcomes separately, the team can determine whether to improve opportunity detection, retrieval quality, candidate filtering, or delivery reliability.
OpenAI also uses models with stronger reasoning capabilities to evaluate system outputs and train ad models using that feedback. This allows smaller, more efficient, or lower-inference-cost models to handle orchestration and retrieval tasks without requiring the most powerful model at every online stage.
However, model judgments are not the sole benchmark. User clicks and hides, user surveys, and direct feedback from advertisers in Ads Manager also guide adjustments. OpenAI notes that this human feedback influences product direction even more than model observational feedback: while models can help assess relevance, whether an ad appears tasteful still relies on human sentiment.
Scale and What Comes Next
OpenAI previously announced that ChatGPT Ads reached an annualized revenue run rate of $1 billion in fewer than 200 days after launch. This engineering post further disclosed that more than 100,000 advertisers have run ads since launch.
An annualized revenue run rate extrapolates a short-term revenue pace across a full year and does not mean that a full $1 billion has already been collected; the cumulative number of advertisers who have run campaigns is not the number currently running ads. Both figures are self-reported by the company, indicating that the system is already handling real-world commercial operations.
AI was also used during development: the team integrated Codex into their workflow from the start, combined with code guardrails and data infrastructure plugins to tighten the loop between identifying issues, gathering insights, and deploying improvements.
Moving forward, OpenAI aims to explore more dynamic ad formats, such as enabling users to interact directly with businesses through ads. This remains a future exploration. For now, the most noteworthy takeaway from the disclosure is how the architecture assigns models to understand shifting needs while delegating retrieval, scoring, and auctions to specialized tools—all while enforcing service boundaries and display conditions to govern precisely when an ad can appear.
Members can copy or download the full Markdown, and let their AI subscribe and ask.
Found this useful? Leave your email — every new explainer, the moment it's out. Unsubscribe anytime.
