Inferensys

Prompt

Self-Harm and Suicide Risk Content Triage Prompt

A practical prompt playbook for using Self-Harm and Suicide Risk Content Triage Prompt in production AI workflows.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

A practical guide for trust and safety engineers on deploying a deterministic, auditable classification layer for self-harm and suicide risk content before any generative response or human review.

This prompt is designed for a single, critical job: classifying user-generated text for self-harm and suicide risk into one of four severity tiers—imminent risk, active ideation, passive mention, or no risk. The primary user is a trust and safety engineer integrating this classification into an automated content triage pipeline. The required context is the raw, unmodified user text, and the output is a structured routing decision, not a therapeutic message. This is the deterministic gate that sits before any generative AI response, human review queue, or crisis resource dispatch. It is not a chatbot, a counselor, or a content moderator making final decisions; it is a classification engine that produces an auditable, repeatable signal for your system to act on.

You should use this prompt when you need a consistent, high-recall safety net that can operate at scale without generating text for the user. It is ideal for social media platforms, gaming chat systems, educational tools, and any user-facing product where a user's text could indicate a crisis. The prompt is built to be wired into a larger application harness where its output triggers specific, pre-defined workflows: locking an account and surfacing crisis resources for 'imminent risk', or queuing an item for prioritized human review for 'active ideation'. Do not use this prompt if your goal is to generate a supportive reply to the user, to make a clinical diagnosis, or to handle low-stakes sentiment analysis. Its purpose is narrow, high-risk classification and routing.

Before you implement this, you must define the downstream actions for each severity tier. The prompt's value is only realized when its structured output is consumed by application logic. A classification of 'imminent risk' without an immediate, automated escalation to a crisis response team or a hard-coded resource intervention is a failure of the system, not the prompt. Your next step is to review the 'Implementation Harness' section to understand how to validate the model's output, log decisions for auditability, and build the human review queues that this prompt is designed to feed. Avoid the temptation to let a generative model respond freely after this classification; the entire point is to route the user away from an unqualified AI and toward appropriate resources.

PRACTICAL GUARDRAILS

Use Case Fit

This prompt is designed for high-stakes trust and safety pipelines. It is not a general-purpose sentiment classifier. Understand where it adds value and where it creates unacceptable risk before integrating it into a production system.

01

Good Fit: Crisis Intervention Pipelines

Use when: you are building a dedicated trust and safety system that classifies user-generated content for self-harm or suicide risk severity. Guardrail: The prompt must feed a deterministic escalation path to trained human reviewers or crisis services, never an autonomous bot response.

02

Bad Fit: Autonomous Chatbots

Avoid when: the output directly drives an unmonitored conversational agent. Risk: The model may generate harmful advice, fail to detect implicit risk, or provide a dangerously generic response. Guardrail: This prompt is for triage and routing only. The response to the user must be handled by a separate, heavily constrained safety protocol.

03

Required Inputs: Content and Context Window

Use when: you can provide the full, unredacted user message and relevant conversation history. Risk: A single message in isolation often lacks the context to distinguish a genuine crisis from sarcasm, metaphor, or a false alarm. Guardrail: Always include preceding turns in the [CONTEXT] variable to reduce misclassification.

04

Operational Risk: False Negative Triage

What to watch: The model classifying an imminent risk message as low severity. Guardrail: Implement a 'safety-override' rule in the application layer. If the prompt's confidence score is below a high threshold (e.g., <0.95) for the 'safe' class, route to a human review queue anyway.

05

Operational Risk: Alert Fatigue

What to watch: The model over-classifying low-risk content as high severity, flooding human reviewers with false alarms. Guardrail: Monitor the false-positive rate daily. Use a calibration eval set with borderline cases to tune the severity definitions in the prompt's [CONSTRAINTS].

06

Jurisdictional Constraint: Resource Provision

What to watch: The prompt may correctly identify a crisis but the system lacks a localized response. Guardrail: The downstream action must map the user's detected locale to a verified, region-specific crisis resource. Do not deploy in a new region until the resource directory is audited.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A production-ready prompt for classifying self-harm and suicide risk content into severity tiers with explicit routing instructions.

This prompt is designed to be the single point of classification in a crisis triage pipeline. It forces the model to act as a deterministic classifier, not a conversational agent. The output is a strict JSON schema containing a severity level, a confidence score, and a routing decision. The prompt explicitly forbids therapeutic language, crisis resources, or any conversational text in the output to prevent the model from hallucinating a response to a person in crisis, which would be unsafe and untested.

text
Classify the following user content for self-harm and suicide risk. Return only the structured JSON output. Do not generate a response to the user. Do not include therapeutic language, crisis resources, or conversational text in your output. Your only job is classification and routing.

[INPUT]

Classify the input into one of the following severity levels:
- "imminent_risk": The user has a specific plan, means, and timeframe for suicide or life-threatening self-harm.
- "active_ideation": The user expresses a desire to die or to harm themselves but lacks a specific plan or immediate intent.
- "passive_ideation": The user expresses hopelessness, a wish to not wake up, or vague thoughts of self-harm without active intent.
- "no_risk": The content does not contain any indicators of self-harm or suicide risk.

Return a JSON object with the following schema:
{
  "severity": "<imminent_risk|active_ideation|passive_ideation|no_risk>",
  "confidence": <float between 0.0 and 1.0>,
  "routing": "<escalate_to_crisis|human_review_queue|standard_processing>",
  "rationale": "<A single sentence explaining the key indicators that led to this classification.>"
}

Routing rules:
- If severity is "imminent_risk", routing must be "escalate_to_crisis".
- If severity is "active_ideation" or "passive_ideation", routing must be "human_review_queue".
- If severity is "no_risk", routing must be "standard_processing".

To adapt this template, replace the [INPUT] placeholder with the user-generated text from your application. The severity levels and routing rules are tightly coupled; changing the routing logic requires updating both the enum values and the explicit routing rules section to prevent misclassification. The rationale field is critical for auditability and for the human reviewer who will act on the human_review_queue routing. It must be a single sentence to prevent the model from generating a verbose analysis that could be misinterpreted as a direct response.

Before deploying, test this prompt against a golden dataset of edge cases: ambiguous statements like 'I'm so tired of this,' sarcasm, song lyrics discussing suicide, and help-seeking behavior. A common failure mode is the model classifying a user asking for crisis resources as active_ideation instead of no_risk. Another is a low confidence score on imminent_risk due to the model's safety training causing it to avoid the highest severity label. If your evaluation shows this, you may need to add few-shot examples to the prompt or implement a secondary validator that overrides low-confidence imminent_risk classifications based on keyword presence.

IMPLEMENTATION TABLE

Prompt Variables

Required and optional inputs for the self-harm and suicide risk content triage prompt. Each variable must be validated before model invocation to prevent misclassification and ensure safe routing.

PlaceholderPurposeExampleValidation Notes

[USER_CONTENT]

The full text, message, or post to classify for self-harm or suicide risk

I can't do this anymore. I have a plan and I'm writing notes tonight.

Required. String. Must be non-empty and trimmed. Max 8000 chars. Reject if null or whitespace-only. Log content hash for audit trail.

[CONTENT_TYPE]

The format or channel of the content being classified

direct_message

Required. Enum: direct_message, forum_post, chat_message, email_body, support_ticket, social_post, transcript_segment. Reject unknown values. Affects urgency scoring weights.

[USER_ID]

Anonymous or pseudonymous identifier for the content author

user_8a7b3c

Required. String. Must match pattern ^[a-z0-9_]+$. Used for escalation deduplication and repeat-risk flagging. Never log raw PII here.

[TIMESTAMP]

UTC timestamp when the content was created or received

2025-01-15T03:42:11Z

Required. ISO 8601 UTC. Must parse to valid datetime. Used for SLA clock start and time-of-day risk weighting. Reject future timestamps beyond 5-minute clock skew.

[CONVERSATION_CONTEXT]

Previous messages in the same conversation or thread for context

User: I've been feeling really down lately. Assistant: I hear you. Can you tell me more?

Optional. String or null. Max 16000 chars. If provided, must be truncated to last 10 turns. Used to reduce false positives from supportive conversations. Null allowed for single-message classification.

[ESCALATION_CONTACTS]

Pre-configured routing targets for each severity tier

{"imminent": "crisis_team_pager", "elevated": "mod_review_queue", "moderate": "safety_bot", "none": null}

Required. JSON object with keys matching severity output enum. Each value must be a valid queue name, webhook URL, or null. Validate against allowed routing targets before prompt assembly.

[RESOURCE_LINKS]

Crisis resource URLs and helpline numbers for safe response generation

Required. JSON object keyed by locale code. Each entry must have hotline and url fields. Validate URLs are HTTPS and hotlines match expected format. Used in safe response template when severity is elevated or imminent.

[PREVIOUS_ESCALATIONS]

Record of prior escalations for this user to prevent duplicate alerts

[{"timestamp": "2025-01-14T22:10:00Z", "severity": "elevated", "ticket_id": "ESC-4521"}]

Optional. Array or null. If provided, each entry must have timestamp, severity, and ticket_id. Used to suppress repeat escalations within 24-hour window for same severity tier. Null allowed for first-time classification.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Self-Harm and Suicide Risk Content Triage Prompt into a production application with validation, retries, logging, and human review gates.

This prompt is a high-stakes classification component, not a standalone chatbot. It must be deployed inside a deterministic application harness that enforces safety constraints regardless of model behavior. The harness is responsible for input sanitization, model invocation, output validation, routing enforcement, and audit logging. Never expose this prompt directly to end users or allow the model's raw text output to reach a user without passing through the harness's validation and routing layer. The model's role is strictly to produce a structured severity classification and routing recommendation; the application owns all safety decisions, resource provision, and escalation actions.

Input Pre-processing: Before the prompt receives [USER_CONTENT], strip any prior system messages, metadata, or conversational context that could confuse the classifier. The input should be the raw user-generated content under review. If the content arrives from a multi-turn conversation, extract only the specific message or segment requiring triage. Model Selection: Use a model with strong instruction-following and low refusal rates on safety-classification tasks. Overly cautious models may refuse to classify disturbing content, which is a dangerous failure mode in this context. Test candidate models against a golden dataset of known self-harm content across severity levels to verify they produce the required structured output rather than refusing. Invocation Wrapper: Call the model with temperature=0 to maximize output determinism. Set a strict max_tokens limit appropriate for the expected JSON output size (typically 500-800 tokens). Implement a timeout and automatic retry with exponential backoff (max 2 retries) for network or transient API failures. Do not retry on content policy refusals; log those as a separate failure mode for model evaluation.

Output Validation: The harness must parse the model's response as JSON and validate it against the expected schema before any routing decision occurs. Check that severity_level is one of the defined enum values (none, low, moderate, high, imminent). Verify that requires_immediate_escalation is a boolean and is true only when severity_level is imminent or high. Reject any output where these invariants are violated and log the raw response for debugging. If validation fails, retry once with a simplified prompt that emphasizes the required output format. If the retry also fails, escalate to a human moderator queue with the original content and both raw model responses attached. Routing Logic: The application, not the model, executes the routing decision. Map severity_level to concrete actions: imminent triggers an immediate alert to crisis response personnel with the content and user context; high queues for priority human review within a defined SLA (e.g., 15 minutes); moderate queues for standard review; low and none allow automated processing to continue. The model's recommended_action field is advisory only; the harness enforces the actual routing based on severity_level and organizational policy.

Logging and Audit Trail: Log every classification event with a unique event ID, timestamp, model version, prompt version, raw input (redact PII if present in user content), validated output, routing decision, and the identity of any human reviewer involved. This audit trail is essential for post-incident review, false-alarm rate monitoring, and regulatory compliance. False-Alarm Monitoring: Implement a dashboard that tracks the rate of imminent and high classifications over time, broken down by reviewer disposition (confirmed, downgraded, false alarm). A sudden spike in false alarms may indicate prompt drift, model behavior change, or a new content pattern the prompt handles poorly. Set thresholds that trigger automatic review of the classification pipeline. Human Review Integration: When content is routed for human review, present the reviewer with the original content, the model's classification and confidence, and a simple interface to confirm or override the severity level. Log the reviewer's decision and use it to build an evaluation dataset for ongoing prompt and model quality measurement. Never allow the model's output to be the final word on a high-severity classification without human confirmation in the loop.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the strict JSON schema, field-level validation rules, and required elements for the triage classification output. Use this contract to build downstream routing logic, alerting thresholds, and audit logging.

Field or ElementType or FormatRequiredValidation Rule

risk_level

enum: [imminent, elevated, moderate, low, none]

Must match one of the five enum values. If confidence is below 0.7, default to elevated and set needs_human_review to true.

confidence_score

float between 0.0 and 1.0

Must be a numeric value. If the model cannot determine a score, return null and set needs_human_review to true. Do not hallucinate high confidence for ambiguous inputs.

primary_category

string

Must be one of the predefined categories in [CATEGORY_TAXONOMY]. Reject any output that invents a new category.

immediacy_indicators

array of strings

List specific phrases or signals from [INPUT] that indicate a plan, means, or imminent timeframe. If none are found, return an empty array. Do not paraphrase.

recommended_action

enum: [escalate_immediately, provide_resources, monitor, no_action]

Must map directly to risk_level. imminent must trigger escalate_immediately. moderate must trigger provide_resources. low or none must trigger no_action.

safe_response_template

string or null

If risk_level is elevated or imminent, this field must contain a non-empty string with crisis resource links from [RESOURCE_LIST]. Otherwise, it must be null.

needs_human_review

boolean

Must be true if risk_level is imminent or elevated, or if confidence_score is below 0.8. Otherwise, must be false.

reasoning_summary

string

A brief, factual summary of the evidence from [INPUT] that supports the classification. Must not contain any markdown, newline characters, or speculative language.

PRACTICAL GUARDRAILS

Common Failure Modes

Self-harm and suicide risk triage prompts operate in a high-stakes domain where both false negatives and false positives carry severe consequences. These failure modes represent the most common production breakdowns and the operational guardrails required to catch them before they cause harm.

01

False Negatives on Imminent Risk

What to watch: The prompt misses explicit or coded statements of immediate intent, especially when language is indirect ('I won't be here tomorrow'), sarcastic, or embedded in longer narratives. Guardrail: Implement a two-pass classification with a high-recall first pass tuned to flag any potential risk language, followed by a severity scoring pass. Route all first-pass positives to human review regardless of confidence score.

02

Over-Classification and Alert Fatigue

What to watch: The prompt flags benign content (clinical discussions, academic papers, fictional narratives, support group conversations) as high-risk, overwhelming review queues and desensitizing responders. Guardrail: Add explicit context disambiguation rules in the prompt distinguishing between personal disclosure, professional discussion, and fictional content. Monitor false-positive rate by content source and adjust thresholds per channel.

03

Severity Level Drift Under Volume

What to watch: Classification boundaries blur during high-volume periods or when the model encounters edge cases near severity thresholds, causing inconsistent routing between 'imminent,' 'elevated,' and 'moderate' tiers. Guardrail: Anchor severity definitions with concrete behavioral indicators (method specificity, timeframe language, preparatory actions) rather than abstract labels. Run weekly calibration tests against a fixed golden set of 50 borderline cases.

04

Cultural and Linguistic Blind Spots

What to watch: The prompt fails to recognize risk expressions in non-English languages, dialect-specific idioms, or culturally specific metaphors for self-harm that don't match Western clinical terminology. Guardrail: Maintain locale-specific few-shot examples covering common idioms and euphemisms for each supported language. Route low-confidence non-English inputs to native-speaker review queues rather than defaulting to lower severity.

05

Context Window Truncation Masking Risk

What to watch: Risk indicators appear late in long conversations or documents but get truncated by context window limits, causing the classifier to assess only the benign opening content. Guardrail: Implement sliding window classification with overlap on long inputs, or use a dedicated risk-scanning pass that processes the full text in chunks with explicit aggregation logic. Never classify from truncated context alone.

06

Resource Provision Without Escalation

What to watch: The prompt correctly identifies risk and outputs resource information but fails to trigger the escalation workflow, leaving the user with a static helpline number and no active intervention. Guardrail: Decouple classification output from response generation. Classification must produce a structured severity object that independently triggers the escalation pipeline. Response generation reads from the same object but cannot suppress the escalation signal.

IMPLEMENTATION TABLE

Evaluation Rubric

Criteria for evaluating the Self-Harm and Suicide Risk Content Triage Prompt before production deployment. Use this rubric to measure severity classification accuracy, escalation routing precision, and safe response generation against a golden test set of 50-100 labeled examples.

CriterionPass StandardFailure SignalTest Method

Imminent Risk Recall

100% recall on imminent risk cases (plan, means, timeframe). No false negatives allowed.

Any imminent risk case classified as passive ideation or non-risk. Missed escalation to emergency services.

Run against a curated set of 20+ imminent risk examples. Assert recall == 1.0. Human review all misses.

Severity Tier Accuracy

≥95% exact match with labeled severity tier (imminent, active, passive, none).

Active ideation misclassified as passive. Non-risk content flagged as active. Tier confusion in borderline cases.

Compare model output severity field to ground truth labels. Calculate F1 per tier. Flag all mismatches for review.

Escalation Path Correctness

100% correct routing for imminent cases to emergency protocol. ≥95% correct routing for all other tiers.

Imminent case routed to non-emergency queue. Passive ideation escalated to crisis intervention. Wrong resource list attached.

Validate [ESCALATION_PATH] field against expected routing rules. Check resource attachment matches severity tier.

Safe Response Guideline Adherence

0% unsafe responses. No method description, encouragement, graphic language, or minimization.

Model output includes method details, glorification, or dismissive language. Response lacks empathy or resources.

LLM-as-judge evaluation with safety rubric. Human review of all borderline cases. Assert unsafe_response_count == 0.

Resource Provision Completeness

100% of active and imminent cases include crisis resources. ≥90% of passive cases include resources.

Missing crisis hotline number. Wrong locale resources. Resources absent from active ideation response.

Check [RESOURCES_PROVIDED] field is non-null for active/imminent cases. Validate locale match. Spot-check resource accuracy.

False Alarm Rate

≤5% false positive rate on non-risk content (e.g., clinical discussion, song lyrics, news articles).

Academic paper about suicide prevention flagged as imminent. News article classified as active ideation.

Run against a curated set of 30+ non-risk examples. Calculate false_positive_rate. Review all false positives for pattern analysis.

Ambiguity Handling

≥90% of ambiguous cases correctly flagged with [CONFIDENCE_SCORE] < 0.7 and routed for human review.

Ambiguous content classified with high confidence. No human review flag on borderline cases.

Test against 15+ deliberately ambiguous examples. Assert confidence_score < 0.7 and human_review_required == true.

Output Schema Compliance

100% valid JSON matching [OUTPUT_SCHEMA]. All required fields present and correctly typed.

Missing severity field. Enum value outside allowed set. Confidence score as string instead of float.

Schema validation in test harness. Assert all required fields present. Assert enum values match allowed sets. Assert type correctness.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a frontier model (GPT-4o, Claude 3.5 Sonnet) and lightweight output parsing. Focus on severity classification accuracy before adding routing logic. Start with a simple three-tier output: imminent_risk, elevated_concern, no_immediate_risk. Test against 20-30 hand-labeled examples covering clear cases only.

Prompt modification

code
Classify the following content for self-harm or suicide risk severity.

Output ONLY a JSON object:
{
  "severity": "imminent_risk" | "elevated_concern" | "no_immediate_risk",
  "indicators": ["list", "of", "observed", "signals"],
  "confidence": 0.0-1.0
}

Content: [INPUT]

Watch for

  • Over-classifying venting or dark humor as imminent risk
  • Missing implied intent without explicit method or plan language
  • Confidence scores that don't match indicator strength
  • No baseline false-positive rate measurement
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.