Classify a message as ham, spam, or phishing (closed enum) with a confidence and the concrete signals behind the verdict — phishing wins when a message is both.
Classify a message as ham, spam, or phishing — with a confidence and the concrete signals behind the call. The distinction that matters: spam is unwanted promotion; phishing is deception to steal credentials or data. When a message is both, phishing wins (it's the more dangerous label), so your pipeline never under-reacts to a credential-harvesting attempt disguised as a promo.
| Entrypoint | Renders | Inputs |
|---|---|---|
system | Verdict definitions + spam-vs-phishing rules + embedded output schema | — |
user | The delimited message | message |
Render system as the system message and user as the user message.
message (string, required) — an email, comment, or DM; may be empty.{
"reasoning": "Impersonates a bank and asks the reader to confirm their password via a link.",
"verdict": "phishing",
"confidence": 0.95,
"signals": ["impersonated sender", "request for password", "urgency pressure"]
}
verdict is a closed enum — exhaustive handling guaranteed by parseOutput(). The published eval asserts verdict == expected.signals name the observable cues (grounded in the message, not outside knowledge).confidence is uncalibrated; lower for short/borderline messages.ham (asserted).<message> delimiter.verdict == expected + schema, deterministic CEL (a small spam/phishing-either allowance on cases where both labels are defensible).Part of the Text Classification collection.