This prompt is for regulated-industry engineers and compliance teams who must assemble audit packets proving that an AI system followed its governing rules during a specific conversation session. The job-to-be-done is not debugging a single bad output, but producing a defensible, evidence-backed compliance report that shows which policy instructions were active, when they were triggered, and whether the model adhered to each constraint. The ideal user is an engineer or auditor who already has access to the full conversation trace, the system prompt, and any policy instruction versions that were deployed at the time of the session. Without this complete context, the prompt cannot produce a reliable compliance report.
Prompt
Session-Level Instruction Compliance Evidence Prompt

When to Use This Prompt
Define the job, reader, and constraints for the Session-Level Instruction Compliance Evidence Prompt.
Use this prompt when you need to demonstrate to an internal reviewer, external auditor, or regulator that instruction compliance was maintained throughout a session. It is appropriate for post-hoc review of high-stakes interactions, such as financial advice sessions, clinical documentation workflows, or legal intake conversations. The prompt works best when the instruction hierarchy is well-defined—meaning you have clear separation between system instructions, developer directives, user messages, tool outputs, and policy constraints—and when you can provide the exact text of each instruction layer. If your instruction architecture is ad-hoc or undocumented, this prompt will surface that gap rather than paper over it.
Do not use this prompt for real-time intervention or live guardrail enforcement. It is designed for offline audit analysis, not for blocking actions mid-session. It is also not a substitute for a proper instruction regression test suite; use the Instruction Regression Test Audit Prompt for pre-release validation. If you need to debug why a single decision went wrong, the Decision Provenance Extraction Prompt is a more targeted tool. This prompt assumes you are auditing an entire session for compliance completeness, which requires a higher evidence standard and more structured output. Always route the final report through human review before submitting it as regulatory evidence, and ensure that the conversation trace and instruction versions are archived alongside the report for independent verification.
Use Case Fit
Where the Session-Level Instruction Compliance Evidence Prompt delivers reliable audit packets and where it introduces unacceptable risk.
Good Fit: Regulated Industry Audit Packets
Use when: assembling evidence for internal or external auditors that a specific conversation session complied with all active policy instructions. Guardrail: the output is a structured compliance report, not a legal opinion. Always require human review before submission to a regulator.
Bad Fit: Real-Time Policy Enforcement
Avoid when: you need to block a non-compliant action before it happens. This prompt is a post-hoc forensic tool. Guardrail: pair this with a real-time guardrail prompt that intercepts tool calls and responses during the session, not after.
Required Input: Complete Session Trace
What to watch: the prompt cannot audit what it cannot see. If tool outputs, intermediate reasoning, or instruction versions are missing from the trace, compliance gaps will be invisible. Guardrail: log the full instruction stack, tool calls, and model responses per turn before running this audit.
Operational Risk: Instruction Version Drift
Risk: if the system prompt was updated mid-session, the audit may apply the wrong instruction version to early turns, producing a false-positive compliance report. Guardrail: include instruction version metadata per turn in the trace. The prompt must match each turn to its active instruction set.
Operational Risk: Fabricated Evidence Citations
Risk: the model may cite a policy instruction that was never actually triggered or fabricate a tool output to support a compliance claim. Guardrail: every evidence citation in the report must be programmatically verified against the raw trace before the audit packet is sealed.
Bad Fit: Single-Turn Decision Review
Avoid when: you only need to audit one model decision. This prompt is designed for full-session analysis and will produce unnecessary overhead for a single turn. Guardrail: for single-decision audits, use the lighter-weight Decision Provenance Extraction Prompt instead.
Copy-Ready Prompt Template
A reusable prompt template for generating a session-level compliance evidence report with square-bracket placeholders for your specific policies, conversation data, and output schema.
This template is the core engine for producing an audit packet from a full conversation session. It instructs the model to act as a compliance auditor, systematically comparing every model action and user interaction against a provided set of policy instructions. The output is a structured report that proves which rules were active, when they were triggered, and whether the model adhered to each constraint, complete with evidence citations from the transcript. Use this template as the starting point for your own compliance scanning workflow, adapting the placeholders to match your specific regulatory requirements and data formats.
markdownYou are a compliance audit engine. Your task is to analyze the provided [CONVERSATION_TRANSCRIPT] and produce a structured compliance evidence report based on the active [POLICY_INSTRUCTIONS]. For each policy instruction in [POLICY_INSTRUCTIONS], perform the following analysis: 1. Determine if the policy was relevant to any turn in the conversation. 2. If relevant, identify every turn where the policy should have been triggered. 3. For each triggered turn, cite the exact text from [CONVERSATION_TRANSCRIPT] that serves as evidence of compliance or violation. 4. Assign a compliance status: `compliant`, `violation`, `not_applicable`, or `indeterminate`. 5. If `indeterminate`, explain what information is missing to make a determination. [CONVERSATION_TRANSCRIPT]: ```json [TRANSCRIPT_JSON]
[POLICY_INSTRUCTIONS]:
json[POLICY_JSON]
Generate your report strictly according to the following [OUTPUT_SCHEMA]:
json[OUTPUT_SCHEMA_JSON]
[CONSTRAINTS]:
- Do not infer intent beyond the explicit text of the transcript and policies.
- If a policy conflict is detected, flag it with a
conflictstatus and explain the conflicting rules. - For any
violation, include a severity rating ofcritical,major, orminorbased on the policy's defined risk level. - The report must be self-contained and suitable for external audit review without access to the original system.
To adapt this template, replace the square-bracket placeholders with your concrete data and schemas. [TRANSCRIPT_JSON] should contain the full multi-turn conversation, including user messages, model responses, tool calls, and tool outputs, each with a timestamp and turn ID. [POLICY_JSON] must be a structured list of your governing rules, each with a unique ID, description, risk level, and the exact instruction text. The [OUTPUT_SCHEMA_JSON] is critical for downstream automation; define a strict JSON schema that includes arrays for policy results, evidence citations, and a summary of findings. For high-stakes regulatory use, always route violation and indeterminate findings to a human reviewer before finalizing the audit packet. Do not treat this prompt's output as a final legal record without independent verification.
Prompt Variables
Placeholders required to configure the Session-Level Instruction Compliance Evidence Prompt for a specific policy set and conversation trace. Replace each placeholder before execution.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[CONVERSATION_TRACE] | Full multi-turn session transcript to audit | {"turns": [{"role": "system", "content": "..."}, {"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}]} | Must be valid JSON array with role and content fields. Null not allowed. Min 1 turn required. |
[ACTIVE_POLICY_SET] | Complete text of all governing instructions with version identifiers | {"system_v2.3": "You are a financial compliance assistant...", "policy_v1.1": "Never disclose PII..."} | Must be valid JSON object mapping instruction layer names to full text. Version tags required in keys. |
[INSTRUCTION_PRECEDENCE_RULES] | Explicit priority ordering of instruction layers | ["system", "policy", "developer", "user", "tool"] | Must be valid JSON array. Order determines conflict resolution. Duplicate entries trigger validation error. |
[COMPLIANCE_REQUIREMENTS] | Specific regulatory or policy constraints to check | ["PII must not appear in outputs", "All financial claims require source citation", "Refusal required for out-of-scope medical advice"] | Must be valid JSON array of strings. Each requirement must be a verifiable yes/no condition. Empty array allowed for exploratory audits. |
[OUTPUT_SCHEMA] | Expected structure for the compliance report | {"session_id": "string", "compliance_checks": [{"requirement": "string", "status": "pass|fail|not_applicable", "evidence": [{"turn": "number", "excerpt": "string"}], "triggering_instruction": "string"}]} | Must be valid JSON Schema or example object. Schema check before prompt execution. Null not allowed. |
[EVIDENCE_CITATION_FORMAT] | Required format for linking findings to source turns | "Turn {turn_number}, {role}: '{excerpt_start}...{excerpt_end}'" | Must include turn number and role. Excerpt length bounded to 200 chars. Format string validated for required tokens. |
[CONFIDENCE_THRESHOLD] | Minimum confidence score for automated pass/fail decisions | 0.85 | Float between 0.0 and 1.0. Findings below threshold flagged for human review. Default 0.8 if not specified. |
[HUMAN_REVIEW_TRIGGERS] | Conditions that force escalation to human auditor | ["confidence < 0.85", "policy conflict detected", "refusal override suspected", "PII found in output"] | Must be valid JSON array of trigger condition strings. Each condition must map to a checkable state in the output schema. |
Implementation Harness Notes
How to wire the compliance evidence prompt into a production audit pipeline with validation, retries, and human review gates.
The Session-Level Instruction Compliance Evidence Prompt is not a standalone chat prompt—it is a batch audit tool designed to run as part of a scheduled or event-driven pipeline. In production, you will typically invoke this prompt after a conversation session closes, a user flags an interaction, or a compliance review window triggers. The prompt expects a complete conversation transcript, an instruction version manifest, and a policy rule set as inputs. Because the output is a structured compliance report with evidence citations, the implementation harness must validate that every claimed violation or adherence event is backed by a turn-level citation before the report enters any permanent audit log.
Wire this prompt into an application by building a wrapper function that assembles the three required inputs: [CONVERSATION_TRANSCRIPT] (the full multi-turn session), [INSTRUCTION_MANIFEST] (a JSON object mapping instruction layer IDs to their versioned text and priority), and [POLICY_RULE_SET] (the specific compliance rules to check). After calling the model, run a post-processing validator that checks three things: (1) every evidence_citation field contains a valid turn index within the transcript bounds, (2) every rule_triggered field maps to a rule ID present in the input policy set, and (3) the adherence_status enum is one of the expected values (COMPLIANT, NON_COMPLIANT, INSUFFICIENT_EVIDENCE, NOT_APPLICABLE). If validation fails, retry once with the validation errors appended as a [CONSTRAINTS] block. If the retry also fails, route the session to a human review queue with the partial report and validation errors attached. Log every invocation—including model, prompt version, input hashes, and validation results—to an append-only audit table.
For high-stakes regulated workflows, never treat the model's output as a final compliance determination. The prompt produces evidence for human reviewers, not a pass/fail verdict. After validation passes, store the structured report alongside the session transcript and instruction manifest in a tamper-evident audit store. Implement a review UI that highlights each rule, its adherence status, and the cited turn so that compliance officers can spot-check findings. Avoid running this prompt on streaming or real-time conversations; it is designed for post-session batch analysis where latency is acceptable and completeness matters more than speed. If you need real-time policy enforcement, pair this audit prompt with a separate inline guardrail system that blocks disallowed actions at inference time, and use the session-level prompt only for retrospective evidence collection.
Common Failure Modes
Session-level compliance evidence prompts fail in predictable ways. These cards cover the most common production failure modes and the guardrails that prevent them.
Citation Drift Across Long Sessions
What to watch: The model stops citing specific policy instructions after many turns and begins asserting compliance without evidence. Turn-level citations degrade into vague summaries. Guardrail: Enforce a strict output schema that requires a citation field per constraint. Add a validator that rejects reports with fewer citations than the number of active policy instructions.
Phantom Policy Attribution
What to watch: The model invents policy instructions that were never active in the session, attributing decisions to rules that don't exist in the instruction set. This is especially common when policy names are similar. Guardrail: Provide the exact policy instruction text and version hash as input. Require the model to quote the policy verbatim in its evidence field, then run a string-match validator against the known instruction set.
Temporal Ordering Confusion
What to watch: The model misorders when a policy was triggered, claiming a constraint fired before the user message that activated it, or after the decision was already made. Guardrail: Require turn-indexed timestamps in the compliance report. Add a temporal consistency check that verifies trigger turns precede decision turns and that policy activation order matches conversation chronology.
Silent Constraint Omission
What to watch: The model skips reporting on a policy constraint entirely—especially constraints that were never triggered or that the model violated. Missing entries create a false picture of full compliance. Guardrail: Provide the full list of active policy instructions as a numbered checklist input. Require the output to include an entry for every constraint, with an explicit triggered: true/false field and a status: compliant/violated/not_applicable field.
Over-Confident Compliance Scoring
What to watch: The model assigns high confidence to compliance determinations even when evidence is thin, ambiguous, or contradictory. This is dangerous for regulated-industry submissions where false assurance carries legal risk. Guardrail: Require a confidence field with a constrained enum (high/medium/low) and a mandatory uncertainty_note when confidence is below high. Add a human-review flag for any low confidence determination.
Instruction Version Mismatch
What to watch: The session was governed by instruction version A, but the compliance prompt accidentally references version B. The report attributes decisions to rules that were not active, invalidating the entire audit packet. Guardrail: Embed the instruction version hash and active timestamp in the session metadata. Require the prompt to echo the version it is auditing before producing the report. Add a pre-flight check that the version in the session matches the version in the audit request.
Evaluation Rubric
Criteria for testing whether the session-level compliance report is accurate, complete, and ready for audit submission before shipping.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Policy instruction coverage | Every policy instruction declared in [POLICY_INSTRUCTIONS] appears in the report with a unique instruction ID | Missing policy instructions or duplicate IDs in the compliance report | Parse report JSON, extract all instruction IDs, compare against [POLICY_INSTRUCTIONS] input set |
Trigger event detection | All conversation turns where a policy instruction was triggered are identified with correct turn index | Missed trigger events or incorrect turn indices that don't match the conversation trace | Cross-reference trigger turn indices against conversation trace, verify the model's action at that turn matches the policy constraint |
Adherence classification accuracy | Each triggered instruction is classified as adhered, violated, or not_applicable with correct evidence | Adherence classification contradicts the conversation trace or evidence citation doesn't support the classification | Sample 20% of classifications, manually verify against conversation trace, require >=95% agreement |
Evidence citation completeness | Every adherence determination includes a direct quote or turn reference from [CONVERSATION_SESSION] as evidence | Evidence field is null, contains fabricated quotes not present in the session, or cites wrong turn | Parse all evidence citations, grep [CONVERSATION_SESSION] for exact match, flag any citation with no match |
Timestamp and version metadata | Report includes session start time, session end time, and instruction version identifier for every policy referenced | Missing timestamp fields, null version identifiers, or version strings that don't match [INSTRUCTION_VERSION_METADATA] | Schema validation: check that timestamp fields parse as ISO 8601, version fields are non-null strings matching input metadata |
Violation severity classification | Each violation is assigned a severity level (critical, major, minor) consistent with [POLICY_SEVERITY_RULES] | Severity assignment contradicts the policy's declared severity or uses undefined severity labels | Map each violation's policy ID to its declared severity in [POLICY_SEVERITY_RULES], verify match, flag mismatches |
Report structure validity | Output is valid JSON matching [OUTPUT_SCHEMA] with all required fields present and no extra top-level keys | JSON parse failure, missing required fields, or unexpected fields that break downstream audit tool ingestion | Validate against JSON Schema, reject on parse error or schema violation, log field-level diffs |
Human review flagging | Any violation classified as critical or any instruction with ambiguous adherence is flagged for human review with a review_required: true field | Critical violations missing review flag or ambiguous cases incorrectly marked as resolved without human review | Filter report for severity=critical OR adherence=ambiguous, verify review_required is true for all matching entries |
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
Start with the base prompt and a single conversation trace. Remove the structured output schema requirement initially—ask the model to produce a narrative compliance summary first. Use a lightweight JSON schema with only required fields: [INSTRUCTION_ID], [COMPLIANCE_STATUS], [EVIDENCE_TURN]. Skip multi-layer attribution and focus on one policy document.
Prompt snippet
codeAnalyze this conversation for compliance with [POLICY_NAME]. For each instruction in [POLICY_DOCUMENT], indicate whether the model complied (YES/NO/UNCLEAR) and cite the conversation turn where evidence appears. Conversation: [CONVERSATION_TRACE] Policy: [POLICY_DOCUMENT]
Watch for
- Model fabricating compliance when evidence is absent
- Missing UNCLEAR category causing forced YES/NO on ambiguous turns
- Overly broad instruction matching that flags irrelevant policy rules
- No distinction between active and inactive instructions

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