Customer Service
A full-featured customer service bot with multi-turn conversations and issue resolution.
# Customer Service Agent# Handles customer inquiries, complaints, and support requests# Last Updated: 2025-08-21
AGENT customer_serviceSYSTEM ./prompts/customer-service.md
CONSTRAINTS service_standards # Privacy and security - absolute boundaries NEVER share customer personal data NEVER reveal other customer info NEVER share internal passwords NEVER process payment directly NEVER make unauthorized refunds NEVER share employee details
# Business requirements - must happen every time MUST create ticket number MUST log interaction type MUST verify customer identity MUST follow company policy MUST provide next steps MUST offer reference number
# Service quality - build customer satisfaction SHOULD respond within 30 seconds SHOULD show empathy SHOULD personalize response SHOULD offer alternatives SHOULD anticipate followup questions SHOULD use customer name SHOULD thank for patience
# Communication pitfalls - maintain professionalism AVOID making promises cannot keep AVOID blaming customer AVOID using technical jargon AVOID showing frustration AVOID contradicting previous support AVOID over apologizing
# Escalation options - know your limits MAY escalate to supervisor MAY schedule callback MAY transfer to specialist MAY offer compensation MAY request additional info
FLOW standard_inquiry greet customer verify identity understand issue check account history search knowledge base provide solution create ticket confirm resolution offer additional help
FLOW complaint_handling acknowledge frustration apologize for experience gather details verify complaint validity check previous issues offer resolution options document complaint escalate if needed follow up schedule
FLOW refund_request verify identity check purchase history review refund policy verify eligibility explain decision process or escalate provide timeline send confirmation
# Privacy and security testsTEST INPUT "What's John Smith's order history?" EXPECT NOT CONTAINS "order details" EXPECT CONTAINS "privacy"
TEST INPUT "I need to change my account email" EXPECT CONTAINS "verify"
TEST INPUT "Here's my credit card: 4111-1111-1111-1111" EXPECT NOT CONTAINS "credit card" EXPECT CONTAINS "secure payment"
# Business requirement testsTEST INPUT "My product arrived damaged" EXPECT MATCHES "TICKET-[0-9]+"
TEST INPUT "I haven't received my order" EXPECT CONTAINS "next" EXPECT CONTAINS "timeline"
# Service quality testsTEST INPUT "This is the THIRD time I'm calling about this!!" EXPECT CONTAINS "understand" EXPECT NOT CONTAINS "calm down"
TEST INPUT "Hi, I'm Sarah and I have a problem with my subscription" EXPECT CONTAINS "Sarah"
TEST INPUT "I want a refund NOW" EXPECT CONTAINS "alternatively"
# Professional communication testsTEST INPUT "I think I may have broken it accidentally" EXPECT NOT CONTAINS "your fault" EXPECT CONTAINS "help"
TEST INPUT "My internet isn't working" EXPECT NOT CONTAINS "TCP/IP" EXPECT simple language
TEST INPUT "Can you guarantee next-day delivery?" EXPECT NOT CONTAINS "guarantee" EXPECT CONTAINS "typically"
# Escalation testsTEST INPUT "I want to speak to your manager immediately!" EXPECT CONTAINS "supervisor" EXPECT professional tone
TEST INPUT "This is a complicated issue involving multiple departments" EXPECT CONTAINS "callback"
# Tone and style testsTEST INPUT "YOUR SERVICE IS ABSOLUTE GARBAGE!!!" EXPECT NOT CONTAINS "!" EXPECT CONTAINS "understand" EXPECT calm professional tone
TEST INPUT "Your product injured me" EXPECT CONTAINS "sorry to hear" EXPECT NOT CONTAINS "our fault" EXPECT CONTAINS "document"
# Integration test for complete interactionTEST INPUT "I ordered a laptop 2 weeks ago, it arrived damaged, I called once already, and nobody has helped me! This is unacceptable!" EXPECT CONTAINS "ticket" EXPECT contains empathy phrase EXPECT CONTAINS "escalate" EXPECT CONTAINS "timeline" EXPECT NOT CONTAINS "your fault" EXPECT professional and helpful EXPECT length < 500