Inferensys

Prompt

Prompt Injection Severity Scoring Rubric Prompt

A practical prompt playbook for using the Prompt Injection Severity Scoring Rubric Prompt in production AI security workflows.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the operational context, required inputs, and boundaries for the Prompt Injection Severity Scoring Rubric Prompt.

This prompt is designed for incident responders and security leads who need a consistent, repeatable severity score for a confirmed prompt injection event. It is not a detection prompt. It assumes that a prior detection workflow—such as a production trace classifier, a red-team tool, or a manual review—has already identified and isolated a specific injection trace. The job-to-be-done is triage and escalation: taking a validated injection trace and producing a structured severity level, a justification grounded in a defined rubric, and a clear escalation recommendation that can feed into incident management systems and stakeholder notifications.

The ideal user is a security engineer or AI operations lead who has access to the full trace context, including the system prompt, user input, tool calls, retrieved documents, and model output. The prompt requires a structured input payload containing the injection trace, the known system prompt, and any relevant policy documents. It evaluates the event across four axes: data exposure (what data was visible to the attacker), tool misuse (what actions were taken or attempted), user impact (who was affected and how), and policy violation (which internal policies were breached). The output is a severity level (e.g., CRITICAL, HIGH, MEDIUM, LOW, NONE), a structured justification with evidence citations, and an escalation recommendation. Do not use this prompt for real-time blocking decisions; it is a post-detection analysis tool. Do not use it without a confirmed injection—feeding it benign traces will produce misleading severity scores.

Before using this prompt, ensure you have a validated injection trace and a defined severity rubric that maps to your organization's incident response tiers. The prompt template includes placeholders for your rubric criteria, escalation paths, and output schema. Wire the output into your incident management pipeline by parsing the severity level and escalation recommendation into automated ticket creation or alert routing. Always require human review for CRITICAL and HIGH severity events, and log every scoring result for auditability. If your organization lacks a formal injection severity rubric, start by defining one in terms of data sensitivity levels, tool risk classifications, and user impact categories before adapting this prompt.

PRACTICAL GUARDRAILS

Use Case Fit

Where this severity scoring rubric works, where it fails, and what you must have in place before relying on it.

01

Good Fit: Post-Detection Triage

Use when: a confirmed injection event has been flagged by a detection system and needs a consistent severity rating for the incident queue. Guardrail: always run this prompt after a binary detection step; never use it as the primary detector.

02

Bad Fit: Real-Time Blocking

Avoid when: latency is measured in milliseconds and the system must block or allow a request inline. Guardrail: this rubric requires full trace context and multi-factor reasoning. Use lightweight classifiers for inline decisions and reserve this prompt for async incident review.

03

Required Input: Complete Trace Span

What to watch: scoring without the full trace—system prompt, user input, tool calls, retrieved documents, and model output—produces unreliable severity levels. Guardrail: enforce a trace completeness check before invoking the rubric. Reject partial traces with an INSUFFICIENT_EVIDENCE result.

04

Required Input: Defined Rubric Dimensions

What to watch: vague or missing severity criteria lead to inconsistent scoring across incidents. Guardrail: define concrete dimensions—data exposure level, tool misuse impact, user harm potential, policy violation type—with clear level descriptors before deploying the prompt.

05

Operational Risk: Score Drift Over Time

What to watch: rubric interpretation shifts as reviewers calibrate differently or new attack patterns emerge. Guardrail: periodically run a golden set of scored traces through the rubric and compare outputs. Flag drift exceeding one severity level for recalibration.

06

Operational Risk: Escalation Threshold Gaps

What to watch: a severity score without a clear escalation contract leaves incidents unactioned. Guardrail: pair every severity level with an SLA—who must respond, within what time, and with what authority. The rubric output must include an escalation_recommendation field mapped to your incident response policy.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt that scores a confirmed injection trace against a defined severity rubric and returns a structured escalation recommendation.

This prompt template is designed to be injected into your incident response pipeline after a trace has been confirmed as a prompt injection event. It expects a structured trace payload and a pre-defined severity rubric as input. The model's job is not to detect the injection—that step must already be complete—but to apply consistent scoring logic, produce a structured justification, and recommend an escalation path. Replace each square-bracket placeholder with data from your upstream detection and trace extraction systems before sending the prompt to the model.

text
You are a security incident severity assessor. Your task is to score a confirmed prompt injection event against a defined rubric and produce a structured severity assessment.

## INPUT
- Injection Trace: [INJECTION_TRACE]
- Severity Rubric: [SEVERITY_RUBRIC]
- System Prompt (for context): [SYSTEM_PROMPT]
- Affected Tool Definitions (if any): [TOOL_DEFINITIONS]
- Data Sensitivity Classification: [DATA_SENSITIVITY_LEVEL]

## OUTPUT SCHEMA
Return a single JSON object with these fields:
- severity_level: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "INFO"
- severity_score: integer between 0 and 100
- data_exposure_impact: "CONFIRMED_EXFILTRATION" | "POTENTIAL_EXPOSURE" | "NO_EXPOSURE" | "INCONCLUSIVE"
- tool_misuse_impact: "UNAUTHORIZED_EXECUTION" | "SCHEMA_PROBE" | "NO_MISUSE" | "INCONCLUSIVE"
- user_impact: "MULTI_TENANT" | "SINGLE_USER" | "NO_IMPACT" | "UNKNOWN"
- policy_violations: array of strings naming violated policies
- justification: string explaining the score with specific evidence from the trace
- escalation_recommendation: "IMMEDIATE_INCIDENT_RESPONSE" | "SECURITY_REVIEW_REQUIRED" | "MONITOR_ONLY" | "NO_ACTION"
- human_review_required: boolean
- confidence: float between 0.0 and 1.0

## CONSTRAINTS
- Only use evidence present in the provided trace. Do not speculate about unseen events.
- If the trace contains insufficient evidence to determine a field, use "INCONCLUSIVE" or "UNKNOWN" rather than guessing.
- When data sensitivity is "HIGH" or "CRITICAL," default human_review_required to true unless the evidence clearly shows no exposure.
- If tool_misuse_impact is "UNAUTHORIZED_EXECUTION," severity_level must be at least "HIGH."
- Justification must cite specific trace spans, tool call IDs, or retrieved document chunks.
- Do not include remediation steps in the justification. Those belong in a separate incident response workflow.

## EXAMPLES
[FEW_SHOT_EXAMPLES]

## RISK LEVEL
[RISK_LEVEL]

Adapt this template by replacing the placeholders with data from your production trace pipeline. The [INJECTION_TRACE] should be a structured representation of the full trace—span IDs, tool calls, retrieved documents, user inputs, and model outputs—not raw log lines. The [SEVERITY_RUBRIC] must be your organization's pre-defined scoring criteria, included inline so the model applies it consistently rather than improvising. The [FEW_SHOT_EXAMPLES] placeholder should contain 2–4 scored examples that demonstrate how your team maps trace evidence to severity levels. If your rubric changes, update the examples to prevent drift. The [RISK_LEVEL] field allows you to pass a runtime risk context (e.g., "production-critical-endpoint" or "internal-testing") that can influence the escalation recommendation without hardcoding it into the prompt.

Before deploying this prompt into an automated pipeline, validate that the output JSON conforms to the schema using a strict validator. Reject and retry any response where severity_level does not match the allowed enum or where justification lacks specific trace citations. For CRITICAL or HIGH severity events, always route to a human reviewer regardless of the model's human_review_required boolean—the model's recommendation is advisory, not authoritative. Log every scored assessment alongside the trace ID and the model version for auditability. If you observe scoring inconsistency across similar traces, review your few-shot examples and rubric wording before adjusting the prompt.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Prompt Injection Severity Scoring Rubric. Each placeholder must be populated from the confirmed injection trace before scoring.

PlaceholderPurposeExampleValidation Notes

[INJECTION_TRACE]

Full trace log of the confirmed injection event, including all spans, tool calls, and model responses

JSON trace export from LangSmith or equivalent observability platform

Must be valid JSON. Must contain at least one span flagged as injection. Null or empty trace aborts scoring.

[SYSTEM_PROMPT]

The exact system prompt active during the injection event for comparison against leaked or subverted instructions

Full system prompt string as deployed at the time of the trace

Required for instruction leakage assessment. If unavailable, set leakage-related fields to null and flag in justification.

[TOOL_DEFINITIONS]

Schema definitions for all tools available to the model during the trace, including function names, parameters, and descriptions

JSON array of tool schemas matching the model's function-calling format

Required for tool misuse scoring. If tools were not available, set tool-misuse fields to false and note in justification.

[DATA_CLASSIFICATION_POLICY]

Policy document defining data sensitivity levels, PII categories, and exfiltration rules for the deployment environment

Internal policy string or reference document ID

Required for data exposure severity scoring. If unavailable, use default classification of all user-visible data as PII and flag for policy review.

[ESCALATION_THRESHOLDS]

Configurable thresholds mapping severity levels to escalation actions, including response time SLAs and reviewer roles

JSON object with severity-to-action mapping and SLA minutes

Must define at least LOW, MEDIUM, HIGH, and CRITICAL levels. Missing thresholds default to human-review-required for HIGH and above.

[USER_IMPACT_CONTEXT]

Metadata about the affected user session, including authentication state, role, and data access scope

Session metadata object with user ID, role, and auth level

Required for user impact scoring. If unavailable, assume authenticated user with standard data access and flag for verification.

[PREVIOUS_INJECTION_EVENTS]

List of prior injection events from the same session or user for cumulative risk assessment

Array of previous event IDs or null if first occurrence

Null allowed for first events. If provided, must include event timestamps and severity scores for trend analysis.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the severity scoring prompt into an incident response pipeline with validation, logging, and escalation guardrails.

This prompt is designed to operate as a post-detection scoring step inside an incident response or trace-review pipeline. It should never be the first stage of a pipeline; it assumes a confirmed injection event has already been identified by an upstream detector. The harness must enforce this dependency: the prompt should only be invoked when a detection system has flagged a trace with a confidence score above a configurable threshold and a human or automated triage step has confirmed the event is not a false positive. Wiring the scorer directly to raw user inputs without a detection gate will produce noisy severity scores on benign traffic and erode trust in the escalation logic.

Input assembly requires three data objects before the prompt is called: the full trace span or session log (the [TRACE_DATA] placeholder), the detection verdict from the upstream classifier (the [DETECTION_VERDICT] placeholder, including the attack vector and confidence), and the organization's severity rubric definitions (the [RUBRIC_DEFINITIONS] placeholder, mapping levels like LOW, MEDIUM, HIGH, CRITICAL to concrete criteria for data exposure, tool misuse, user impact, and policy violation). The harness should validate that all three inputs are non-empty and that the rubric definitions contain at least the four required severity levels before making the model call. If the rubric is missing or incomplete, the harness must abort and log a configuration error rather than allowing the model to invent severity thresholds.

Model choice and output validation are critical because this prompt produces a structured decision that may trigger automated escalation. Use a model with strong instruction-following and JSON output reliability (GPT-4o, Claude 3.5 Sonnet, or equivalent). Set response_format to json_object where the API supports it, and always validate the output against the expected schema before acting on it. The harness must check that severity_level is one of the rubric's defined levels, that justification is non-empty, and that escalation_recommendation is a boolean. If validation fails, retry once with the validation error message appended to the prompt as a correction hint. If the retry also fails, log the failure, set the severity to a safe default (e.g., HIGH with escalation_recommendation: true), and flag the trace for manual review. Never silently accept a malformed severity score.

Logging and audit trail requirements are non-negotiable for security workflows. Every invocation must log: the trace ID, the upstream detection verdict, the complete prompt sent to the model, the raw model response, the validated severity output, any validation errors or retries, and the final escalation decision. These logs serve as the audit evidence for why a particular trace was escalated or dismissed. Store logs in an append-only system with retention aligned to your incident response policy. For regulated environments, ensure the logs do not inadvertently capture user PII from the trace data; apply redaction to the [TRACE_DATA] field before logging if necessary.

Escalation integration should connect the validated severity output to your incident management system (PagerDuty, Jira, Slack webhooks, etc.). The harness should read escalation_recommendation and severity_level together: a CRITICAL severity with escalation_recommendation: true should trigger an immediate page; a HIGH severity should create a high-priority ticket; MEDIUM should queue for review during business hours; LOW can be logged for trend analysis without active alerting. The harness must also respect a human-review override: if the upstream detector flagged the trace as human_review: true, the severity scorer's output should be treated as advisory and routed to a human analyst regardless of the computed severity. This prevents the scorer from accidentally downgrading an event that a human already determined needs attention.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the required JSON output schema for the severity scoring prompt. Use this contract to validate the model's response before routing to escalation pipelines or incident records.

Field or ElementType or FormatRequiredValidation Rule

severity_level

enum: CRITICAL | HIGH | MEDIUM | LOW | NONE

Must match exactly one of the five defined severity levels. Reject any response with a different or misspelled value.

severity_score

integer (0-100)

Must be an integer between 0 and 100 inclusive. Reject non-integer values or scores outside the range. Score must be consistent with severity_level per the rubric mapping.

justification_summary

string (max 500 chars)

Must be a non-empty string summarizing the primary reason for the assigned severity. Reject empty strings or summaries exceeding 500 characters.

impact_assessment

object

Must contain exactly four sub-fields: data_exposure, tool_misuse, user_impact, policy_violation. Each sub-field must be an enum: CONFIRMED | SUSPECTED | NONE. Reject missing or invalid sub-fields.

data_exposure

enum: CONFIRMED | SUSPECTED | NONE

Must be one of the three allowed values. Reject any other string.

tool_misuse

enum: CONFIRMED | SUSPECTED | NONE

Must be one of the three allowed values. Reject any other string.

user_impact

enum: CONFIRMED | SUSPECTED | NONE

Must be one of the three allowed values. Reject any other string.

policy_violation

enum: CONFIRMED | SUSPECTED | NONE

Must be one of the three allowed values. Reject any other string.

escalation_recommendation

enum: IMMEDIATE_ESCALATION | REVIEW_WITHIN_1_HOUR | REVIEW_WITHIN_24_HOURS | LOG_ONLY | NO_ACTION

Must match exactly one of the five escalation levels. Reject any response with a different or misspelled value.

evidence_citations

array of strings

Must be a non-empty array of strings, each citing a specific trace span ID, tool-call ID, or log line that supports the assessment. Reject empty arrays or arrays containing non-string elements.

trace_id

string

Must match the [TRACE_ID] provided in the input. Reject if missing or if the value does not match the input trace identifier.

analyst_notes

string (max 1000 chars) or null

If provided, must be a string not exceeding 1000 characters. Accept null. Reject strings exceeding the character limit.

PRACTICAL GUARDRAILS

Common Failure Modes

When scoring injection severity, these failures distort results and delay incident response. Each card pairs a common breakdown with a concrete guardrail you can implement before the rubric reaches production.

01

Severity Inflation from Surface-Level Signals

What to watch: The model assigns a high severity score because the injection payload contains alarming keywords (e.g., 'delete all records') even though no tool had the capability to execute the action. The rubric overweights the attacker's intent and ignores the system's actual blast radius. Guardrail: Require the rubric to evaluate impact against available tool capabilities and actual data access, not hypothetical worst cases. Include a 'capability boundary check' step before final severity assignment.

02

Inconsistent Scoring Across Similar Incidents

What to watch: Two injection traces with nearly identical payloads and tool-call outcomes receive different severity scores because the rubric's criteria are too vague. Terms like 'significant data exposure' or 'moderate tool misuse' are left undefined, causing drift between reviewers and across time. Guardrail: Anchor every severity level to countable thresholds (e.g., 'tool invoked with user-controlled arguments,' 'data returned to user,' 'external URL in tool arguments'). Test the rubric against 5-10 historical traces and measure inter-rater agreement before deployment.

03

Ignoring Multi-Turn Attack Progression

What to watch: The rubric scores a single trace span in isolation and misses that the injection was a setup step for a later exfiltration. A low-severity initial payload (e.g., 'list files') is scored as informational, but the full session shows it was reconnaissance before a data exfiltration tool call. Guardrail: Require the scoring prompt to ingest the full session trace, not just the flagged span. Add a 'multi-turn context' field that forces the model to consider whether the current event is part of a larger attack chain before finalizing the score.

04

Over-Reliance on Model Confidence Without Evidence Anchoring

What to watch: The model produces a severity score with high confidence but the justification cites vague trace features ('the input looked suspicious') instead of specific, auditable evidence. Incident responders can't verify the score or defend it in a post-incident review. Guardrail: Require the output schema to include a mandatory 'evidence log' array where each justification claim is tied to a specific trace span ID, tool-call index, or retrieved document chunk. Reject scores that lack trace-anchored citations.

05

Escalation Threshold Misalignment with Operational Reality

What to watch: The rubric recommends human escalation for every medium-severity event, overwhelming on-call responders with alerts that don't require immediate action. Alternatively, it fails to escalate a high-severity event because the rubric's escalation criteria don't match the team's actual incident response policy. Guardrail: Decouple severity scoring from escalation logic. The rubric should produce a severity level and a structured justification. A separate, configurable escalation policy maps severity levels to alert channels, on-call rotations, and SLA timers. Test escalation thresholds against a week of production traces before locking them in.

06

Data Sensitivity Blindness in Exfiltration Scoring

What to watch: The rubric treats all data exfiltration equally, scoring a tool call that returned public documentation the same as one that returned customer PII. The severity score doesn't reflect the actual sensitivity of the data that was accessed or transmitted. Guardrail: Integrate a data classification reference into the scoring prompt. If the trace includes tool-call results or retrieved documents, the rubric must cross-reference the data against a sensitivity taxonomy (e.g., public, internal, confidential, restricted) and weight the severity score accordingly. Flag traces where data classification is unknown for human review.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the prompt's output quality before shipping. Each criterion defines a pass standard, a failure signal, and a concrete test method. Run these checks on a sample of 10-20 confirmed injection traces and adjust the prompt until all criteria pass consistently.

CriterionPass StandardFailure SignalTest Method

Severity Level Assignment

Output severity level matches the rubric definition (Critical, High, Medium, Low, Informational) and aligns with the trace's actual impact on data exposure, tool misuse, user impact, and policy violation.

Severity level is missing, uses a non-standard label, or is clearly misaligned with the evidence in the trace (e.g., marking a data exfiltration event as Low).

Run 10 traces with known severity labels from a security engineer. Compare prompt output to ground truth. Require exact match on Critical and High; allow one-level deviation on Medium/Low. Target 90% agreement.

Structured Justification Completeness

Justification block includes all required fields: data_exposure_rating, tool_misuse_rating, user_impact_rating, policy_violation_rating, and a summary_sentence that synthesizes the ratings.

Any required field is missing, null, or contains only a placeholder value. Summary sentence is generic or does not reference the specific trace events.

Schema validation check: parse output as JSON and assert all required keys are present and non-null. Manual spot-check: read 5 justifications and confirm each summary sentence mentions at least one specific trace event (e.g., tool call name, retrieved document ID).

Evidence Grounding

Every rating in the justification is supported by at least one specific trace event cited by span ID, timestamp, or log line. No rating is asserted without evidence.

A rating is stated without any trace reference, or the cited evidence does not support the rating (e.g., citing a benign tool call as evidence of tool misuse).

For 10 outputs, extract all cited trace references. Cross-reference each against the original trace. Flag any rating that lacks a citation or where the cited event does not match the rating claim. Target zero unsupported ratings.

Escalation Recommendation Accuracy

Escalation recommendation (escalate, review, ignore) is consistent with the severity level and the defined escalation thresholds in the prompt's [ESCALATION_POLICY].

Recommendation contradicts the severity level (e.g., Critical severity with ignore recommendation) or ignores the policy thresholds.

Define a test policy with explicit thresholds (e.g., Critical and High → escalate; Medium → review; Low and Informational → ignore). Run 10 traces and assert the recommendation matches the policy for each severity level. Target 100% policy compliance.

Output Schema Compliance

Output is valid JSON matching the [OUTPUT_SCHEMA] exactly: top-level keys are severity, justification, escalation_recommendation, and trace_references. No extra keys. All enum values match allowed lists.

Output is not valid JSON, contains extra top-level keys, uses an enum value outside the allowed list, or nests fields incorrectly.

Parse output with a JSON schema validator using the exact schema from the prompt. Run on 20 outputs. Target zero schema violations. If a violation occurs, check if the prompt's schema instructions are being overridden by the model's default behavior.

Handling of Ambiguous Traces

When the trace contains conflicting signals (e.g., suspicious input but no tool misuse), the justification acknowledges the ambiguity and the severity level defaults to a conservative rating (Medium or Review) rather than overconfident Low.

Ambiguous traces are assigned Low severity with high confidence, or the justification ignores conflicting evidence entirely.

Curate 5 ambiguous traces with known mixed signals. Check that outputs include language like 'uncertain', 'conflicting evidence', or 'requires human review'. Assert severity is Medium or higher. Target 100% conservative handling on ambiguous cases.

Refusal to Score Non-Injection Traces

When given a trace with no injection indicators, the output either returns a severity of Informational with a clear statement that no injection was detected, or explicitly refuses to score with a reason.

The prompt assigns a severity of Low or higher to a clearly benign trace, or hallucinates injection indicators that are not present in the trace.

Run 5 benign traces (normal user requests, expected tool calls). Assert that all outputs are either Informational severity or a structured refusal. Target zero false positives on benign traces.

Latency and Token Budget

Prompt completes within 15 seconds and uses fewer than 2000 output tokens for a single trace analysis.

Prompt exceeds 30 seconds or produces more than 4000 output tokens, indicating verbose justifications or model indecision.

Measure end-to-end latency and token count on 20 runs. Flag any run exceeding thresholds. If failures occur, consider adding a [CONSTRAINTS] section limiting justification length or instructing the model to be concise.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base rubric prompt with a single model call and manual trace input. Replace [RUBRIC_DEFINITIONS] with a simplified 3-level scale (Low/Medium/Critical). Accept free-text justification instead of structured JSON.

Watch for

  • Inconsistent severity assignments across similar traces
  • Missing escalation recommendations when severity is clearly Critical
  • Over-reliance on model's internal knowledge of injection types without trace evidence
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.