This prompt is designed for AI platform and product engineering teams building routing middleware for multi-product platforms. The core job-to-be-done is to analyze a single user request that could plausibly map to multiple products within your ecosystem and determine the primary product intent, any secondary product references, and a confidence score for the disambiguation decision. The ideal user is an engineer or technical product manager who owns a classification service that sits between the user input layer and downstream product-specific workflows, tools, and context retrieval systems. You need this prompt when your platform exposes multiple distinct products, features, or service lines under one interface, and a single ambiguous query like 'I can't export my report' could refer to the Analytics product, the Compliance product, or the Document Builder product depending on context.
Prompt
Multi-Product Intent Disambiguation Prompt

When to Use This Prompt
Define the job, reader, and constraints for the Multi-Product Intent Disambiguation Prompt.
You should not use this prompt when your platform has a single product or when product boundaries are already resolved by explicit user selection, URL path, or API key scoping before the input reaches your AI layer. This prompt is also inappropriate for general topic classification where the taxonomy is flat and non-overlapping—use a standard domain categorization prompt instead. The prompt requires a well-defined product taxonomy as input, including product names, descriptions, and boundary definitions. Without this taxonomy, the model cannot reliably disambiguate. You must also provide the user's raw input and any available session context such as recent pages visited, active subscriptions, or previous intents. The output is a structured disambiguation result containing a primary product label, a list of secondary products with relevance scores, a confidence score, and a brief reasoning trace. This output feeds directly into downstream routing logic, so it must be machine-parseable and deterministic enough to act on without human review for high-confidence cases.
Before deploying this prompt, define your product taxonomy carefully. Overlapping product descriptions cause the same ambiguity in the model that you're trying to resolve. Test the prompt against a golden dataset of ambiguous queries where you know the correct primary product, and measure both top-1 accuracy and whether secondary products are correctly identified when present. Pay special attention to queries that mention features shared across products—these are your highest-failure-mode cases. If your platform has compliance or billing implications for misrouted requests, implement a confidence threshold below which the system escalates to a human reviewer or asks the user a clarifying question rather than routing automatically. The next section provides the copy-ready prompt template you can adapt for your product taxonomy.
Use Case Fit
Where the Multi-Product Intent Disambiguation Prompt works and where it introduces risk. Use these cards to decide if this prompt fits your routing architecture.
Good Fit: Multi-Product Platforms
Use when: a single user request could map to multiple products in your portfolio. The prompt identifies the primary product intent and any secondary product references, enabling correct routing without losing cross-product context. Guardrail: always provide a closed taxonomy of your actual products—never ask the model to infer product names from an open domain.
Bad Fit: Single-Product Systems
Avoid when: your platform has only one product or when product routing is already determined upstream. Adding a disambiguation layer creates unnecessary latency, cost, and potential misrouting. Guardrail: use a simple domain classifier instead, or skip classification entirely if the product context is already known from the channel or session.
Required Inputs
What you need: a defined product taxonomy with clear boundaries, example requests that span product pairs, and a decision hierarchy for resolving conflicts. Guardrail: document your product boundary rules before writing the prompt. If your team cannot agree on which product owns a request, the model will not resolve it consistently.
Operational Risk: Silent Misrouting
What to watch: the prompt may assign high confidence to an incorrect primary product, especially when products share overlapping features or terminology. Guardrail: implement a confidence threshold below which requests are routed to a clarification queue or human review. Log all multi-intent cases for weekly audit.
Operational Risk: Lost Secondary Context
What to watch: downstream handlers may ignore secondary product references, causing the user to repeat context or receive incomplete answers. Guardrail: pass secondary product labels as metadata alongside the primary route. Design downstream prompts to check for and acknowledge secondary product context when present.
Variant: Cross-Product Intent Merging
What to watch: some requests legitimately require coordinated responses from multiple products. Forcing a single primary product can degrade the user experience. Guardrail: add a 'multi-product' routing path that dispatches to a coordinator agent or parallel handlers when the secondary intent score exceeds a defined threshold.
Copy-Ready Prompt Template
A reusable prompt template with square-bracket placeholders for disambiguating primary and secondary product intents from a single user request.
The prompt below is designed to be dropped into a classification or routing middleware layer. It accepts a user request that may reference multiple products and returns a structured JSON object identifying the primary product intent, any secondary product references, and a confidence score. The template uses square-bracket placeholders so you can swap in your own product taxonomy, examples, and constraints without rewriting the core logic.
textYou are a product intent classifier for a multi-product platform. Your job is to analyze a user request and identify which product or products the user is referring to. ## INPUT User Request: [USER_REQUEST] ## PRODUCT TAXONOMY [PRODUCT_TAXONOMY] ## INSTRUCTIONS 1. Identify the PRIMARY product intent: the single product the user most clearly needs. 2. Identify any SECONDARY product references: other products mentioned or implied, even if they are not the main focus. 3. Assign a CONFIDENCE score from 0.0 to 1.0 for the primary classification. 4. If the request is ambiguous between two or more products, flag it as AMBIGUOUS and list the candidate products in order of likelihood. 5. If the request does not match any product in the taxonomy, set primary to "out_of_scope" and confidence to 0.0. ## CONSTRAINTS [CONSTRAINTS] ## EXAMPLES [EXAMPLES] ## OUTPUT SCHEMA Return ONLY valid JSON with this exact structure: { "primary_product": "string", "primary_confidence": 0.0, "secondary_products": ["string"], "is_ambiguous": false, "candidate_products": [{"product": "string", "likelihood": 0.0}], "reasoning": "string" }
To adapt this template, replace [PRODUCT_TAXONOMY] with your actual product list—include product names, short descriptions, and any aliases or common synonyms users might employ. The [CONSTRAINTS] placeholder should contain routing rules such as "if the request mentions billing, always route to the Billing product regardless of other signals" or "do not classify feature requests as support tickets." The [EXAMPLES] block is critical: provide at least five few-shot examples covering single-product requests, multi-product mentions, ambiguous cases, and out-of-scope inputs. After adapting, run the prompt against a golden test set of 50–100 labeled examples and measure primary product accuracy, secondary product recall, and the false-positive rate on the is_ambiguous flag before deploying to production routing.
Prompt Variables
Required and optional inputs for the Multi-Product Intent Disambiguation Prompt. Validate each placeholder before assembly to prevent silent routing failures.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[USER_INPUT] | The raw user request that may reference one or more products | I need to export my analytics data and also check why my billing dashboard shows a different number than the API. | Must be a non-empty string. Truncate to 4000 characters if longer. Check for prompt injection patterns before insertion. |
[PRODUCT_CATALOG] | A structured list of all supported products with names, aliases, and short descriptions | [ {"id": "analytics", "name": "Analytics", "aliases": ["reports", "dashboards"], "desc": "Data export and visualization"}, {"id": "billing", "name": "Billing", "aliases": ["invoices", "payments"], "desc": "Subscription and payment management"} ] | Must be valid JSON array with at least 2 products. Each product requires id, name, and desc fields. Aliases is optional. Validate schema before prompt assembly. |
[MAX_PRODUCTS] | The maximum number of product intents the model should return | 3 | Must be an integer between 1 and 5. Higher values increase false-positive secondary intent detection. Default to 2 if not specified. |
[CONFIDENCE_THRESHOLD] | Minimum confidence score for a product intent to be included in output | 0.65 | Must be a float between 0.0 and 1.0. Intents below this threshold are dropped. Set lower for recall-sensitive routing, higher for precision-sensitive routing. |
[OUTPUT_SCHEMA] | The exact JSON schema the model must follow for structured output | { "primary_intent": {"product_id": "string", "confidence": "float"}, "secondary_intents": [{"product_id": "string", "confidence": "float"}], "reasoning": "string" } | Must be a valid JSON Schema object. Include required fields and type constraints. Validate that downstream routing code can parse this exact shape. |
[ABSTENTION_RULES] | Conditions under which the model should return no product match | Return empty primary_intent if no product confidence exceeds threshold. Return empty secondary_intents if only one product is detected. | Must be explicit string instructions. Test with out-of-domain inputs to verify abstention behavior. Ambiguous abstention rules cause silent misrouting. |
[DISAMBIGUATION_EXAMPLES] | Few-shot examples showing correct disambiguation for overlapping product pairs | Input: 'I can't access my reports or update payment method' Output: primary=billing, secondary=analytics, reasoning='Payment update is billing action; report access is secondary context' | Include 2-4 examples covering common overlap cases. Each example must match the OUTPUT_SCHEMA format. Validate examples don't leak into production prompts unintentionally. |
Implementation Harness Notes
How to wire the Multi-Product Intent Disambiguation Prompt into a production routing middleware layer.
This prompt is designed to sit at the ingress layer of a multi-product AI platform, immediately after user input is received and before any product-specific tool dispatch, context retrieval, or model selection occurs. The implementation harness must treat this prompt as a synchronous classification step with a strict latency budget—typically under 500ms for real-time chat or API flows. The output is a structured JSON payload containing a primary product intent, a list of secondary product references with confidence scores, and an ambiguity flag. Downstream routing logic consumes this payload to determine which product handler, tool set, and policy context to activate. The harness should never pass raw user input directly to product-specific workflows without first running disambiguation, as cross-product context loss leads to incorrect tool selection and broken user experiences.
Wire the prompt into your application as a pre-processing middleware function. The function should accept the user's raw input string and a product taxonomy array as variables, inject them into the prompt template's [USER_INPUT] and [PRODUCT_TAXONOMY] placeholders, and call your chosen model with response_format set to json_schema or equivalent structured output mode. Validate the returned JSON against a schema that requires: primary_intent (string, must match a taxonomy entry), primary_confidence (float 0-1), secondary_intents (array of objects with product and confidence fields), and requires_clarification (boolean). If primary_confidence falls below a configurable threshold—start with 0.7 and tune based on production data—route to a clarification flow rather than auto-dispatching. Log every classification result with the input hash, model version, confidence scores, and final routing decision for offline eval and drift detection. For high-stakes platforms, add a human review queue for inputs where requires_clarification is true or where primary_confidence is below 0.5.
Model choice matters here. Use a fast, instruction-tuned model for this classification task—smaller variants of GPT-4, Claude, or Gemini are sufficient and keep latency low. Avoid using the same large model that handles complex downstream reasoning, as the disambiguation step should be cheap and fast. Implement a retry strategy with exponential backoff for transient failures, but cap retries at two attempts to avoid tail latency spikes. If both attempts fail, fall back to a default routing rule based on the most common product or escalate to a human operator. Do not cache disambiguation results by input text alone—product taxonomies evolve, and identical queries can have different intents based on user context, session history, or feature flags. Instead, include a taxonomy version identifier in your cache key and invalidate on taxonomy updates. The next step after implementing this harness is to build an eval pipeline that compares disambiguation decisions against a human-labeled golden dataset, measuring precision and recall per product category, and monitoring for drift as new products are added to the taxonomy.
Expected Output Contract
Fields, types, and validation rules for the Multi-Product Intent Disambiguation output. Use this contract to parse, validate, and route the model response before downstream systems consume it.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
primary_product_intent | string from [PRODUCT_TAXONOMY] | Must exactly match a canonical product name in [PRODUCT_TAXONOMY]. Reject if no match or if confidence below threshold. | |
primary_confidence | float between 0.0 and 1.0 | Must be a valid float. Reject if value < [MIN_CONFIDENCE_THRESHOLD]. Trigger human review if between [MIN_CONFIDENCE_THRESHOLD] and [AUTO_ROUTE_THRESHOLD]. | |
secondary_product_references | array of strings from [PRODUCT_TAXONOMY] | Each element must match a canonical product name. Remove duplicates. Reject if any element matches primary_product_intent. | |
disambiguation_reasoning | string | Must be non-empty. Must contain at least one explicit signal from [INPUT] that supports the primary choice. Reject if reasoning references products not in [PRODUCT_TAXONOMY]. | |
cross_product_context | array of objects with fields: product (string), signal (string) | Each product field must match [PRODUCT_TAXONOMY]. Each signal field must be a non-empty excerpt or paraphrase from [INPUT]. Reject if signal is fabricated. | |
abstention_flag | boolean | Must be true if primary_confidence < [MIN_CONFIDENCE_THRESHOLD] or if no product signals detected. Must be false otherwise. Reject on mismatch. | |
abstention_reason | string | Required if abstention_flag is true. Must explain why disambiguation failed. Reject if abstention_flag is true and this field is null or empty. | |
input_language | ISO 639-1 code | Must be a valid two-letter language code. Reject if code is not in [SUPPORTED_LANGUAGES] list. Null allowed for monolingual deployments. |
Common Failure Modes
Multi-product intent disambiguation breaks in predictable ways. These are the most common failure modes and how to guard against them before they reach production.
Single-Product Override When Multiple Intents Exist
What to watch: The prompt latches onto the first product mention and ignores secondary product references, causing cross-product context loss. This happens when the model treats classification as a single-label problem despite explicit multi-label instructions. Guardrail: Require the output schema to include a secondary_products array and validate that it is non-empty when the input mentions multiple product names or features from different product areas.
Ambiguous Product Boundary Collapse
What to watch: Overlapping product features cause the model to oscillate between two product labels or assign an arbitrary primary intent. This is common when products share similar functionality or naming conventions. Guardrail: Include a product taxonomy with explicit boundary rules and disambiguation examples in the system prompt. Add a confidence threshold below which the output must flag ambiguity rather than guess.
Implicit Product Reference Miss
What to watch: Users describe a product by its features, use case, or UI elements without naming it directly. The prompt fails to map implicit signals to the correct product, defaulting to a generic or wrong category. Guardrail: Augment the prompt with a feature-to-product mapping table and few-shot examples that demonstrate implicit reference resolution. Test with inputs that describe products without using their official names.
Cross-Product Context Stripping
What to watch: The prompt correctly identifies the primary product but strips away secondary product context that downstream handlers need. The routed handler receives a sanitized input missing critical cross-product signals. Guardrail: Preserve the full original input alongside the classification result. Include a cross_product_context field that extracts and retains references to other products for downstream consumption.
Confidence Inflation on Near-Boundary Inputs
What to watch: The model assigns high confidence to a product classification even when the input sits on a boundary between two products. This causes silent misrouting with no escalation path. Guardrail: Calibrate confidence scoring with a dedicated rubric that penalizes boundary cases. Require explicit reasoning in a disambiguation_rationale field and set a confidence floor below which inputs route to a clarification or human-review queue.
Product Taxonomy Drift After Updates
What to watch: When products are added, renamed, or deprecated, the prompt continues classifying against a stale taxonomy. New products get misclassified as old ones, and deprecated products still appear in outputs. Guardrail: Version the product taxonomy as a configuration artifact separate from the prompt template. Include a taxonomy version field in the output and validate it against the current deployed version. Run regression tests against the updated taxonomy before release.
Evaluation Rubric
Use this rubric to evaluate the quality of the Multi-Product Intent Disambiguation Prompt's output before deploying it to production. Each criterion targets a specific failure mode common in multi-product routing.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Primary Product Identification | The [PRIMARY_PRODUCT] field matches the human-labeled ground truth product for the input. | Output selects a product not in the provided [PRODUCT_CATALOG] or misses the obvious primary intent. | Run against a golden dataset of 100+ ambiguous queries and measure exact match accuracy against human labels. |
Secondary Product Detection | The [SECONDARY_PRODUCTS] list includes all other products referenced in the input and excludes the primary product. | A mentioned product is missing from the list, or the primary product is duplicated in the secondary list. | Parse the output and check set equality between the [SECONDARY_PRODUCTS] list and a human-annotated reference list for each test case. |
Confidence Score Calibration | The [CONFIDENCE_SCORE] is >= 0.85 when the primary intent is unambiguous and <= 0.70 when multiple valid interpretations exist. | The model returns a high confidence score for a query that human evaluators split 50/50 on, or a low score for a clear-cut case. | Bin test cases by human inter-annotator agreement. Measure the correlation between the model's [CONFIDENCE_SCORE] and the observed agreement rate. |
Abstention for Out-of-Scope Inputs | The model returns | The model hallucinates a product mapping for a clearly out-of-scope query like a weather report or a cooking recipe. | Create a test set of 50 out-of-scope inputs. The pass rate is the percentage of cases where [PRIMARY_PRODUCT] is |
Output Schema Compliance | The output is valid JSON that parses without errors and contains all required fields: [PRIMARY_PRODUCT], [SECONDARY_PRODUCTS], [CONFIDENCE_SCORE], and [RATIONALE]. | The output is missing a required field, contains an extra key, or is wrapped in markdown fences that break a JSON parser. | Automated assertion in the eval harness: |
Rationale Grounding | The [RATIONALE] string references specific terms or phrases from the [USER_INPUT] to justify the classification. | The rationale is generic ('based on the user's request') or references information not present in the input. | Use an LLM-as-judge check: 'Does the rationale cite specific evidence from the user input? Answer YES or NO.' Target >95% YES rate. |
Cross-Product Interference Resistance | The model correctly identifies the primary product even when a secondary product is mentioned with higher keyword density. | A query like 'I can't log into ProductA to check my ProductB analytics' is misrouted to ProductB because 'analytics' has a strong keyword association. | Curate a test set of 20 adversarial examples where a secondary product has higher keyword frequency. Measure primary product accuracy on this subset. |
Low-Latency Token Efficiency | The total output tokens are under 150 for a standard classification, excluding the [RATIONALE] field. | The model generates verbose, conversational output or repeats the input unnecessarily before making a decision. | Token counting assertion in the eval harness. Flag any output exceeding the budget for manual review. |
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 product taxonomy list. Use a single model call with no validation layer. Accept the raw JSON output and log it for review. Replace [PRODUCT_TAXONOMY] with a simple array of 3-5 products. Skip confidence thresholds and secondary intent detection initially.
Watch for
- The model inventing products not in your taxonomy
- JSON keys drifting from [OUTPUT_SCHEMA] when you change the taxonomy
- Single-product bias: the model picks one product even when the input clearly references two
- No way to measure accuracy without a labeled test set

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