Semantic ad routing compares the meaning of a current request with campaign themes. For an AI product, that can produce a more useful placement than broad demographic targeting. It can also be designed with less data: the router can work from a bounded request and approved campaign metadata instead of following a person across websites and sessions.
Begin with hard eligibility
Relevance should never rescue an ineligible campaign. Before ranking, the system should exclude campaigns that are unapproved, rejected, inactive, retired, out of budget, outside a policy boundary, or otherwise unavailable. Keeping this phase deterministic makes operator review and incident analysis much easier.
Campaign deletion needs the same discipline. A campaign with no delivery history may be physically removable. Once immutable ad or settlement records reference it, a privacy-preserving tombstone can erase presentation and ownership fields while retaining the minimum accounting reference. That is safer than leaving rejected campaigns active in an owner interface, and more honest than pretending referenced history can always be deleted as if it never existed.
Rank meaning, then balance delivery
Vector similarity is useful, but a pure top-score winner can make one campaign dominate indefinitely. A stronger Tier C strategy combines two signals:
- Semantic relevance: how closely the current request aligns with the campaign’s approved targeting concepts.
- Delivery pressure: a modest advantage for eligible campaigns that have appeared fewer times.
Weighted randomness can preserve relevance while preventing a deterministic loop. A small nonzero floor gives qualified campaigns a chance; a frequency divisor gradually reduces the weight of heavily delivered campaigns. The exact formula should be testable, versioned, and observable rather than hidden in marketing language.
Use the minimum context needed
A coding-agent request may include a long conversation, tool results, file contents, and generated patches. Routing rarely needs all of that. Using only the latest user-authored request for matching reduces exposure and avoids treating model or tool output as targeting data. The complete context can still go to the selected model when required for generation, under a separate provider contract.
Data minimization also means keeping sponsor metadata out of the model pathway. The campaign can be selected and rendered without being embedded into prompts or tools. This separation is explained in why sponsored messages should stay outside AI model context.
Record truthful evidence
An impression should correspond to a server-confirmed delivery step, not merely a campaign selection. Settlement needs a correlation trail connecting the request, selected campaign, delivery class, provider usage, and subsidy result. Aggregate dashboards should distinguish queued impressions from settled placements and avoid manufacturing click-through rates, trends, or spend estimates when those events do not exist.
A practical routing checklist
- Is the campaign approved and active?
- Apply lifecycle, budget, account, and product-policy rules before semantic ranking.
- Is the input bounded?
- Prefer the smallest user-authored context that can support matching, and do not use sponsor data as model input.
- Can delivery be verified?
- Record an impression only at a defined delivery boundary, and preserve the delivery class for settlement.
- Can an operator explain the outcome?
- Store stable reason codes and aggregate evidence without retaining prompt or response content in ad analytics.
Relevance is only one requirement
A semantic router earns trust when relevance, privacy, campaign governance, and accounting agree. Optimizing one score while ignoring lifecycle or evidence creates a brittle ad system. The goal is a placement that is eligible, contextually useful, appropriately balanced, separately rendered, and truthfully settled.