# Chat & Forum Moderation

Chat and forum platforms need to moderate user-generated content at scale — beyond just gating account creation, every message or post is a fresh opportunity for spam, abuse, or scams.

## What you're defending against

- **Spam and bot-generated content** — repetitive or scripted posts.
- **Phishing and malicious links** — messages designed to redirect users elsewhere.
- **Hate speech and threatening language.**
- **Policy violations** — prohibited topics, promotional scams, and similar.

## Recommended configuration

1. **Score every message with [Classifier](/docs/sentinel/features/classifier/#using-the-api)** — send the message text (and optional metadata like the sender's email or IP) to `POST /v1/classifier` and act on the returned `classification`/`score`. This alone catches most spam patterns, injection attempts, and — via the `URL` rule — links to known-phishing domains (see [Phishing Detection](/docs/sentinel/features/phishing-detection/)).
2. **Use [Similarity & Training Data](/docs/sentinel/features/similarity-training-data/)** to catch reworded variants of spam you've already seen — feed confirmed spam messages into a training-data group (e.g. `chat_spam`), and match new messages against it with `partial: true` for short messages.
3. **Add a [Rate Limiter](/docs/sentinel/features/rate-limiters/)** on the message-posting endpoint to slow down flooding, independent of content scoring.
4. **Keep improving the training set** — route user-reported messages (or anything a moderator confirms as spam/abuse) back into your Similarity groups, so detection gets better over time instead of staying static.

## Integration steps

1. Capture the message/post server-side before it's published.
2. Send it to the Classifier API, with `groups`/`examples` for [Similarity](/docs/sentinel/features/similarity-training-data/) matching in the same request if you have a training set.
3. Compare the returned score against your own threshold: publish immediately, hold for moderator review, or block outright.
4. When a moderator confirms something as spam or abuse, add it to your training data so similar messages are caught automatically next time.

## Related

- [Classifier](/docs/sentinel/features/classifier/) — the core scoring engine this is built on.
- [Similarity & Training Data](/docs/sentinel/features/similarity-training-data/)
- [Phishing Detection](/docs/sentinel/features/phishing-detection/)
- [Secure Form Submissions](/docs/sentinel/use-cases/secure-form-submissions/)
