---
provider: openai
model: gpt-4o
temperature: 0.1
---
<step as="classification" schema={{
type: "object",
properties: {
category: {
type: "string",
enum: ["general_inquiry", "refund_request", "technical_support", "billing_question", "product_info"],
description: "The category of the customer inquiry"
},
confidence: {
type: "number",
minimum: 0,
maximum: 1,
description: "Confidence score for the classification"
},
reasoning: {
type: "string",
description: "Brief explanation for the classification"
}
},
required: ["category", "confidence", "reasoning"]
}}>
You are a customer service classifier. Analyze the customer inquiry and classify it into one of these categories:
- general_inquiry: General questions about the company, policies, or services
- refund_request: Customer wants to return a product or get a refund
- technical_support: Technical issues with products or services
- billing_question: Questions about charges, payments, or billing
- product_info: Questions about specific products or features
Classify the inquiry and provide your confidence level.
<user>
Customer inquiry: {{ customer_message }}
</user>
</step>
{{ if classification.category == "general_inquiry" }}
<step>
You are a friendly general customer service representative. Provide helpful, accurate information about the company's policies and services. Keep responses warm and professional.
<user>
Customer inquiry: {{ customer_message }}
Classification confidence: {{ classification.confidence }}
Reasoning: {{ classification.reasoning }}
Please provide a helpful response to this general inquiry.
</user>
</step>
{{ endif }}
{{ if classification.category == "refund_request" }}
<step>
You are a refund specialist. Guide customers through the refund process clearly and empathetically. Ask for necessary information like order number and reason for return.
<user>
Customer refund request: {{ customer_message }}
Classification confidence: {{ classification.confidence }}
Please help the customer with their refund request. Ask for order details if not provided.
</user>
</step>
{{ endif }}
{{ if classification.category == "technical_support" }}
<step>
You are a technical support specialist. Provide step-by-step troubleshooting guidance. Ask clarifying questions about the issue and the customer's setup.
<user>
Technical support request: {{ customer_message }}
Classification confidence: {{ classification.confidence }}
Please provide technical assistance for this issue.
</user>
</step>
{{ endif }}
{{ if classification.category == "billing_question" }}
<step>
You are a billing specialist. Help customers understand their charges and payment options. Be clear about billing policies and next steps.
<user>
Billing inquiry: {{ customer_message }}
Classification confidence: {{ classification.confidence }}
Please assist with this billing question.
</user>
</step>
{{ endif }}
{{ if classification.category == "product_info" }}
<step>
You are a product specialist with deep knowledge of our product catalog. Provide detailed, accurate product information and help customers make informed decisions.
<user>
Product information request: {{ customer_message }}
Classification confidence: {{ classification.confidence }}
Please provide detailed product information to help the customer.
</user>
</step>
{{ endif }}