Prism Publication

contextual ads

How Ad Matching Works in an AI Chat Interface

By . Published . Last updated .

What is the direct answer?

Prism scores the chat question against each ad, using the words they share and, since November 4, 2026, how close their meaning is. Every ad gets a score from 0 to 1, and a labeled card shows only when the best score is 0.65 or higher. Below that, no card shows. There is no profile, no cookie, no location and no fallback ad.

What are the key takeaways?

  • The only input is the conversation: the latest message plus earlier messages from the same session in the last 30 minutes.
  • Matching scores shared words and, since November 4, 2026, closeness of meaning, from 0 to 1. A card needs 0.65 or higher.
  • When nothing clears 0.65, the answer shows alone. Nothing is filled in and nothing is billed.
  • Sensitive conversations never get a card, whatever the score.
  • A question worded very differently from the ad can still miss, even with meaning scoring. That is the system's main limit, and this page shows it with real scores.

This post replaces an earlier version written when Prism was a developer SDK. That version described topic tags, a random fallback ad and daily budgets. None of those exist in Prism today. What follows is how the live matcher works as of November 4, 2026.

What does Prism read to pick an ad?

Only the chat. Prism scores the latest message, and it also scores the session's earlier messages from the last 30 minutes joined together. The better of the two scores counts. That way a follow-up like "how much does it cost?" keeps the topic of the question before it.

Prism never gives the matcher an account, a cookie, a saved memory, a location or an IP address. A hashed IP address is kept for message limits and click counts, never for choosing an ad. Two people who type the same question get the same ad decision.

How is a match scored?

The question and the ad are compared two ways: by their words, and by their meaning. The better of the two scores counts.

  1. Clean the words. Everything is lowercased and split into words. Words under three letters are dropped, except "ai". Very common words such as "the", "and", "for", "what" and "help" are dropped too.
  2. Trim endings. A simple rule cuts common endings, so "boots" and "boot" count as the same word, and "hiking" becomes "hik".
  3. Read the ad. Only the ad's title, description and keywords are used. The ad's category label is not scored.
  4. Score the overlap. Prism counts how often each word appears on both sides and computes a similarity score from 0 (no shared words) to 1 (the same words in the same proportions). This is called cosine similarity.
  5. Score the meaning. Since November 4, 2026, an AI model also turns the question and the ad's title, description and keywords into lists of numbers, so that texts about the same thing end up close even when they share no words. Prism shifts that closeness score so that a closeness of 0.74 counts as 0.65, the floor. If the meaning step is late or fails, the word score alone decides.
  6. Apply the floor. A card shows only at 0.65 or higher, and the meaning step has 120 milliseconds. Otherwise the word score alone decides, and below the floor the answer shows alone.

What does a real score look like?

Here is an example ad, invented for this page, run through Prism's live matching code. The ad's title is "Waterproof hiking boots", its description is "Lightweight waterproof hiking boots for wet trails", and its keywords are "hiking boots, waterproof boots, trail boots".

Scores for one example ad, from Prism's matching code on November 4, 2026 (words and meaning)
Question typed in the chatScoreCard shows?
waterproof hiking boots for wet trails0.89Yes
best waterproof hiking boots0.79Yes
are hiking boots worth it0.66Yes, just over the floor
what shoes should I wear for a rainy trek0.58No, under the floor

The last row is the honest part. A person asking about shoes for a rainy trek wants exactly this product, but the question shares no words with the ad, so its word score is zero. Its meaning score is 0.58, which is close but still under the floor, so no card shows. Meaning scoring helps, but it does not catch every rewording. In Prism's published sample match reports, which were run on the word matcher before meaning scoring, most ads cleared the floor on only 1 of 10 natural test questions.

How much does meaning scoring add? On November 4, 2026 Prism replayed 74 distinct questions from its own chat log, which includes test questions. The word matcher alone matched 16 of them (21.6 percent). With meaning scoring at a floor of 0.74, 24 matched (32.4 percent). Each of the 8 added matches was read by hand: 7 showed a clearly relevant ad and 1 was borderline. No ad that the word matcher had already chosen changed. This is a small sample of Prism's own chat and says nothing about other platforms.

What happens when nothing matches?

Nothing shows. The answer appears on its own, and nobody is billed. Prism does not pick a "closest" ad or a random one to fill the space. A system that can return no ad is the only kind whose ads mean anything.

The miss is still useful. Prism logs which ad came closest, so an advertiser can see which buyer questions their ad misses and which words are missing from it.

When is a card blocked even if it matches?

A safety check runs before any card is shown. It blocks cards on messages about self-harm, a crisis, violence, illegal acts, medication doses, messages that show distress, and complaints about a past purchase. The answer still shows; only the ad is held back. The check uses fixed word rules, not an AI model.

Which ad wins when several match?

Ads from advertisers who submitted and paid are checked first. Only if none of them clears 0.65 does Prism look at its affiliate library, such as Amazon products. A paid ad always wins over an affiliate ad. Every card is labeled: "Sponsored" for paid ads, "Affiliate" for affiliate links.

Paid ads run on prepaid click credit. When the credit runs out, the ad stops showing until it is topped up. There are no daily or lifetime budget settings.

How do you write an ad that matches more questions?

  • Use your buyers' words. Put the words people actually type, such as "waterproof" or "trail", in the title, description and keywords.
  • Do not stuff. Every extra word that a question does not contain lowers that question's score. In Prism's own tests, adding a long list of gap words made an ad match fewer questions, not more.
  • Expect misses. No single ad covers every way people phrase a topic. Test it against ten real questions before you spend.

You can do that free on the Prism homepage: paste your ad, type the questions your customers ask, and see the score for each one. The scores describe Prism's own engine only, not what another platform will do.

Related: are ads in AI chat really contextual?

Frequently asked questions

What does Prism read to pick an ad?

The words of the latest chat message, plus earlier messages from the same chat session in the last 30 minutes. It never reads accounts, cookies, location, IP address or other chat sessions.

What happens when no ad matches?

No card shows. The answer appears on its own. Prism has no fallback or random ad, and nothing is billed.

Does Prism understand synonyms?

Partly. A short list of everyday synonyms counts as the same word, and since November 4, 2026 Prism also scores closeness of meaning. A question about a rainy trek still scores 0.58 against an ad about waterproof hiking boots, under the 0.65 floor, so no card shows. Prism says so openly.

How do I make my ad match more questions?

Use the words your buyers actually type in the ad's title, description and keywords. Avoid stuffing extra words: every word a question does not contain lowers its score.

AI-written, human-reviewed.

Would your ad show up in an AI chat?

Paste your ad, ask the questions your customers ask, and see whether a card shows and why. Testing is free. You pay for clicks only after your ad is approved and live.

How does this fit a broader content strategy?

Use the buyer-question topic cluster guide to connect ad matching, practical evidence and the next step in evaluating an ad.