This prompt is built for a specific diagnostic job: auditing a complete, multi-turn production conversation trace to find where the assistant's persona broke down. You should use it when you have a defined persona specification—a document that describes the assistant's tone, formality level, vocabulary constraints, and role boundaries—and a raw log export containing every user and assistant message from a session. The ideal user is a conversation designer, brand safety reviewer, or AI quality engineer who needs to answer the question, 'Where did this assistant stop sounding like itself, and why?' The prompt expects you to provide both the persona spec and the full trace as input; it will not invent a persona for you or guess what the brand guidelines should be.
Prompt
Assistant Persona Drift Over Turns Diagnosis Prompt

When to Use This Prompt
Identify when to deploy the persona drift diagnosis prompt and when to choose a different tool.
This is a runtime trace analysis tool, not a pre-release testing prompt. Use it when you are investigating a specific production session that has already completed. It is not designed for evaluating a single assistant response in isolation, for comparing two different persona drafts during development, or for scoring overall session quality. If you need to test whether a new system prompt holds up against adversarial user inputs before deployment, use a red-teaming or regression testing prompt from the Prompt Injection and Red-Team Tests pillar instead. If you need to evaluate whether a session summary accurately reflects the conversation, use the Session Summary Accuracy Evaluation Prompt from this same content group. This prompt assumes the persona specification is stable and the trace is complete; it will not compensate for a missing or vague persona document.
Before running this prompt, verify that your trace export includes turn-level metadata: speaker labels, timestamps, and the full message body for each turn. The prompt's diagnostic accuracy depends on seeing the complete sequence. If your trace has been truncated, redacted, or summarized, the analysis will be unreliable. Also, be aware that this prompt produces a structured report identifying specific turns and severity levels. That report is a diagnostic artifact, not an automatic fix. After you receive the output, you will still need to decide whether the flagged drifts require a system prompt update, a few-shot example adjustment, a model change, or a human review workflow. For high-risk domains where persona consistency is a safety or compliance requirement, always have a human reviewer validate the prompt's findings before taking action on the flagged turns.
Use Case Fit
Where this prompt works and where it does not.
Good Fit: Structured Trace Review
Use when: you have a complete, turn-by-turn trace export from a multi-turn conversation and need a structured report on persona consistency. Guardrail: The prompt requires explicit turn delimiters and speaker labels; unstructured chat logs will produce unreliable results.
Bad Fit: Real-Time Moderation
Avoid when: you need to block or flag persona drift in a live production stream with sub-second latency. Risk: This prompt is designed for post-hoc forensic analysis, not streaming classification. Guardrail: Use a lightweight classifier for real-time gating and reserve this prompt for offline audit and review queues.
Required Inputs
Requires: a full session trace with user utterances, assistant responses, and turn boundaries. Risk: Missing turns or truncated context will cause false positives where the prompt flags drift that is actually explained by unseen conversation history. Guardrail: Validate trace completeness before invoking the prompt; reject sessions with gaps larger than one turn.
Operational Risk: Over-Flagging
Risk: The prompt may flag legitimate tone adaptation as drift, especially when the assistant correctly mirrors a user's shifting emotional state or formality level. Guardrail: Always pair automated drift flags with human review for high-stakes brand safety decisions; use the prompt's severity scoring to prioritize which sessions to review first.
Operational Risk: Model-Specific Tone Sensitivity
Risk: Different models have different baseline persona stability; a prompt calibrated on one model may over-flag or under-flag drift when used with another. Guardrail: Recalibrate drift thresholds and example anchors when migrating between model families, and maintain a golden set of traces with known drift events for regression testing.
Scale Limit: Cost Per Trace
Risk: Running this prompt on every production session is expensive and unnecessary. Guardrail: Target the prompt at sessions that meet pre-filter criteria: long conversations, user-reported issues, low satisfaction scores, or sessions flagged by lightweight heuristics for tone inconsistency.
Copy-Ready Prompt Template
Paste this prompt into your trace analysis workflow to generate a structured persona consistency report from multi-turn conversation logs.
This prompt template is designed to be copied directly into your trace analysis environment. It instructs the model to act as a persona consistency auditor, reviewing a full multi-turn conversation trace and producing a structured report that flags tone, formality, and role-adherence violations. The template uses square-bracket placeholders that you must replace with actual data before sending the request to the model.
textYou are a persona consistency auditor for conversational AI systems. Your task is to analyze a multi-turn conversation trace and identify every turn where the assistant's persona shifted unexpectedly. Persona is defined by three dimensions: tone (emotional register and warmth), formality (register and politeness level), and role adherence (alignment with the assistant's defined role and behavioral contract). ## INPUT Assistant Role Definition: [ASSISTANT_ROLE_DEFINITION] Expected Persona Profile: - Tone: [EXPECTED_TONE] - Formality: [EXPECTED_FORMALITY] - Role Boundaries: [ROLE_BOUNDARIES] Conversation Trace (JSON array of turns, each with `turn_id`, `speaker`, and `text`): [CONVERSATION_TRACE] ## OUTPUT_SCHEMA Return a JSON object with the following structure: { "session_summary": { "total_turns": <int>, "assistant_turns": <int>, "overall_persona_stability_score": <float 0.0-1.0>, "dominant_observed_tone": <string>, "dominant_observed_formality": <string> }, "drift_events": [ { "turn_id": <string>, "speaker": "assistant", "utterance": <string, the full assistant text for this turn>, "drift_type": "tone" | "formality" | "role_adherence", "expected_behavior": <string, what should have happened>, "observed_behavior": <string, what actually happened>, "severity": "minor" | "moderate" | "severe", "likely_trigger": <string, the preceding user turn or context change that may have caused the drift>, "recovery_attempted": <boolean, whether the assistant corrected itself in a later turn>, "recovery_turn_id": <string | null> } ], "no_drift_turns": [<string, list of turn_ids where persona was stable>], "recommendations": [<string, actionable suggestions for prompt or system changes>] } ## CONSTRAINTS - Only flag turns where the assistant is the speaker. - A drift event must be a clear, observable deviation from the Expected Persona Profile, not a subjective style preference. - If the user's tone shifts dramatically (e.g., becomes hostile or urgent), note whether the assistant adapted appropriately or drifted inappropriately. - If no drift is detected, return an empty `drift_events` array and set `overall_persona_stability_score` to 1.0. - Do not fabricate drift events. If uncertain, exclude the turn from `drift_events` and note the ambiguity in `recommendations`. - Base every finding on the provided trace text. Do not infer user intent or assistant state beyond what is explicitly present.
To adapt this template, replace each square-bracket placeholder with your actual data. [ASSISTANT_ROLE_DEFINITION] should contain the system prompt or role description that defines the assistant's persona. [EXPECTED_TONE], [EXPECTED_FORMALITY], and [ROLE_BOUNDARIES] should be extracted from your persona design document or brand guidelines. [CONVERSATION_TRACE] must be a valid JSON array of turn objects. If your trace format differs, preprocess it to match the expected structure before calling the model. For high-stakes brand safety reviews, always route the output to a human reviewer before accepting persona changes or prompt updates. Run this prompt against a golden set of traces with known drift events to calibrate severity thresholds before deploying it as a monitoring check.
Prompt Variables
Each placeholder must be replaced with real data for the prompt to produce a reliable diagnosis.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[CONVERSATION_TRACE] | Full multi-turn conversation log with speaker labels, timestamps, and turn indices | Turn 1 (User): 'Act as a formal legal advisor...' Turn 2 (Assistant): 'I will proceed with formal analysis...' Turn 5 (Assistant): 'Yeah so basically...' | Must contain at least 3 turns. Validate that speaker labels are consistent and timestamps are sequential. Null not allowed. |
[PERSONA_DEFINITION] | The expected assistant persona specification including tone, formality level, role boundaries, and behavioral policies | Tone: Professional, courteous, and precise. Formality: Formal register. Role: Senior legal analyst. Never use casual language or first-name address. | Must include at least tone and formality fields. Validate against a schema with required keys: tone, formality, role, prohibited_behaviors. Null not allowed. |
[DRIFT_THRESHOLD] | The sensitivity level for flagging persona deviations, controlling false positive rate | medium | Must be one of: low, medium, high. Low catches subtle shifts, high only flags severe breaks. Default to medium if not provided. |
[OUTPUT_SCHEMA] | The expected JSON structure for the diagnosis report | {"drift_events": [...], "overall_score": 0.0-1.0, "summary": "..."} | Must be a valid JSON Schema or example object. Validate that required fields include drift_events, overall_score, and summary. Parse check before prompt assembly. |
[TURN_WINDOW] | The number of consecutive turns to analyze as a sliding window for drift detection | 3 | Must be an integer between 2 and 10. Smaller windows detect rapid shifts, larger windows detect gradual drift. Validate range before prompt execution. |
[EXCLUDED_PATTERNS] | Known acceptable variations that should not be flagged as drift, such as code blocks or quoted user text | ["code_block_output", "verbatim_user_quote", "error_message_response"] | Must be an array of strings matching predefined pattern labels. Validate each label exists in the system's pattern registry. Empty array allowed. |
[REFERENCE_TURNS] | Specific turn indices to use as the persona baseline, overriding automatic baseline detection | [1, 2] | Must be an array of integers within the trace's turn index range. If null, the first 2 turns are used as baseline. Validate indices exist in [CONVERSATION_TRACE]. |
Implementation Harness Notes
How to wire the persona drift diagnosis prompt into a production trace review pipeline or manual audit workflow.
This prompt is designed to operate on a structured trace export, not a live conversation. The implementation harness must first extract and format the relevant turn data—specifically, the assistant's utterances, the system prompt or persona definition active during the session, and any user feedback signals—into the [CONVERSATION_TRACE] placeholder. The harness should also inject the expected persona contract into [PERSONA_DEFINITION], which is typically the system prompt or a separate brand voice document. Without this grounding, the model cannot distinguish between acceptable stylistic variation and true persona drift.
For a production pipeline, wrap this prompt in a validation layer that checks the output against the [OUTPUT_SCHEMA] before accepting it. The schema should enforce that every flagged utterance includes a turn_index, a drift_category from a controlled vocabulary (e.g., formality_shift, role_abandonment, tone_mismatch), and a severity score. A post-processing script should reject any report where a flagged turn does not quote the exact utterance text, as this is a common hallucination pattern. For high-stakes brand safety workflows, route all severity: high findings to a human review queue and log the full prompt and response for auditability. Do not use this prompt to automatically block or retrain a model without human confirmation of the drift diagnosis.
Model choice matters here. Use a model with strong instruction-following and structured output capabilities, such as GPT-4o or Claude 3.5 Sonnet, as smaller models often struggle to maintain the distinction between persona drift and appropriate conversational adaptation. Set temperature to 0 to maximize consistency across repeated runs on the same trace. If the trace exceeds the model's context window, pre-process it by extracting only the assistant's turns and the immediately preceding user turns, discarding verbose tool-call logs or retrieval snippets that are not relevant to persona evaluation. The next step after generating this report is typically to correlate the drift events with other trace signals—such as context window overflow, a change in the system prompt version, or a failed tool call—to identify the root cause.
Expected Output Contract
The model must return a JSON object matching this schema. Validate these fields before accepting the output.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
report_id | string (UUID v4) | Must be a valid UUID v4 string. Generate if not present in [TRACE_METADATA]. | |
analysis_timestamp | string (ISO 8601) | Must parse as a valid ISO 8601 datetime string. Set to current time if missing. | |
trace_identifier | string | Must match the | |
overall_persona_drift_score | number (0.0 - 1.0) | Must be a float between 0.0 and 1.0 inclusive. Higher score indicates more severe drift. | |
drift_events | array of objects | Must be a non-empty array if | |
drift_events[].turn_index | integer | Must be a non-negative integer corresponding to a turn in [TRACE_DATA]. Must be unique within the | |
drift_events[].utterance_snippet | string | Must be a non-empty string containing a direct quote from the assistant's response at | |
drift_events[].drift_category | string (enum) | Must be one of: 'tone_shift', 'formality_shift', 'role_confusion', 'unexpected_opinion', 'policy_contradiction'. Case-sensitive. | |
drift_events[].severity | string (enum) | Must be one of: 'low', 'medium', 'high', 'critical'. Case-sensitive. | |
drift_events[].expected_persona_attribute | string | Must be a non-empty string describing the persona attribute that was violated, referencing the [PERSONA_DEFINITION]. | |
drift_events[].evidence | string | Must be a non-empty string explaining how the | |
no_drift_confidence | number (0.0 - 1.0) | null | If |
Common Failure Modes
What breaks first when diagnosing persona drift across conversation turns and how to guard against it.
Tone Shift Without Trigger
What to watch: The assistant's formality or warmth changes between turns without a corresponding shift in user tone or explicit instruction. This often happens when the model over-indexes on a single user word or when context summarization drops persona cues. Guardrail: Include explicit persona anchors in every turn's system prompt and validate tone consistency with a sliding-window comparison across adjacent turns.
Role Boundary Collapse
What to watch: The assistant starts speaking as if it has authority it was not granted, such as offering medical advice after being instructed to stay within informational boundaries. This often occurs after a user asks a leading question that implies a different role. Guardrail: Add a role-reaffirmation check at the start of each turn's generation and flag outputs that contain verbs outside the permitted action set.
Context Window Persona Dilution
What to watch: As the conversation grows, the system prompt's persona instructions get pushed out of the effective attention window, causing the assistant to revert to a generic helpful tone. This is especially common in long sessions without repeated persona reinforcement. Guardrail: Re-inject a compressed persona summary into the last N tokens of the context window and monitor persona adherence scores as session length increases.
User Mirroring Overcorrection
What to watch: The assistant adapts too aggressively to the user's language style, adopting slang, informality, or emotional intensity that violates brand voice guidelines. This drift is gradual and hard to detect turn-by-turn. Guardrail: Set a minimum formality floor in the system prompt and run a formality classifier on every assistant utterance, triggering review when the score crosses a predefined threshold.
Tool-Call Induced Persona Reset
What to watch: After a tool call or function execution, the assistant's next response loses persona characteristics because the tool result is injected without persona context. The assistant may switch to a terse, factual style that breaks the conversational experience. Guardrail: Append a persona reminder to every tool result before it enters the context window and validate post-tool utterances against the persona baseline.
False Positive Drift Flags
What to watch: The diagnosis prompt flags legitimate persona adaptations as drift, such as when the assistant correctly shifts to a more empathetic tone after a user shares bad news. Over-flagging erodes trust in the monitoring system. Guardrail: Distinguish between justified tone adaptation and unjustified drift by requiring the diagnosis prompt to cite the user's emotional state or explicit request before flagging a shift as anomalous.
Evaluation Rubric
Criteria for testing the quality of a persona consistency report before relying on it for production decisions. Use these checks to validate that the diagnosis correctly identifies drift events, avoids false positives, and provides actionable evidence.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Drift Detection Recall | Report identifies all turns where tone, formality, or role adherence shifted beyond the defined threshold | Known drift turn from a seeded test trace is missing from the report or marked as stable | Inject a trace with 3 known persona shifts and verify all 3 appear in the report output |
Drift Detection Precision | Zero false-positive drift flags on turns where the assistant maintained consistent persona | A turn with consistent tone and role adherence is flagged as a drift event | Run against a golden trace with no persona shifts and assert zero drift flags in the output |
Utterance Evidence Grounding | Every flagged drift turn includes at least one quoted utterance from the trace as supporting evidence | A drift flag appears with no quoted utterance or with a quote that does not match the flagged turn | Parse the report and verify each drift entry contains a non-empty [UTTERANCE_QUOTE] field that exists in the source trace |
Drift Category Accuracy | Each drift event is assigned to the correct category: tone, formality, or role adherence | A formality shift is mislabeled as tone, or a role adherence failure is labeled as formality | Use a seeded trace with one known drift per category and assert the report labels match the expected category for each |
Severity Score Calibration | Severity scores correlate with the magnitude of the shift; minor tone softening scores lower than abrupt role abandonment | A turn where the assistant completely dropped its defined role receives the same severity as a slight formality increase | Compare severity scores across a trace with graded drift severity and verify monotonic ordering of scores |
Turn Number Accuracy | All turn numbers in the report match the actual turn indices in the source trace | A drift event is attributed to turn 5 when the evidence utterance appears in turn 7 | Cross-reference each reported turn number against the source trace and assert exact match |
Report Completeness | Report includes all required fields: summary, drift events list, severity distribution, and recommendations | Output is missing the severity distribution section or the recommendations block | Validate the output against the [OUTPUT_SCHEMA] and assert all required top-level keys are present and non-null |
False Positive Rate Under Load | False positive rate remains below 5% across a batch of 50 stable traces | More than 2 out of 50 stable traces produce at least one drift flag | Run the prompt against a batch of 50 golden traces with no persona shifts and count traces with non-empty drift event arrays |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Use the base prompt with a frontier model and a small sample of conversation traces. Focus on getting the persona drift report structure right before adding heavy validation. Replace [PERSONA_DEFINITION] with a simple list of tone and role attributes. Use [CONVERSATION_TRACE] as a raw JSON array of turns.
Watch for
- Overly broad persona definitions that make every shift look like drift
- Missing turn-level timestamps that prevent temporal analysis
- The model flagging normal conversational adaptation as persona failure

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us