contextual ads
How Ad Matching Works in an AI Chat Interface
What is the direct answer?
Prism compares the words in the chat question with the words in each ad, gives every ad a score from 0 to 1, and shows a labeled card 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 is word overlap, scored 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.
- Word overlap misses synonyms. 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 October 8, 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?
Both the question and the ad are turned into a list of words, then compared.
- 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.
- Trim endings. A simple rule cuts common endings, so "boots" and "boot" count as the same word, and "hiking" becomes "hik".
- Read the ad. Only the ad's title, description and keywords are used. The ad's category label is not scored.
- 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.
- Apply the floor. A card shows only at 0.65 or higher, and matching has to finish in under 120 milliseconds. Otherwise 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".
| Question typed in the chat | Score | Card shows? |
|---|---|---|
| waterproof hiking boots for wet trails | 0.89 | Yes |
| best waterproof hiking boots | 0.79 | Yes |
| are hiking boots worth it | 0.66 | Yes, just over the floor |
| what shoes should I wear for a rainy trek | 0.00 | No |
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 it scores zero. Prism matches words, not meaning. In Prism's published sample match reports, most ads cleared the floor on only 1 of 10 natural test questions for this reason.
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.
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?
No. Matching is word overlap. A question about a rainy trek scores zero against an ad about waterproof hiking boots, because they share no words. 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.