This prompt is designed for platform and routing engineers who need to embed commercial logic directly into their AI dispatch middleware. Its core job is to classify an incoming customer request into a premium, standard, or basic routing tier by evaluating structured account attributes (like accountTier, isTrial, isInGracePeriod) against the characteristics of the request itself (like requestType or priority). The output is a deterministic, auditable tier assignment that downstream systems—such as queue routers, agent assignment logic, and SLA timers—can act on without further interpretation. Use this when your routing logic must respect contractual segmentation and you need a traceable record of why a request was routed a certain way.
Prompt
Premium vs Standard Routing Decision Prompt

When to Use This Prompt
Understand the exact job this prompt performs, the context it requires, and the situations where a simpler or different approach is necessary.
The ideal implementation context is a synchronous API or middleware function where latency is not the absolute primary constraint. The prompt requires a pre-assembled [INPUT] object containing both the customer profile and the parsed request intent. It is not designed to perform intent detection or account lookup itself; those steps must be completed upstream. The prompt's value is in applying nuanced policy, such as honoring a grace period for a recently downgraded premium account or routing a trial user's technical emergency to a standard queue instead of basic self-service. A concrete example: an account with "tier": "premium" but "isInGracePeriod": true and "isTrial": false should still receive standard routing for non-critical issues, a subtlety a simple if/else rules engine might miss without explicit maintenance.
Do not use this prompt for real-time, latency-sensitive routing where a sub-50ms response is required; a simple rules engine or a cached lookup table is a better fit. It is also unsuitable for multi-intent requests that require decomposition before classification—sending a single message containing both a billing dispute and a technical outage will produce an ambiguous tier assignment. In such cases, use an intent decomposition prompt first. Finally, avoid this prompt when the routing decision depends on real-time operational data like current queue depth or agent availability; those variables belong in a post-classification dispatch layer, not in the tier assignment logic itself. The next step after understanding this boundary is to review the prompt template and its required input schema.
Use Case Fit
Where the Premium vs Standard Routing Decision Prompt works and where it introduces operational risk. Use these cards to decide if this prompt fits your routing architecture before you integrate it.
Good Fit: Binary or Tiered Dispatch
Use when: you need a deterministic routing decision that maps account attributes to a small set of discrete tiers (premium, standard, basic). The prompt excels at applying explicit business rules to structured account metadata. Guardrail: Define the tier enum strictly in the output schema and validate against it before dispatch.
Bad Fit: Real-Time Bidding or Dynamic Pricing
Avoid when: routing decisions depend on real-time market conditions, auction dynamics, or continuous pricing variables. This prompt is designed for classification against static entitlements, not for optimizing cost functions. Guardrail: Route to a dedicated pricing engine or optimization model instead of repurposing this classification prompt.
Required Input: Account Metadata Payload
What to watch: the prompt assumes structured account data is available at invocation time. Missing, stale, or malformed account fields produce incorrect routing. Guardrail: Validate the presence of required fields (tier, status, contract type) before prompt assembly. Return a MISSING_INPUT error code rather than guessing.
Operational Risk: Grace Period Misrouting
What to watch: customers in downgrade grace periods or trial extensions can be routed to the wrong tier if the prompt only reads current tier without checking transitional state. Guardrail: Include a grace_period_active boolean and effective_tier field in the input context. Test with recently downgraded and trial-extended accounts.
Operational Risk: Over-Escalation of Edge Cases
What to watch: ambiguous or conflicting account signals can cause the prompt to default to premium routing as a safe fallback, creating queue imbalance and cost overruns. Guardrail: Require an explicit confidence score in the output. Route low-confidence decisions to a human review queue with a strict SLA rather than auto-escalating.
Integration Point: Downstream Queue Dispatch
What to watch: the prompt output must map directly to queue IDs, agent skills, or workflow triggers. A mismatch between tier labels and downstream system enums breaks automation silently. Guardrail: Validate the output tier against an allowed enum list at the application layer. Log and alert on unmapped tier values before they reach the dispatcher.
Copy-Ready Prompt Template
A copy-ready prompt template for classifying requests into premium, standard, or basic routing paths based on account attributes and request characteristics.
This prompt template is designed to be pasted directly into your system prompt or user message field. It instructs the model to act as a deterministic routing classifier, consuming structured account context and an unstructured user request to produce a single, auditable routing decision. Before using it, you must replace every square-bracket placeholder with the actual values, schemas, and constraints that match your production environment. Do not send the prompt with unresolved placeholders to the model; the output will be unreliable.
codeSYSTEM: You are a deterministic routing classifier for a SaaS platform. Your only job is to analyze the provided [ACCOUNT_CONTEXT] and [USER_REQUEST] and output a single JSON object that assigns the request to exactly one routing tier: premium, standard, or basic. Follow these rules strictly: 1. Base the routing decision on the account's current tier, contract status, and any explicit SLA guarantees found in [ACCOUNT_CONTEXT]. 2. If the account is in a trial or grace period, apply the routing rules defined in [GRACE_PERIOD_POLICY]. 3. If the [USER_REQUEST] indicates a severity or business impact level, use the [SEVERITY_MAPPING] to adjust the tier upward if necessary. Never downgrade a tier based on severity. 4. If the [ACCOUNT_CONTEXT] is missing, incomplete, or contradictory, output a routing tier of "standard" and set a `routing_confidence` score of 0.0 with a `fallback_reason`. 5. Do not invent account details. Only use the provided [ACCOUNT_CONTEXT]. USER: ACCOUNT_CONTEXT: [ACCOUNT_CONTEXT] USER_REQUEST: [USER_REQUEST] OUTPUT_SCHEMA: { "routing_tier": "premium" | "standard" | "basic", "routing_confidence": 0.0 - 1.0, "applied_policy": "string", "fallback_reason": "string | null", "evidence_summary": "string" } CONSTRAINTS: [CONSTRAINTS]
To adapt this template, start by defining your [ACCOUNT_CONTEXT] structure. This should be a JSON object containing fields like account_tier, contract_status, grace_period_end_date, and entitlements. The [GRACE_PERIOD_POLICY] and [SEVERITY_MAPPING] placeholders should be replaced with explicit rules, such as 'trial accounts with a severity of critical route to premium.' The [CONSTRAINTS] block is where you enforce business logic, for example, 'enterprise accounts always route to premium regardless of severity.' After adapting the prompt, run it against a golden dataset of known account-request pairs to verify that the model respects your tier boundaries and does not hallucinate entitlements. For high-stakes routing, always log the evidence_summary and fallback_reason fields for auditability, and consider a human review step for any decision with a routing_confidence below 0.85.
Prompt Variables
Validate these inputs before sending to the model. Missing or malformed variables are the most common cause of incorrect routing decisions in production.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[ACCOUNT_TIER] | Normalized customer tier label from your system of record | premium | Must match an allowed enum value. Reject null, empty string, or unrecognized tiers before model call. |
[ACCOUNT_STATUS] | Current account lifecycle state | active | Must be one of: active, trial, grace_period, suspended, closed. Reject unknown statuses. |
[REQUEST_CATEGORY] | Pre-classified request type from upstream intent detection | billing_dispute | Must be a non-empty string from your taxonomy. If upstream confidence is below threshold, set to 'unclassified' and route to clarification. |
[SUPPORT_CHANNEL] | Channel the request arrived through | Must be one of: email, chat, phone, portal, api. Channel affects SLA expectations and routing priority. | |
[CONTRACT_SLA_TIER] | SLA tier from the customer's active contract | platinum | Must match a defined SLA tier in your contracts system. If null, fall back to [ACCOUNT_TIER] default SLA mapping. |
[GRACE_PERIOD_END_DATE] | ISO-8601 date when a downgrade grace period expires, or null | 2025-04-15 | If present and in the future, the account retains prior-tier routing. If null or past, use current tier. Validate date format before prompt assembly. |
[PREVIOUS_ROUTING_DECISION] | Last routing decision for this account, if available | premium_queue | Optional. If present, include to detect routing flips. If null, omit the field entirely rather than passing 'null' as a string. |
[REQUEST_PRIORITY_SCORE] | Upstream priority score from urgency classifier | 0.87 | Must be a float between 0.0 and 1.0. Reject values outside range. If null, set to 0.5 as neutral default before prompt assembly. |
Implementation Harness Notes
How to wire the Premium vs Standard Routing Decision Prompt into a production routing middleware with validation, retries, logging, and fallback paths.
This prompt is designed to sit inside a routing middleware layer—the decision point between request ingestion and downstream dispatch. It should be called after account resolution and before queue assignment. The prompt expects structured account attributes and request characteristics as input, and it returns a routing tier label plus supporting evidence. Treat this as a deterministic classification step: the output must be machine-readable and auditable, not conversational.
Integration pattern: Wrap the prompt in a thin service function that assembles the [ACCOUNT_ATTRIBUTES] and [REQUEST_CHARACTERISTICS] blocks from your account service, contract store, and ticket system. Call the LLM with temperature=0 and a JSON mode or structured output constraint. Validate the response against a strict schema: routing_tier must be one of premium, standard, or basic; confidence must be a float between 0.0 and 1.0; evidence must be a non-empty array of strings. If validation fails, retry once with the validation error injected into the prompt as additional [CONSTRAINTS]. If the retry also fails, log the failure and route to a human review queue with the raw LLM output attached. Never silently default to a tier—misrouting a premium account to standard support is a revenue-risk event.
Model choice and latency: Use a fast, cost-efficient model for this classification task (e.g., GPT-4o-mini, Claude Haiku, or an equivalent small model). The prompt is structured enough that larger models rarely improve accuracy for standard tier detection. Reserve larger models for edge-case resolution when confidence falls below your threshold. Observability: Log every routing decision with the input hash, output tier, confidence score, model version, and latency. This creates an audit trail for SLA compliance and lets you detect drift—for example, if trial accounts start routing as premium after a contract schema change. Fallback chain: If the primary model call fails entirely (timeout, rate limit, service error), fall back to a deterministic rules engine that checks explicit tier flags in the account metadata. The prompt is the primary path; rules are the safety net, not the other way around.
Edge-case handling: Trial accounts, grace-period downgrades, and custom contracts are the most common failure sources. Wire a pre-check that inspects account_status and grace_period_end before calling the prompt. If the account is in a known edge state, inject that context explicitly into [ACCOUNT_ATTRIBUTES] rather than hoping the model infers it. For custom contracts with bespoke entitlements, include a custom_terms field in the input block and add a post-prompt validation: if the model returns standard but custom_terms contains premium entitlements, flag for human review. Next step: After routing tier is determined, pass the decision to your queue dispatcher along with the confidence score. Downstream systems should use the confidence score to adjust SLA timers—low-confidence premium assignments might still get premium treatment but with a shorter escalation window.
Expected Output Contract
Define the exact shape of the model response for the Premium vs Standard Routing Decision Prompt. Use this contract to validate outputs before they reach downstream dispatch logic.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
routing_tier | enum: premium | standard | basic | Must match one of the three allowed enum values. Reject any other string. | |
confidence_score | float (0.0 - 1.0) | Must be a number between 0.0 and 1.0 inclusive. Reject if null, string, or out of range. | |
decision_rationale | string (max 300 chars) | Must be present and non-empty. Length must not exceed 300 characters. Reject if missing or over limit. | |
matched_account_attribute | string | Must reference a field from the [ACCOUNT_CONTEXT] input. Reject if the attribute name is fabricated. | |
grace_period_active | boolean | Must be true or false. Reject null or string values. If true, routing_tier must not be basic. | |
escalation_flag | boolean | Must be true or false. If true, a human_review_note field must also be present and non-empty. | |
human_review_note | string (max 200 chars) | null | Required only if escalation_flag is true. Otherwise must be null. Reject if present without escalation. | |
fallback_tier | enum: premium | standard | basic | null | If confidence_score is below 0.7, this field must be populated with a safe fallback tier. Otherwise must be null. |
Common Failure Modes
What breaks first when routing requests by account tier and how to guard against it in production.
Tier Misclassification from Missing Metadata
What to watch: The prompt receives incomplete or null account fields and defaults to a lower tier, routing a premium customer to a standard queue. Guardrail: Require a tier_source field in the output. If the tier was inferred from a fallback or default, flag it for review and log the missing fields for the data platform team.
Grace Period and Transition State Confusion
What to watch: A recently downgraded account still within a 30-day grace period is routed as standard, immediately revoking premium features. Guardrail: Include a contract_state input field that explicitly passes grace_period with an expiration date. Add a test case for every transition state in your eval set.
Parent-Child Hierarchy Inheritance Errors
What to watch: A child account inherits the parent's premium tier, but the prompt resolves the child's own basic tier instead, breaking the entitlement chain. Guardrail: Resolve the effective tier before the routing decision. Output the resolved_account_id and inheritance_chain so operators can trace the decision back to the source.
Over-Escalation of Standard Requests
What to watch: The prompt flags too many standard-tier requests as high-priority or VIP, overwhelming the premium queue and degrading the experience for actual premium customers. Guardrail: Add a precision check in eval: measure the false-positive VIP rate. If it exceeds a threshold, tighten the escalation criteria or add a second verification step.
Silent Failure on Ambiguous Entitlements
What to watch: A custom contract has bespoke terms the prompt cannot parse, so it silently falls back to the standard tier without alerting anyone. Guardrail: Output a confidence score and an ambiguity_flag boolean. Route low-confidence or ambiguous decisions to a human review queue instead of the automated dispatch path.
Stale Account Data Producing Wrong Routing
What to watch: The prompt uses cached account data from hours ago. A customer upgraded 10 minutes ago but is still routed as standard. Guardrail: Include a data_freshness_timestamp in the input context. If the age exceeds your freshness SLA, the prompt should return an UNKNOWN tier and trigger a synchronous account lookup before routing.
Evaluation Rubric
Run these test cases against your golden dataset before shipping the Premium vs Standard Routing Decision Prompt. Each criterion targets a known failure mode in tier-based routing logic.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Tier Classification Accuracy | Correctly identifies premium, standard, or basic tier for 100% of labeled accounts in golden dataset | Output tier label does not match expected tier from account metadata | Run against 200 labeled account profiles with known tiers; measure exact-match accuracy |
Grace-Period Handling | Routes accounts in downgrade grace period to premium path when [GRACE_PERIOD_ACTIVE] is true | Routes grace-period account to standard path before grace period expires | Test with 20 grace-period account variants; verify routing decision matches grace-period rules |
Trial Account Routing | Routes trial accounts to trial-specific path when [ACCOUNT_TYPE] is trial and [TRIAL_EXPIRED] is false | Routes active trial to paid-only features or premium support queue | Test with 15 trial account scenarios including near-expiry and high-usage trials |
Missing Account Metadata Fallback | Returns standard tier with confidence below 0.7 when [ACCOUNT_TIER] is null or missing | Hallucinates a tier or returns premium tier with high confidence on missing data | Submit 10 requests with null or empty [ACCOUNT_TIER]; verify fallback tier and confidence score |
Conflicting Signal Resolution | Resolves conflict between [CONTRACT_SLA] and [ACCOUNT_TIER] by preferring contract SLA and flagging discrepancy | Silently picks one signal or returns ambiguous tier without explanation | Test with 10 conflict scenarios; check for discrepancy flag and resolution rationale in output |
Confidence Score Calibration | Confidence score below 0.6 when multiple tier indicators are missing or contradictory | Returns confidence above 0.9 when critical fields like [ACCOUNT_TIER] are absent | Measure confidence distribution across 50 edge-case inputs; verify low confidence correlates with ambiguity |
VIP False-Positive Rate | Flags VIP only when [VIP_FLAG] is true or [ESCALATION_LEVEL] is executive | Flags standard enterprise accounts as VIP based on company size alone | Run against 30 enterprise non-VIP accounts; measure false-positive VIP flag rate |
Output Schema Compliance | Returns valid JSON matching [OUTPUT_SCHEMA] with all required fields present and correctly typed | Missing required field, wrong type, or extra fields not in schema | Validate all test outputs against JSON Schema; check field presence, types, and enum values |
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 simple JSON schema. Use a single model call without retries or complex validation. Hardcode a small set of known account tiers and test with synthetic examples.
codeYou are a routing classifier. Given [ACCOUNT_METADATA] and [REQUEST_CONTEXT], classify the routing tier as "premium", "standard", or "basic". Return JSON: {"tier": "...", "confidence": 0.0-1.0, "reasoning": "..."}
Watch for
- Missing schema enforcement leads to free-text instead of JSON
- Overly broad tier definitions cause inconsistent classification
- No handling for missing account metadata fields

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