This prompt is a classification guard designed for regulated platforms that must identify compliance-relevant inputs before standard processing occurs. Its job is to act as a triage filter, not a compliance officer. Use it when an incoming user request, document, or message might contain signals related to regulatory filings, formal complaints, policy violations, audit requests, or legal exposure. The ideal user is a platform engineer or AI architect building a routing middleware layer who needs a binary routing decision—compliance or general—with a confidence score and a concise evidence summary. This output is designed to be consumed by a downstream router or queue dispatcher that enforces specialized handling, audit trails, or retention policies for compliance-flagged items.
Prompt
Compliance vs. General Inquiry Triage Prompt

When to Use This Prompt
Explains the job-to-be-done for the Compliance vs. General Inquiry Triage Prompt, its ideal user, required context, and critical limitations.
You should deploy this prompt at the ingress point of your AI pipeline, before any standard processing, tool use, or response generation. The required context includes the raw user input and a clear definition of what constitutes a compliance-relevant signal for your specific domain. You must provide a [COMPLIANCE_SCOPE] definition that outlines the regulatory boundaries, policy categories, and risk triggers relevant to your platform. Without this scoping, the model will default to a generic and potentially noisy definition of compliance. The prompt expects a structured JSON output containing a classification field (compliance or general), a confidence_score between 0 and 1, and an evidence_summary string that cites the specific phrases or signals that drove the decision.
Do not use this prompt for nuanced legal analysis, for generating compliance advice, or as a substitute for qualified legal review. It is a high-recall safety net designed to prevent compliance-relevant content from slipping into a general processing pipeline where it might be handled without proper audit trails, data retention, or human oversight. A false negative—classifying a compliance item as general—is the primary risk, as it can create regulatory exposure. A false positive—routing a general inquiry to the compliance queue—is a cost and latency problem but is typically safer. Your next step after implementing this prompt is to build the downstream router that consumes its output and to establish a human review process for low-confidence or high-severity compliance classifications.
Use Case Fit
Where the Compliance vs. General Inquiry Triage Prompt works, where it fails, and what you must provide before deploying it in a production routing pipeline.
Good Fit: Regulated Multi-Tenant Platforms
Use when: your platform serves multiple organizations and must segregate compliance-relevant inputs before standard processing. Guardrail: define a concrete compliance taxonomy with clear scope boundaries—do not rely on the model to infer what 'regulated' means.
Bad Fit: Open-Ended Chatbots Without Routing
Avoid when: there is no downstream routing, review queue, or policy enforcement step. Classification without action is overhead. Guardrail: only deploy this prompt when the output label directly controls a processing path, tool gate, or human review assignment.
Required Inputs: Taxonomy and Policy Definitions
What to watch: the prompt cannot classify compliance content without a defined taxonomy of regulated categories and clear policy boundaries. Guardrail: provide a structured list of in-scope compliance domains, out-of-scope examples, and explicit handling rules for each category before testing.
Operational Risk: False Negatives Create Regulatory Exposure
What to watch: a compliance-relevant input misclassified as general inquiry bypasses required retention, review, and handling controls. Guardrail: implement a confidence threshold below which inputs route to human review; never auto-route low-confidence compliance classifications to general processing.
Operational Risk: Over-Classification Floods Review Queues
What to watch: an overly sensitive classifier routes too many general inquiries to compliance review, overwhelming human reviewers and causing alert fatigue. Guardrail: measure false-positive rate against a labeled gold set and tune the prompt's sensitivity before production deployment; set a maximum acceptable false-positive rate.
Boundary Condition: Multi-Intent Inputs
What to watch: a single input may contain both compliance-relevant and general inquiry content, creating routing ambiguity. Guardrail: define a precedence rule in the prompt—compliance content always takes priority—and log multi-intent cases for audit review to verify the rule holds.
Copy-Ready Prompt Template
A production-ready prompt template for classifying user inputs as compliance-relevant or general inquiry, with structured JSON output and confidence scoring.
This prompt template is designed to be dropped directly into your classification middleware. It forces the model to act as a strict triage classifier rather than a conversational assistant, which is critical for regulated platforms where a misclassified compliance input can create legal exposure. The template uses a system instruction that explicitly forbids answering the user's question, a defined taxonomy of compliance signals, and a constrained JSON output schema that downstream systems can parse deterministically.
text[SYSTEM_INSTRUCTION] You are a compliance triage classifier for a regulated platform. Your only job is to determine if an input requires compliance handling. Do not answer the user's question. Do not provide advice. [COMPLIANCE_TAXONOMY] An input requires compliance handling if it contains any of the following: - Formal complaints, disputes, or legal threats. - References to regulatory bodies, statutes, or filing obligations. - Requests for data deletion, access, or portability under privacy law. - Reports of policy violations, fraud, or misconduct. - Audit requests or inquiries about record retention. - Language indicating potential litigation or regulatory action. [INPUT] """ [USER_INPUT] """ [OUTPUT_SCHEMA] { "classification": "compliance" | "general_inquiry", "confidence": 0.0-1.0, "evidence": "Short quote or summary from the input that supports the classification.", "reasoning": "One sentence explaining the classification decision." } [CONSTRAINTS] - If no compliance signals are detected, classify as "general_inquiry". - Confidence must reflect genuine certainty. Use 0.5 for ambiguous cases. - Evidence must be a direct quote or a close paraphrase from the input.
To adapt this template for your platform, start by customizing the [COMPLIANCE_TAXONOMY] section to match your specific regulatory obligations. If you operate under GDPR, CCPA, HIPAA, or SOX, add the relevant trigger phrases and request types that your compliance team has defined. The taxonomy is the single most important section to get right because it defines the boundary between automated processing and specialized handling. Test it against a golden dataset of known compliance and general inquiry examples before deployment, and expect to iterate as your compliance team identifies new signal patterns.
The [CONSTRAINTS] section enforces three behaviors that prevent common failure modes: defaulting to general_inquiry avoids over-escalation that floods your compliance queue with false positives, the confidence scoring requirement forces the model to express uncertainty rather than guessing, and the evidence requirement creates an audit trail that your compliance team can review. When wiring this into production, validate that the output contains all four required fields and that classification is exactly one of the two allowed enum values before routing. If validation fails, retry once with the same prompt, then escalate to a human reviewer rather than silently defaulting to either path.
The most dangerous failure mode for this prompt is a false negative: a compliance-relevant input classified as general_inquiry and routed into standard processing. This can trigger regulatory reporting obligations, data handling violations, or missed response deadlines. Mitigate this by setting a lower confidence threshold for the compliance classification path: if confidence is above 0.3 for compliance, route to review even if the classification is general_inquiry. This asymmetric threshold trades some false positives for catching borderline compliance inputs that the model is uncertain about.
Next, build an eval harness that tests this prompt against edge cases: inputs that mention legal terms in non-legal contexts, complaints that don't rise to formal disputes, privacy requests buried in long messages, and multi-intent inputs that mix compliance and general inquiry content. Measure precision and recall against human-labeled examples, with particular attention to recall on the compliance class. If recall drops below 0.95, expand your taxonomy or add few-shot examples of borderline cases that should route to compliance.
Prompt Variables
Required and optional inputs for the Compliance vs. General Inquiry Triage Prompt. Each placeholder must be populated before the prompt is assembled and sent to the model.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[USER_INPUT] | The raw text to classify as compliance-relevant or general inquiry | I want to file a complaint about my advisor recommending unsuitable investments | Required. Non-empty string. Must be sanitized for prompt injection before insertion. Max 4000 chars. |
[COMPLIANCE_TAXONOMY] | Defined list of regulated domains, policy categories, and compliance triggers the system must detect | ["Financial Regulation", "Data Privacy", "Healthcare Compliance", "Employment Law", "Environmental Regulation"] | Required. JSON array of strings. Must contain at least one category. Validate against approved taxonomy version. Missing taxonomy causes false negatives. |
[GENERAL_CATEGORIES] | List of non-regulated inquiry types that should route to standard processing | ["Product Question", "Billing Inquiry", "Technical Support", "Account Management", "Feature Request"] | Required. JSON array of strings. Must be mutually exclusive with COMPLIANCE_TAXONOMY. Overlap causes ambiguous routing. |
[CONFIDENCE_THRESHOLD] | Minimum confidence score for auto-routing; scores below this trigger human review | 0.85 | Required. Float between 0.0 and 1.0. Default 0.85. Lower values increase false positives; higher values increase escalation volume. |
[REGULATORY_JURISDICTION] | Jurisdiction context that determines which regulations apply to the input | US-SEC-FINRA | Optional. String enum from approved jurisdiction list. When null, prompt uses general regulatory signals. Required for multi-jurisdiction platforms to avoid incorrect regulatory scoping. |
[ESCALATION_QUEUE] | Identifier for the queue or workflow that receives compliance-flagged inputs | compliance-review-tier-1 | Required. Non-empty string matching a valid queue ID in the routing system. Invalid queue IDs cause dropped compliance inputs. |
[REQUIRE_CITATIONS] | Whether the classification output must cite specific regulatory references or policy sections | Required. Boolean. When true, output must include citation field. When false, classification alone is sufficient. Set true for audit-ready systems. | |
[MAX_RETRIES] | Maximum number of classification retry attempts on low-confidence or malformed outputs | 3 | Optional. Integer >= 0. Default 2. Controls retry loop in harness. Set 0 for no retries in latency-sensitive paths. |
Implementation Harness Notes
Wire the compliance triage prompt as a synchronous pre-processing step with validation, retries, and audit logging.
Wire this prompt as a synchronous pre-processing step before your main agent or response pipeline. In code, call the classification endpoint, parse the JSON response, and branch on the classification field. If classification is compliance, route the input to a dedicated compliance queue and do not pass it to the general-purpose model. Log the full classification payload for auditability. If confidence is below your threshold, route to a human review queue.
Implement a retry with a backoff if the model returns malformed JSON. Use a validation function that checks for the required enum values and a confidence float between 0 and 1. If validation fails after a maximum of two retries, escalate to a human operator and log the raw response. For high-throughput systems, consider batching inputs but ensure each classification is independently logged with a trace ID that links back to the original input.
Choose a fast, cost-effective model for this triage step since it runs on every input. A smaller model like GPT-4o-mini or Claude Haiku is often sufficient. Do not use this prompt as the final compliance decision—it is a routing signal. Always preserve the original input and classification metadata in your logs. If your platform handles PII, ensure the classification prompt runs in the same data boundary as the input and that logs do not leak sensitive content into monitoring systems.
Expected Output Contract
Defines the structured output schema for the Compliance vs. General Inquiry Triage Prompt. Use this contract to validate model responses before routing decisions are executed in production.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
classification | string enum: compliance | general_inquiry | Must match exactly one of the allowed enum values. Reject on any other string. | |
confidence_score | float between 0.0 and 1.0 | Must be a valid float. Reject if non-numeric, null, or outside 0.0-1.0 range. | |
reasoning | string | Must be non-empty string with minimum 20 characters. Reject if null, empty, or whitespace-only. | |
regulatory_signals | array of strings | Must be a valid JSON array. Reject if not an array. Allow empty array for general_inquiry. | |
policy_categories | array of strings | If present, must be a valid JSON array of strings. Null allowed for general_inquiry classification. | |
requires_legal_review | boolean | Must be true or false. Reject on string values, null, or missing field. | |
retention_required | boolean | Must be true or false. Reject on string values, null, or missing field. | |
handling_instructions | string | If present, must be non-empty string. Null allowed for general_inquiry with no special handling. |
Common Failure Modes
Compliance triage fails silently. These are the most common production failure patterns and the specific guardrails that catch them before they create regulatory exposure.
False Negatives on Oblique Language
What to watch: Users describe compliance-relevant situations using casual, non-technical language ('I think my account looks wrong,' 'someone else might have access'). The prompt misses these signals because it overfits to explicit regulatory terminology. Guardrail: Include few-shot examples with informal, indirect, and euphemistic phrasing mapped to compliance categories. Test against a red-team dataset of oblique disclosures.
Over-Classification and Queue Flooding
What to watch: The prompt becomes too sensitive, routing benign general inquiries into the compliance queue. This overwhelms review teams, increases handling latency for all users, and causes reviewers to ignore alerts. Guardrail: Implement a confidence threshold below which compliance-flagged items go to a secondary review buffer, not the live queue. Monitor the compliance-to-general ratio daily and set an alert if it exceeds a defined upper bound.
Context Truncation Masking Risk Signals
What to watch: Long user messages or multi-turn conversations get truncated before reaching the triage prompt. The compliance signal exists in the dropped portion of the input. Guardrail: Place the triage prompt early in the context assembly pipeline. If truncation is unavoidable, run triage on the full input before summarization and attach the classification result as a persistent metadata field.
Taxonomy Drift After Policy Updates
What to watch: The compliance taxonomy changes (new regulation, updated internal policy), but the prompt still references the old categories. Inputs matching new risk types pass through as general inquiries. Guardrail: Version the taxonomy inside the prompt with a policy_date field. Run a scheduled eval that tests the prompt against a golden set of inputs representing the latest policy boundaries and alerts on recall degradation.
Model Overconfidence on Ambiguous Inputs
What to watch: The model assigns high confidence to a 'general inquiry' classification for an input that a human reviewer would flag as ambiguous. The confidence score provides false reassurance. Guardrail: Require the prompt to output explicit reasoning alongside the classification. Route any input where the reasoning contains uncertainty markers ('might,' 'possibly,' 'unclear') or where the confidence score falls below a calibrated threshold to a human review staging area.
Multilingual Input Bypassing English-Only Rules
What to watch: The prompt and taxonomy are written in English, but users submit compliance-relevant content in other languages. The model fails to map non-English risk signals to the English taxonomy categories. Guardrail: Add a pre-processing language detection step. Route non-English inputs through a translation layer before triage, or include multilingual few-shot examples in the prompt that demonstrate cross-lingual risk mapping.
Evaluation Rubric
Use this rubric to test the Compliance vs. General Inquiry Triage Prompt before production deployment. Each criterion targets a known failure mode in regulatory scope detection. Run these tests against a golden dataset containing both compliance and general inquiry examples.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Regulatory Recall |
| Any compliance input classified as general inquiry | Run prompt against 100+ labeled compliance examples; count false negatives |
General Inquiry Precision |
| Non-compliance inputs flagged as compliance at rate > 5% | Run prompt against 100+ labeled general inquiry examples; count false positives |
Abstention Rate | Abstention rate between 2% and 10% on ambiguous inputs | Abstention rate 0% (overconfident) or > 20% (excessive deferral) | Run prompt against 50+ deliberately ambiguous boundary cases; measure abstention frequency |
Confidence Calibration | Mean confidence >= 0.90 for correct classifications; mean confidence <= 0.70 for incorrect classifications | High confidence on misclassified inputs or low confidence on correct classifications | Bin predictions by confidence score; compute accuracy per bin; check monotonic relationship |
Regulatory Signal Detection | Correctly identifies >= 95% of inputs containing regulatory keywords without overfitting to keyword presence alone | Misses compliance inputs lacking explicit keywords or flags general inputs containing coincidental regulatory terms | Test with adversarial pairs: compliance inputs with no keywords vs. general inputs with regulatory-sounding terms |
Multi-Intent Handling | Correctly flags >= 90% of inputs containing both compliance and general inquiry signals as compliance | Classifies mixed-signal inputs as general inquiry | Curate 30+ inputs blending compliance topics with general questions; verify compliance routing takes precedence |
Output Schema Compliance | 100% of outputs parse as valid JSON matching [OUTPUT_SCHEMA] with all required fields present | Missing fields, extra fields, or malformed JSON in any output | Validate all test outputs against JSON Schema; reject any response that fails structural validation |
Latency Budget | 95th percentile response time <= 2 seconds for single-input classification | P95 latency exceeds 2 seconds or timeout rate > 1% | Benchmark 1000 sequential classifications; measure P50, P95, P99 latency and timeout count |
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 hardcoded list of compliance signal keywords. Use a simple two-label output: compliance or general. Skip confidence scoring and just test whether the model catches obvious regulatory language.
codeClassify the following input as either "compliance" or "general". Compliance signals: [COMPLIANCE_KEYWORDS] Input: [USER_INPUT] Output: {"label": "compliance" | "general"}
Watch for
- False negatives on subtle regulatory language that doesn't match your keyword list
- Overly broad classification when general inquiries mention compliance-adjacent terms like "policy" or "rule"
- No handling for ambiguous cases—everything gets forced into one bucket

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