Multi-level label recognition prompt examples
Updated at:
This document shows how to configure prompts for the multi-level label recognition instruction in Agent management.
Multi-level label recognition instruction
The recognition process involves up to five steps, such as Step 1, Step 2, and Step 3. These steps correspond to the levels of the label tree.

Configuration
Note
These examples are for reference only. Adapt the configuration to your specific business scenarios.
Step 1 (First-level label)
# Background knowledge
## Label library usage rules
You will receive a structured label library. The library's fields are fixed: Name, Definition, Decision Rule, Keyword, Common Questions. You must make decisions strictly based on these fields and not expand the label boundaries.
- Name:
The only valid output value for a label. The final output must only be the "Name" of a label from the label library. Do not modify, abbreviate, combine, or fabricate names.
- Definition:
Used to understand the core scope and boundaries of the label. This is an important basis for judgment, but you must not use it to excessively broaden the scope of categorization.
- Decision Rule:
Has the highest priority and must be referenced first.
- If a user's question matches a clear scenario in the "Decision Rule", it should be assigned to the corresponding label, even if keywords do not fully match.
- If multiple labels seem relevant, prioritize the one with a more specific "Decision Rule" that closely matches the user's question.
- If the "Decision Rule" conflicts with other fields, the more specific and explicit rule takes precedence.
- Common Questions:
Provides supplementary information about typical scenarios for a label and should be used as an important reference.
- If the user's expression is highly consistent with a label's "Common Questions", you can assign it to that label.
- If "Common Questions" conflict with the "Decision Rule", the "Decision Rule" takes precedence.
- Keyword:
Serves only as an auxiliary clue and is not decisive.
- The presence of a keyword does not automatically mean the query should be assigned to that category.
- The absence of a keyword does not exclude that label.
- You must make a comprehensive judgment based on the user's semantics and other fields.
## Invalid session (Strictly limited, do not expand)
A conversation can be classified as an "invalid session" only if it meets one of the following criteria.
Specific invalid scenarios include:
- The user has not spoken; only the customer service Agent has offered a greeting or asked a question.
- The query is only about the customer service phone number or is a complaint/compliment about customer service.
- The query is only about the full company name or address of Qwen browser.
- The query is only about the process for police evidence requests or media interviews.
- The user sends garbled text, emojis, meaningless characters, or images with no text information.
- The user is only asking for an update on a previous ticket or complaining about the slow processing of a previous ticket, and has not raised a new question or request.
Aside from these, all conversations involving Qwen product features, rights usage, event inquiries, or usage questions are considered valid sessions, no matter how simple the question is.
The model is strictly prohibited from summarizing or adding new "invalid" types (such as "simple confirmation questions" or "no substantive questions").
## Label library
${labels}
# Task definition
Candidate labels for the decision result
- Only one of the following is allowed (single choice, output as a single-element list):
1. A valid "Name" of a label from the label library;
2. "invalid session"
- remarks must concisely explain the reasoning for the decision based on the user's original wording and context, showing the logical chain from the user's question to the matched label.
Decision logic
Focus: Analyze the conversation content between the user (User) and customer service (Agent), or an app store review, to identify the single best-matching scenario label. The input scope is the full text within the # Content to analyze fence. Do not introduce any information from outside the fence.
### Step 1: Understand the user's core issue
Read the entire conversation and focus on the user's true request, the problem they have encountered, or the issue they want to resolve.
You must follow these principles when making a decision:
- You must focus on the problem scenario described in the user's initial turn.
- You can use the context to help identify the issue, but do not make subjective assumptions that deviate from the user's original semantics.
- When the user's point of inquiry is unclear, you can infer the user's issue from the Agent's guidance, response, or solution, but the inference must be supported by clear semantic evidence.
- For app store reviews, you should also extract the user's main subject of feedback, issue, or request.
### Step 2: Determine if the conversation is an invalid session
- Yes → Output the label "invalid session".
- No → Proceed to Step 3.
### Step 3: Match against the label library
Refer to the label library usage rules in the # Background knowledge section and make decisions strictly based on the fields.
Matching principles:
- Prioritize matching based on the user's expressed core issue/request, not on scattered keywords.
- If multiple labels are relevant, choose the one that is the most direct, specific, and closest match to the user's question.
- Do not output a label name that does not exist in the label library.
- Do not treat examples, subcategories, or illustrations from the Definition, Decision Rule, or Common Questions fields as new output labels, unless they are explicitly defined as labels in the label library.
### Prohibited actions
- Do not rewrite, abbreviate, or fabricate label names.
- Do not output multiple labels.
- Do not add extra fields.
- Do not make subjective guesses that are not based on the conversation content.
- Do not classify an issue as "other issues" just because the question is simple, the description is short, or it lacks keywords.
# Content to analyze
text
${dialogue}
Steps 2-5 (Levels 2-5)
# Background knowledge
## Label library usage rules
You will receive a structured label library. The library's fields are fixed: Name, Definition, Decision Rule, Keyword, Common Questions. You must make decisions strictly based on these fields and not expand the label boundaries.
- Name:
The only valid output value for a label. The final output must only be the "Name" of a label from the label library. Do not modify, abbreviate, combine, or fabricate names.
- Definition:
Used to understand the core scope and boundaries of the label. This is an important basis for judgment, but you must not use it to excessively broaden the scope of categorization.
- Decision Rule:
Has the highest priority and must be referenced first.
- If a user's question matches a clear scenario in the "Decision Rule", it should be assigned to the corresponding label, even if keywords do not fully match.
- If multiple labels seem relevant, prioritize the one with a more specific "Decision Rule" that closely matches the user's question.
- If the "Decision Rule" conflicts with other fields, the more specific and explicit rule takes precedence.
- Common Questions:
Provides supplementary information about typical scenarios for a label and should be used as an important reference.
- If the user's expression is highly consistent with a label's "Common Questions", you can assign it to that label.
- If "Common Questions" conflict with the "Decision Rule", the "Decision Rule" takes precedence.
- Keyword:
Serves only as an auxiliary clue and is not decisive.
- The presence of a keyword does not automatically mean the query should be assigned to that category.
- The absence of a keyword does not exclude that label.
- You must make a comprehensive judgment based on the user's semantics and other fields.
## Label library
${labels}
# Task definition
Candidate labels for the decision result
- Only one of the following is allowed (single choice, output as a single-element list):
1. A valid "Name" of a label from the label library;
2. `"other issues"` (use this only when the user's issue is clear and cannot match any specific label in the label library).
- remarks must concisely explain the reasoning for the decision based on the user's original wording and context, showing the logical chain from the user's question to the matched label.
Decision logic
Focus: Analyze the conversation content between the user (User) and customer service (Agent), or an app store review, to identify the single best-matching scenario label. The input scope is the full text within the # Content to analyze fence. Do not introduce any information from outside the fence.
### Step 1: Understand the user's core issue
Read the entire conversation and focus on the user's true request, the problem they have encountered, or the issue they want to resolve.
You must follow these principles when making a decision:
- You must focus on the problem scenario described in the user's initial turn.
- You can use the context to help identify the issue, but do not make subjective assumptions that deviate from the user's original semantics.
- When the user's point of inquiry is unclear, you can infer the user's issue from the Agent's guidance, response, or solution, but the inference must be supported by clear semantic evidence.
- For app store reviews, you should also extract the user's main subject of feedback, issue, or request.
### Step 2: Match against the label library
Refer to the label library usage rules in the # Background knowledge section and make decisions strictly based on the fields.
Matching principles
- Prioritize matching based on the user's expressed core issue/request, not on scattered keywords.
- If multiple labels are relevant, choose the one that is the most direct, specific, and closest match to the user's question.
- Do not output a label name that does not exist in the label library.
- Do not treat examples, subcategories, or illustrations from the Definition, Decision Rule, or Common Questions fields as new output labels, unless they are explicitly defined as labels in the label library.
### Step 3: Fallback rule
If the user's issue is clear but cannot be matched to any specific label in the label library, output "other issues".
The "other issues" label must be used only if all of the following conditions are met:
- The user has a clear question, request, review subject, or inquiry.
- The issue does not fit any of the defined labels in the label library.
- The label is not used simply because there is too little information; it is used only after a thorough comparison still fails to find a match.
### Prohibited actions
- Do not rewrite, abbreviate, or fabricate label names.
- Do not output multiple labels.
- Do not add extra fields.
- Do not make subjective guesses that are not based on the conversation content.
- Do not classify an issue as "other issues" just because the question is simple, the description is short, or it lacks keywords.
# Content to analyze
text
${dialogue}
Examples
Model: Linjue-Plus
Step 1: Configure the first-level label and its prompt for the corresponding label tree.
Step 2: Configure the second-level label and its prompt for the corresponding label tree.
Click Add Step, configure the prompt for each level in turn, and then click Save Configuration.
Is this page helpful?