Guardrails: how targeting rules always win
Meaning-based matching is powerful, but it must never override an advertiser's hard requirements. Here's why our system runs the absolute rules first and lets the smart ranking only reorder what survives — and why that order is the safe one.

Meaning-based matching is the exciting part of an ad marketplace — the system that reads a show and a campaign and understands, without keywords, that they belong together. But excitement is not the same as trust. An advertiser who says 'never place my ad on shows in this category' is not making a suggestion for the smart system to weigh. They're drawing a line. The single most important design decision in our matching engine is that those lines are enforced before the smart part ever runs. Here's why, and why the order matters so much.
Two very different kinds of 'match'
It helps to separate two things people lump together:
- Hard requirements — absolute rules. A category to exclude, a geography to stay within, a brand-safety boundary. These are yes/no. There's no 'mostly.'
- Soft preferences — matters of degree. Among the shows that are allowed, which fit best by meaning? This is where 'better' and 'worse' live.
The mistake would be to treat a hard requirement like a soft preference — to let a meaning score decide how much a rule 'counts.' Do that, and a strong enough similarity score could quietly outweigh a boundary the advertiser considered non-negotiable. So we don't blend them. We run them in order.
Filters first, and they're absolute
The engine works in two stages, and the sequence is the whole safety story. First, the hard filters run. They take the full universe of shows and remove everything that violates a stated rule — not down-rank it, remove it. A show in an excluded category isn't shown with a low score; it's gone from consideration entirely. What comes out of this stage is a pool of survivors: every option in it already satisfies every hard requirement.
A rule you can outscore isn't a rule. That's why filtering removes options outright instead of just lowering their rank.
This structure isn't unique to us — multi-stage systems across search and recommendations do coarse filtering first and expensive, fine-grained scoring second, precisely because it's both safer and more efficient. It's a well-worn pattern. We lean on it because the safety property is exactly what an ad marketplace needs.
Ranking only reorders the survivors
Only after the filters have done their work does the meaning-based ranking step in — and it operates on the survivor pool alone. Its entire job is to take options that are all already allowed and put the best fits on top. It reorders; it never re-admits. The ranking model has no ability to reach back and pull in something the filters excluded, for a simple structural reason: it never sees the excluded items at all. They were removed a step earlier, before ranking existed.
That's the elegant part. We don't need the smart system to be disciplined about rules, because we never give it the chance to break one. It's not tempted, because temptation was removed upstream. The intelligence is spent entirely on the question it's good at — 'which of these fine options fits best?' — and never on the question it shouldn't touch — 'should this be allowed at all?'
Why this order, and not the reverse
You could imagine doing it the other way: rank everything by meaning first, then try to filter out rule-breakers afterward. It sounds equivalent. It isn't, and the difference is trust.
- Filter-first makes 'no' mean no. A disqualified option is eliminated before scoring, so no score, however high, can resurrect it.
- Rank-first invites leakage. Once you're sorting by a soft score and only trimming afterward, the door is open to edge cases where a great score smuggles a rule-breaker toward the top before the trim catches it. The more places 'the rule' has to be re-checked, the more places it can be missed.
One boundary, enforced once, up front, is easier to reason about and far harder to get wrong than a rule sprinkled through a scoring process. Simplicity here is safety.
The honest tradeoff
This design has a real cost, and it's fair to name it. Filtering first can shrink the pool — sometimes a lot. A show that would have been a fantastic fit by meaning, but sits just outside a hard rule, will not appear. The advertiser never sees it. We accept that on purpose. If someone sets a hard rule, we treat it as a genuine boundary, not a hint to be overridden when the machine finds something tempting. The remedy for an over-narrow result is transparent: loosen the rule. It is never to have the system quietly decide the rule didn't really mean it.
What guardrails buy you
The payoff of running rules first and ranking second is confidence on both sides of the marketplace:
- Advertisers can trust that a stated boundary holds — no clever match talks the system past it.
- Creators get matches that are genuinely eligible, not near-misses that get pulled at the last second.
- The intelligence is aimed where it belongs — sorting good options, never deciding what's permitted.
Meaning-based matching gets the headlines, but guardrails are what make it safe to ship. The smart part earns its keep only because the rules always win first.