Marketplace listings
“Do not allow weapons, counterfeit goods, or prescription drugs.”
Build custom marketplace moderation rules with a versioned policy and explicit decision handling.
Explainer
Semantic policy enforcement is checking content against a policy written in natural language and turning the result into an explicit, versioned, testable decision. It applies when deciding whether a rule is met requires interpreting meaning.
The problem
A rule such as price > 0 can be checked by ordinary code. A rule such as “no counterfeit goods” cannot: a listing never contains a field called counterfeit. Someone, or something, has to read it and judge. Semantic policy enforcement makes that judgment explicit, inspectable, and testable.
“Do not allow weapons, counterfeit goods, or prescription drugs.”
Build custom marketplace moderation rules with a versioned policy and explicit decision handling.
“Send posts that target a person with harassment to human review.”
Compare moderation categories and custom policies, then use the Antaeus API for the decision.
“A reply must not promise a refund or give medical advice.”
“Deny services in a prohibited category; approve complete, low-risk submissions.”
Where it fits
Authentication answers who. Authorization answers what they may do. Semantic policy enforcement answers whether a specific piece of content or state complies with a policy whose meaning must be interpreted. It complements the other layers; it replaces none of them.
| Approach | Question it answers | Decided by | Best for |
|---|---|---|---|
| Authentication | Who is making the request? | Credentials and identity providers | Proving identity |
| Authorization models and policy engines such as RBAC; OPA or Cedar | May this principal act? Does this structured request or configuration satisfy the rules? | Deterministic rules over structured attributes | Access control and structured policy checks |
| Business rules in code | Do these values satisfy exact conditions? | Ordinary program logic | Anything expressible precisely |
| Prompting a model directly | What does the model conclude about this? | The model decides both the judgment and the outcome, usually without a versioned policy or deterministic reduction | Exploration, drafting, and low-stakes classification |
| Semantic policy enforcement | Does this content comply with a policy that needs interpretation? | An evaluator judges each condition; the policy decides the outcome | Meaning-heavy rules that need attributable, testable decisions |
How a decision is made
defaultOutcome: review
rules:
- id: prohibited-item
when: Offers weapons, counterfeit goods,
or prescription drugs.
outcome: deny
- id: complete-listing
when: Clearly describes a legal item
with its condition and price.
outcome: allow
input "1:1 replica watch … fake certificate"
decision deny
policy marketplace-listing sha256:d1553c7d…
prohibited-item matched → deny
complete-listing not_matched
model gpt-5.4-mini-2026-03-17A real run of the open-source marketplace example, abbreviated; rule conditions are shortened.
Principles
A model’s answer is one input to a decision, not the decision itself. These are recommended practices; Antaeus implements the first four today and treats evaluator comparison and measurement as open work.
Evaluators judge conditions. What happens next is written in the policy, reviewed, and versioned.
Indeterminate and failed judgments become an explicit failure (unless a matched deny applies) that your application can route to a person, never an automatic allow.
Every decision identifies the exact policy version and the evaluator, model, and attempts that produced it.
Named cases with expected outcomes catch regressions when a policy changes; running them against live evaluators when a prompt or model changes is recommended practice.
A provider-neutral boundary should let teams compare evaluators on the same policies and cases.
Quality, review burden, latency, and cost should be measured on representative cases before automation takes over.
Boundaries
Questions
Content moderation is one application. The same approach applies to any policy about meaning, including marketplace rules, support and AI replies, onboarding reviews, and internal compliance checks.
Policy engines such as Open Policy Agent and Cedar evaluate deterministic rules over structured attributes, typically for authorization. Semantic policy enforcement handles conditions that require interpreting unstructured language. The two work well together: authorize the request first, then check the content.
Not blindly. A model’s judgment should be one bounded input: it answers conditions, the policy decides outcomes, uncertainty becomes an explicit failure your application can route to review, and quality is measured on representative cases before any decision is automated.
The condition is recorded as indeterminate or failed, and the decision becomes failure unless a matched deny already applies. Your application can then route it to a person or retry.
No. Antaeus is an open-source implementation that runs locally as a single binary. A credential-free quickstart shows the full decision contract. The experimental semantic evaluator uses your own OpenAI key and sends the policy conditions and input to OpenAI.
Try it
Antaeus is an early, Apache-2.0 open-source implementation of semantic policy enforcement. Install it with brew install antaeusio/tap/antaeusand follow the worked example. Its semantic evaluator is experimental and not yet measured; see the research boundary.