> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moderationapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How the casebook rules

> How remembered decisions settle content, when the casebook deliberately declines, and how to test it

A casebook match always rules **allow** or **reject** — never review. Whatever it
can't settle goes to your [review inbox](/review/overview) as usual, so the casebook
only ever removes work, never hides it.

## Two ways to a ruling

* **Recognition.** The exact message has been ruled on before, so the same ruling
  applies without a review.
* **Agreement among close cases.** The content is very similar to several existing
  cases, and enough of them agree — "96% of its close cases agree, and that is enough
  to rule."

<Frame>
  <img className="block" src="https://mintcdn.com/moderationapi/ig89jGx6tNc_MAYy/images/casebook-lookup.png?fit=max&auto=format&n=ig89jGx6tNc_MAYy&q=85&s=7878951440c2b80cc41f5737baa692bd" alt="A lookup result: the casebook would reject the message, with the closest cases and their similarity" width="1400" height="900" data-path="images/casebook-lookup.png" />
</Frame>

Every ruling shows its evidence: the closest cases, each with a similarity
percentage, its ruling, who decided it, and its topic.

### Cases vote only on what they were flagged for

A case's ruling is scoped by the labels your policies flagged on it. A rejection
flagged for spam only counts as precedent for content flagged for spam — in a
lookup's evidence, a case that didn't participate reads *sat out — flags differ*, and
one that's too far off reads *not close enough to count*.

This is what makes corrected resubmissions safe: content close to rejected cases but
missing the flag that got them rejected goes to a person instead of inheriting the
rejection.

### Cautious in one direction

Overriding your policies takes more evidence than agreeing with them. The casebook is
quick to learn rules that are *stricter* than your policies — things your team
rejects that they let through — and deliberately slow to allow content they flagged
hard.

## When it declines to rule

Declining is a feature, not a failure. The casebook sends content to review when:

| Situation                   | What the casebook says                                         |
| --------------------------- | -------------------------------------------------------------- |
| Nothing similar exists      | "Your casebook has not seen anything like this."               |
| Matches aren't close enough | "No cases close enough to apply."                              |
| Evidence is thin            | "Close cases agree, but there are not enough of them yet."     |
| Cases conflict              | "Your cases disagree about content like this."                 |
| A new flag appeared         | "Close to allowed cases, but flagged for something new."       |
| The old reason is gone      | "Close to rejected cases, but their reason no longer applies." |

<Frame>
  <img className="block" src="https://mintcdn.com/moderationapi/ig89jGx6tNc_MAYy/images/casebook-lookup-thin.png?fit=max&auto=format&n=ig89jGx6tNc_MAYy&q=85&s=1d9af5859780c706b48d2e573838751b" alt="A lookup that declines to rule: close cases agree but there are not enough of them yet, 58% of the way to ruling on its own" width="1400" height="900" data-path="images/casebook-lookup-thin.png" />
</Frame>

When evidence is thin, the result shows how far along the casebook is — "58% of the
way to ruling on its own" — so you know a few more decisions will settle content like
this.

If the casebook can't answer within its time budget, moderation simply proceeds
without it. It can only ever add a ruling, never delay one.

## Test your casebook

**Look up** on the Casebook page opens a test dialog: paste any message, pick a
channel, and see how your casebook would rule — the verdict, what your policies
flagged, and the closest cases. Testing never teaches it anything.

When the lookup finds nothing, **Add this as a case** teaches the decision on the
spot.

## Precedent while you review

<Frame>
  <img className="block" src="https://mintcdn.com/moderationapi/ig89jGx6tNc_MAYy/images/casebook-bookmark.png?fit=max&auto=format&n=ig89jGx6tNc_MAYy&q=85&s=36e023fa6b46b88f772c7ee7f0b3de8e" alt="The casebook bookmark pulled out beside an item, showing the ruling and the closest cases" width="1400" height="900" data-path="images/casebook-bookmark.png" />
</Frame>

In the item detail view, a **Casebook** tab sits at the right edge. Pull it out and it
shows what your casebook makes of the item on screen — the same answer the lookup
gives, with each case one click from the item it was decided on. Leave it out and it
answers for every item you open. It reads and never writes: your queue decisions are
still what the casebook learns from.

## In the API response

When the casebook has a verdict for a request, the moderation response carries a
`casebook` object — the verdict, how close and how unanimous the supporting cases
were, and the topic they belong to. See
[checking the casebook](/content-moderation/acting-on-responses#check-the-casebook)
for the field reference and code examples.

Whether the verdict was *enforced* depends on the channel's Casebook lookup rule —
when it was, `recommendation.reason_codes` contains `casebook_match`, and the item
shows **Casebook lookup** as its outcome in the dashboard.
