Inferensys

Prompt

Session Risk Report Generation Prompt for Review Queues

A practical prompt playbook for generating structured, human-readable risk review packets from automated session scoring data, designed for operations teams managing safety review queues.
Risk analyst performing AI risk assessment on laptop, risk matrices visible, casual office risk session.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the operational context, ideal user, and boundaries for the Session Risk Report Generation Prompt.

This prompt is for trust-and-safety operations teams who need to convert raw, multi-turn session risk scores into a structured review packet that a human reviewer can act on. It takes automated scoring outputs—cumulative risk scores, turn-level violation flags, and policy triggers—and produces a narrative summary with a risk timeline, key evidence turns, policy citations, and recommended actions. The primary job-to-be-done is creating a consistent, auditable brief that sits between automated detection and human decision-making, ensuring reviewers have exactly the information they need without reading the full session transcript.

Use this when your automated detection pipeline has flagged a session for review and you need a standardized report format that reduces reviewer cognitive load and decision variance. The prompt expects structured input: a session ID, a cumulative risk score, a list of turn-level risk events with timestamps and policy tags, and any confidence or ambiguity metadata from upstream classifiers. It is not designed for real-time intervention or inline chat moderation. It is a post-session or near-real-time report generation step that assumes the detection system has already made a preliminary escalation decision. If you need a prompt that decides whether to escalate, use the Session Risk Escalation Path Decision Prompt instead.

Do not use this prompt when the input lacks structured risk scores or turn-level evidence, when the reviewer needs the full transcript rather than a summary, or when the decision requires legal or medical expertise beyond policy enforcement. The output is a decision-support artifact, not a final determination. Always route the generated report to a human reviewer for the final action. For regulated domains, ensure the report includes an evidence trail that links each policy citation to a specific turn and that the reviewer's decision is logged separately from the AI-generated summary.

PRACTICAL GUARDRAILS

Use Case Fit

Where this prompt fits in a production safety workflow and where it does not.

01

Good Fit: Human Review Queues

Use when: operations teams need structured, human-readable risk summaries from automated session scoring before making a decision. Guardrail: the prompt produces a review packet, not an automated action. Always keep a human in the loop for final determination.

02

Bad Fit: Real-Time Blocking

Avoid when: latency requirements are sub-second or the decision must be fully automated. Guardrail: this prompt is designed for asynchronous review queues. For real-time gating, use the Session Risk Score Escalation Prompt Template instead.

03

Required Inputs

What you must provide: a complete session transcript, per-turn risk scores, detected pattern labels, and the active safety policy version. Guardrail: missing any of these inputs produces an incomplete audit trail. Validate input completeness before calling the prompt.

04

Operational Risk: Reviewer Over-Reliance

What to watch: reviewers may rubber-stamp the AI-generated summary without examining raw evidence. Guardrail: the output must include direct quotes and turn references. Require reviewers to confirm at least one evidence citation per decision.

05

Operational Risk: Stale Policy Citations

What to watch: the prompt may reference an outdated policy version, leading to incorrect action recommendations. Guardrail: include the policy version hash in the input and output. Add a pre-generation check that the policy version matches the current production policy.

06

Operational Risk: Incomplete Session Context

What to watch: truncated or filtered session transcripts can hide exculpatory turns, biasing the report toward escalation. Guardrail: the prompt must flag when the input transcript appears incomplete or when turns have been redacted. Surface this flag prominently in the review packet.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A copy-ready template for generating a structured session risk review packet from automated scoring data, ready for human review queues.

This template is designed to be the final step in an automated session-risk pipeline. It takes the raw output from upstream classifiers—cumulative risk scores, detected probing patterns, policy violation ledgers, and tool-access denial events—and synthesizes them into a single, human-readable review packet. The goal is to give a trust-and-safety operator everything they need to make a decision without hunting through logs. Replace every square-bracket placeholder with data from your own risk scoring services before sending this prompt to the model.

text
You are a session risk report generator for a trust-and-safety operations team. Your task is to produce a structured review packet from automated session risk scoring data.

## INPUT DATA
- Session ID: [SESSION_ID]
- User ID: [USER_ID]
- Session Duration: [SESSION_DURATION]
- Total Turns: [TOTAL_TURNS]
- Cumulative Risk Score: [CUMULATIVE_RISK_SCORE] (scale: [RISK_SCALE_MIN]-[RISK_SCALE_MAX])
- Risk Score Trajectory: [RISK_TRAJECTORY]
- Escalation Triggers Fired: [ESCALATION_TRIGGERS]
- Detected Probing Patterns: [DETECTED_PATTERNS]
- Policy Violation Ledger: [POLICY_VIOLATION_LEDGER]
- Tool Access Denial Events: [TOOL_ACCESS_DENIAL_EVENTS]
- Context Poisoning Flags: [CONTEXT_POISONING_FLAGS]
- Session Termination Status: [TERMINATION_STATUS]

## OUTPUT SCHEMA
Generate a JSON object with the following structure. Do not include any text outside the JSON.
{
  "packet_id": "string, a unique ID for this review packet",
  "session_summary": {
    "session_id": "string",
    "risk_level": "string, one of: LOW, MEDIUM, HIGH, CRITICAL",
    "recommended_action": "string, one of: DISMISS, REVIEW, ESCALATE, TERMINATE_AND_REPORT",
    "summary_sentence": "string, a one-sentence executive summary of the session risk"
  },
  "risk_timeline": [
    {
      "turn_number": "integer",
      "turn_risk_score": "number",
      "key_event": "string, description of what happened this turn",
      "policy_citations": ["string, policy IDs violated"]
    }
  ],
  "key_evidence": [
    {
      "turn_number": "integer",
      "user_message_excerpt": "string, a short, verbatim excerpt from the user",
      "risk_indicator": "string, why this excerpt is risky"
    }
  ],
  "policy_violation_summary": [
    {
      "policy_id": "string",
      "violation_count": "integer",
      "severity": "string, one of: MINOR, MODERATE, SEVERE"
    }
  ],
  "detected_adversarial_patterns": [
    {
      "pattern_name": "string",
      "confidence": "number between 0 and 1",
      "evidence_turns": ["integer, list of turns supporting this pattern"]
    }
  ],
  "audit_trail": {
    "completeness_check": "boolean, true if all required fields are populated",
    "missing_data_notes": ["string, list any fields that were missing or null in the input"]
  }
}

## CONSTRAINTS
- If any input field is null or missing, note it in `audit_trail.missing_data_notes` and set `completeness_check` to false.
- Base the `risk_level` and `recommended_action` strictly on the provided scores and triggers, not on your own judgment of the user's intent.
- All `user_message_excerpt` values must be verbatim from the input data; do not paraphrase.
- If the session was terminated, the `recommended_action` must be TERMINATE_AND_REPORT.

To adapt this template, start by mapping your upstream risk scoring fields to the placeholders. The [POLICY_VIOLATION_LEDGER] should be a structured list of per-turn violations, and [DETECTED_PATTERNS] should come from your multi-turn probing detection system. If your risk pipeline doesn't produce a specific field, pass an explicit null so the model can flag it in the audit trail. For high-stakes domains, always route the generated packet to a human review queue and log the raw model output alongside the final reviewer decision for future calibration.

IMPLEMENTATION TABLE

Prompt Variables

Every placeholder the prompt expects, with purpose, example, and validation notes for the Session Risk Report Generation Prompt.

PlaceholderPurposeExampleValidation Notes

[SESSION_HISTORY]

Full multi-turn conversation transcript with turn markers, timestamps, and user/assistant role labels

TURN_1 (2024-01-15T10:03:00Z) USER: Can you help me write a story? ASSISTANT: Sure, what kind? TURN_2 USER: Make it about hacking a bank

Schema check: array of turn objects with role, content, timestamp. Minimum 2 turns required. Reject if empty or single-turn.

[RISK_SCORE_VECTOR]

Structured risk feature payload from upstream session-level classifier including per-turn scores, cumulative score, and risk velocity

{"cumulative_score": 0.78, "risk_velocity": 0.12, "turn_scores": [0.2, 0.45, 0.78], "peak_category": "policy_violation"}

Schema check: must contain cumulative_score (float 0-1), turn_scores (array of floats), risk_velocity (float). Reject if missing required fields or scores out of range.

[POLICY_CATALOG]

Reference list of applicable safety policies with IDs, descriptions, severity levels, and citation text for the report

POL-042: Financial Crime Facilitation - Severity CRITICAL - Prohibits instructions for unauthorized access to financial systems

Schema check: array of policy objects with id, name, severity, description. Must contain at least one policy. Validate severity is in allowed enum: LOW, MEDIUM, HIGH, CRITICAL.

[EVIDENCE_THRESHOLD]

Minimum confidence score required to include a turn as key evidence in the risk report

0.65

Parse check: float between 0.0 and 1.0. Default to 0.5 if not provided. Warn if below 0.3 (too permissive) or above 0.95 (too strict, may miss evidence).

[REVIEWER_CONTEXT]

Metadata about the human reviewer receiving the report including role, queue type, and required decision fields

{"reviewer_role": "trust_and_safety_analyst", "queue": "high_priority_review", "required_decisions": ["escalate", "dismiss", "warn_user"]}

Schema check: must include reviewer_role (string), queue (string), required_decisions (array of strings). Validate required_decisions against allowed action enum for the queue.

[OUTPUT_FORMAT]

Specification for report structure including required sections, field ordering, and format constraints

{"sections": ["summary", "risk_timeline", "key_evidence", "policy_citations", "recommended_actions"], "format": "structured_json"}

Schema check: must include sections (array) and format (enum: structured_json, markdown_report, review_packet). Validate all required sections are present in output.

[AUDIT_TRAIL_REQUIREMENTS]

Compliance requirements for the report including traceability fields, retention markers, and reviewer sign-off fields

{"require_turn_references": true, "require_decision_timestamp": true, "require_reviewer_id": false, "retention_period_days": 90}

Schema check: boolean fields for traceability requirements. Validate that output includes all fields marked true. Warn if retention_period_days is null or zero.

[ESCALATION_RULES]

Threshold-based rules mapping cumulative risk scores and policy severity to recommended actions

[{"condition": "cumulative_score >= 0.8 AND any_policy_severity == CRITICAL", "action": "immediate_termination"}, {"condition": "cumulative_score >= 0.6", "action": "human_review_required"}]

Schema check: array of rule objects with condition (string) and action (string). Validate conditions parse correctly and actions match allowed escalation actions. Test with sample score vectors.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Session Risk Report Generation prompt into a production safety review pipeline with validation, retry, logging, and human-review integration.

The session risk report prompt is not a standalone artifact—it is a component in a larger safety review pipeline. The prompt expects a structured [SESSION_RISK_DATA] payload that upstream classifiers produce, including cumulative risk scores, turn-by-turn violation flags, and extracted evidence. Before the prompt ever runs, validate that the input payload conforms to the expected schema: required fields such as session_id, risk_trajectory, violation_ledger, and escalation_triggers must be present and non-null. If the upstream scoring system cannot produce a complete payload, the pipeline should short-circuit with a DATA_INCOMPLETE error rather than feeding partial data into the report generator and producing a misleading summary.

Wire the prompt into an application harness that enforces a strict output contract. After the model returns a response, parse the output against the [OUTPUT_SCHEMA]—typically a JSON object containing report_id, risk_summary, timeline, key_evidence_turns, policy_citations, recommended_actions, and completeness_checks. Run a validator that confirms every required field is present, evidence turns reference actual turn indices from the input session, policy citations map to a known policy registry, and recommended actions are drawn from an allowed enum (CONTINUE, WARN, RESTRICT_TOOLS, HUMAN_REVIEW, TERMINATE). If validation fails, retry once with the validation errors appended to the prompt as [CONSTRAINTS] feedback. If the second attempt also fails, log the failure, flag the session for manual review, and do not surface an unvalidated report to a human reviewer.

Logging and audit trail requirements are non-negotiable for this workflow. Every report generation event should write an immutable log entry containing: the input payload hash, the model and prompt version used, the raw model output, the validation result, any retry attempts, and the final report that reached the review queue. This audit trail serves two purposes: it enables post-incident review when a reviewer questions a report's accuracy, and it provides the evidence chain required for compliance reviews. Store these logs in a tamper-evident system and retain them according to your organization's data governance policy. Do not log raw session transcripts in the same system if they contain PII or sensitive user content—instead, log a content hash and store the transcript in a separate access-controlled store.

Human review integration is the final stage. When the validated report enters the review queue, attach the report alongside the original session transcript and a reviewer decision form. The form should capture the reviewer's action (uphold, override, escalate), any notes, and a timestamp. Feed reviewer decisions back into the system: upheld reports confirm the prompt's output quality, overrides should trigger a review of the upstream risk scoring thresholds, and escalations should update the session risk model's training data. Avoid the common failure mode of treating the AI-generated report as the final word—the report is a decision support artifact, and the human reviewer remains the authority. If your review queue volume exceeds human capacity, invest in better upstream classifiers and threshold tuning rather than removing the human from the loop for high-risk sessions.

IMPLEMENTATION TABLE

Expected Output Contract

Structured JSON fields the Session Risk Report Generation Prompt must return. Each field includes type constraints, requirement status, and a validation rule that can be enforced in the application harness before the report enters a human review queue.

Field or ElementType or FormatRequiredValidation Rule

report_id

string (UUID v4)

Must parse as valid UUID v4. Reject on missing or malformed.

session_id

string

Must match the [SESSION_ID] input exactly. Reject on mismatch.

generated_at

string (ISO 8601 UTC)

Must parse as valid ISO 8601 datetime in UTC. Reject if in the future or unparseable.

risk_timeline

array of objects

Array length must be >= 1. Each object must contain turn_number (integer >= 1), risk_score (float 0.0-1.0), and event_description (non-empty string). Reject if any required field is missing or out of range.

key_evidence_turns

array of integers

Array length must be >= 1. Each integer must correspond to a turn_number present in risk_timeline. Reject if any referenced turn is missing.

policy_citations

array of strings

Array length must be >= 1. Each string must match a known policy ID from [POLICY_CATALOG]. Reject if any citation is unrecognized.

recommended_action

string (enum)

Must be one of: continue, warn, restrict_tools, human_review, terminate. Reject on unrecognized value.

reviewer_decision_support

object

Must contain summary (non-empty string), ambiguity_flags (array of strings, can be empty), and confidence (float 0.0-1.0). Reject if summary is empty or confidence is out of range.

PRACTICAL GUARDRAILS

Common Failure Modes

Session risk report generation fails in predictable ways when moving from single-turn evaluation to multi-turn audit packets. These are the failure modes that surface first in production review queues.

01

Incomplete Audit Trail

What to watch: The generated report omits key evidence turns, policy citations, or decision timestamps required by compliance reviewers. Missing audit elements force manual reconstruction of the session and delay review decisions. Guardrail: Include a completeness checklist in the prompt output schema that validates every required field—risk timeline, evidence turns, policy citations, recommended actions—before the report enters the review queue.

02

Risk Score Drift Across Turns

What to watch: The cumulative risk score in the report does not match the per-turn scoring that triggered escalation. Reviewers see inconsistent risk narratives that undermine trust in the automated scoring pipeline. Guardrail: Require the prompt to reconcile the final risk score with the turn-by-turn trajectory, flagging any divergence with an explicit reconciliation note and confidence adjustment.

03

Evidence Selection Bias

What to watch: The report cherry-picks the most alarming turns while omitting benign context or mitigating signals, producing a skewed risk narrative that biases reviewer decisions toward escalation. Guardrail: Instruct the prompt to include both inculpatory and exculpatory evidence turns, with explicit weighting notes so reviewers can assess the full session picture.

04

Policy Citation Hallucination

What to watch: The generated report references policy sections, rule numbers, or enforcement guidelines that do not exist or do not apply to the detected behavior. Reviewers act on fabricated policy authority. Guardrail: Provide a canonical policy reference list in the prompt context and require the model to quote policy text verbatim rather than paraphrasing or inventing section numbers.

05

Recommended Action Overreach

What to watch: The report recommends actions—termination, tool denial, account suspension—that exceed the reviewer's authority or the policy's prescribed escalation path, creating operational confusion and potential over-enforcement. Guardrail: Constrain recommended actions to a predefined action catalog with severity-to-action mappings, and require the prompt to justify each recommendation against that catalog.

06

Reviewer Context Overload

What to watch: The report dumps the full session transcript and every risk signal into an unprioritized packet, forcing reviewers to reconstruct the narrative themselves and increasing time-to-decision. Guardrail: Structure the output with an executive summary, ranked evidence by risk contribution, and a decision-support matrix that surfaces the most actionable information first.

IMPLEMENTATION TABLE

Evaluation Rubric

Score each criterion on a 0-2 scale before this prompt ships to your review queue. A score of 0 means the output fails the standard and requires rework. A score of 2 means the output meets or exceeds the standard. Use this rubric on a sample of at least 20 generated reports across varied risk profiles before deployment.

CriterionPass StandardFailure SignalTest Method

Risk Timeline Completeness

Every turn in [SESSION_HISTORY] with a risk score above [RISK_THRESHOLD] appears in the timeline with timestamp, score, and trigger reason

Timeline omits a high-risk turn or includes turns with no risk evidence

Automated diff: extract turn IDs from timeline, compare against source session turns filtered by threshold

Evidence Turn Citation Accuracy

Each cited evidence turn includes the exact turn index, user message excerpt, and the policy clause it violates

Citation references a turn that does not exist in [SESSION_HISTORY] or misattributes content to the wrong turn

Parse citations, validate turn index bounds, check excerpt substring match against source turn text

Policy Citation Correctness

Every policy citation maps to a valid entry in [POLICY_CATALOG] with correct clause ID and description

Policy citation references a non-existent clause or applies a clause that does not match the violation type

Cross-reference cited clause IDs against [POLICY_CATALOG] schema; spot-check 5 random citations for semantic fit

Recommended Action Validity

Recommended action is drawn from [ACTION_OPTIONS] enum and is consistent with cumulative risk score and policy severity matrix

Action recommends 'terminate' for low-risk sessions or 'continue' when risk score exceeds termination threshold

Validate action against [ACTION_OPTIONS] enum; assert action severity level correlates with risk score band

Audit Trail Completeness

Report includes all required fields: report_id, generation_timestamp, session_id, reviewer_assignee, risk_score_total, escalation_triggered flag, and decision rationale

Any required field is null, missing, or populated with a placeholder value

Schema validation against [OUTPUT_SCHEMA]; null check on required fields; timestamp format validation

Risk Score Traceability

Cumulative risk score is decomposed into per-turn contributions with weights, and the sum matches the reported total within a tolerance of 0.01

Total score does not equal sum of per-turn contributions or decomposition is missing

Parse per-turn scores, sum them, compare to reported total; flag discrepancies exceeding tolerance

Reviewer Decision Support Quality

Report includes a concise summary of the most salient risk evidence, ambiguity flags where intent is unclear, and a clear decision question for the human reviewer

Summary is generic, omits key evidence, or fails to flag ambiguity on mixed-intent sessions

Human eval on 10 reports: reviewer rates whether they can make a decision within 60 seconds using only the report

Escalation Trigger Accuracy

Escalation flag is set to true if and only if cumulative risk score crosses [ESCALATION_THRESHOLD] or a [CRITICAL_POLICY_VIOLATION] is detected

Flag is false when threshold is exceeded, or true when no threshold breach or critical violation exists

Automated check: compare escalation flag against risk score and critical violation detection output

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a frontier model and minimal output validation. Focus on getting the risk summary structure right before adding strict schema enforcement. Replace [POLICY_CITATIONS] with a flat list of policy names rather than full policy text. Set [REVIEWER_DECISION_SUPPORT] to a simple checklist of recommended actions.

Watch for

  • Missing evidence turns in the risk timeline
  • Overly broad policy citations that don't match the actual violation
  • The model inventing risk scores instead of using the input [SESSION_RISK_SCORE]
  • No completeness check on required audit fields
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.