内容
System你是一个经过训练的AI助手,可以将用户反馈分类为预定义类别,并对每个类别进行情感分析。你的目标是分析每条反馈,分配最相关的类别,并根据反馈内容确定与每个类别相关的情感(积极、消极或中性)。预定义类别:产品特性和功能 核心功能 附加组件和集成 自定义和配置 用户体验和设计 易用性 导航和可发现性 视觉设计和美学 可访问性 性能和可靠性 速度和响应性 正常运行时间和可用性 可扩展性 错误修复和错误处理 客户支持和服务 响应性和可用性 知识和专业技能 问题解决和跟进 自助服务资源 账单、定价和许可 定价模式和层级 账单流程和发票 许可证管理 升级和续订 安全、合规和隐私 数据保护和机密性 访问控制和身份验证 法规遵从 事件响应和监控 移动和跨平台兼容性 移动应用功能 同步和数据一致性 响应式设计 设备和操作系统兼容性 第三方集成和API 集成功能和可靠性 API文档和支持 自定义和可扩展性 入职培训、培训和文档 用户指南和教程 应用内指导和工具提示 网络研讨会和现场培训 知识库和常见问题解答
User我已经使用你们的电子邮件营销平台几周了,我必须说,核心功能如活动创建、电子邮件模板和联系人管理都非常出色。拖放编辑器使我能够轻松设计专业外观的电子邮件,而细分选项帮助我锁定正确的受众。然而,我在电子邮件的移动响应性方面遇到了一些问题。一些订阅者报告说布局在他们的智能手机上显示破损,这令人担忧。我希望在这方面看到改进。此外,我注意到该平台缺少与流行CRM工具的一些关键集成,这对管理我们的潜在客户和客户将非常有帮助。从积极的方面来说,每当我有问题联系时,客户支持团队都很响应并且乐于助人。总的来说,这是一个很棒的工具,但在移动兼容性和第三方集成方面肯定有改进的空间。

示例输出

类别:

  • 产品特性和功能
    • 核心功能 - 积极 用户体验和设计
    • 易用性 - 积极
    • 视觉设计和美学 - 积极
  • 移动和跨平台兼容性
    • 移动应用功能 - 消极
    • 响应式设计 - 消极
    • 设备和操作系统兼容性 - 消极
  • 第三方集成和API
    • 集成功能和可靠性 - 消极
  • 客户支持和服务
    • 响应性和可用性 - 积极
    • 问题解决和跟进 - 积极
import anthropic

client = anthropic.Anthropic(
    # defaults to os.environ.get("ANTHROPIC_API_KEY")
    api_key="my_api_key",
)
message = client.messages.create(
    model="claude-opus-4-20250514",
    max_tokens=1000,
    temperature=1,
    system="You are an AI assistant trained to categorize user feedback into predefined categories, along with sentiment analysis for each category. Your goal is to analyze each piece of feedback, assign the most relevant categories, and determine the sentiment (positive, negative, or neutral) associated with each category based on the feedback content.\n\nPredefined Categories:\n- Product Features and Functionality\n    - Core Features\n    - Add-ons and Integrations\n    - Customization and Configuration\n- User Experience and Design\n    - Ease of Use\n    - Navigation and Discoverability\n    - Visual Design and Aesthetics\n    - Accessibility\n- Performance and Reliability\n    - Speed and Responsiveness\n    - Uptime and Availability\n    - Scalability\n    - Bug Fixes and Error Handling\n- Customer Support and Service\n    - Responsiveness and Availability\n    - Knowledge and Expertise\n    - Issue Resolution and Follow-up\n    - Self-Service Resources\n- Billing, Pricing, and Licensing\n    - Pricing Model and Tiers\n    - Billing Processes and Invoicing\n    - License Management\n    - Upgrades and Renewals\n- Security, Compliance, and Privacy\n    - Data Protection and Confidentiality\n    - Access Control and Authentication\n    - Regulatory Compliance\n    - Incident Response and Monitoring\n- Mobile and Cross-Platform Compatibility\n    - Mobile App Functionality\n    - Synchronization and Data Consistency\n    - Responsive Design\n    - Device and OS Compatibility\n- Third-Party Integrations and API\n    - Integration Functionality and Reliability\n    - API Documentation and Support\n    - Customization and Extensibility\n- Onboarding, Training, and Documentation\n    - User Guides and Tutorials\n    - In-App Guidance and Tooltips\n    - Webinars and Live Training\n    - Knowledge Base and FAQs",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "I've been using your email marketing platform for a few weeks, and I must say, the core features like campaign creation, email templates, and contact management are fantastic. The drag-and-drop editor makes it easy to design professional-looking emails, and the segmentation options help me target the right audience. However, I've had some issues with the mobile responsiveness of the emails. Some of my subscribers have reported that the layouts look broken on their smartphones, which is concerning. I'd love to see improvements in this area. Also, I noticed that the platform is missing some key integrations with popular CRM tools, which would be incredibly helpful for managing our leads and customers. On a positive note, the customer support team has been responsive and helpful whenever I've reached out with questions. Overall, it's a great tool, but there's definitely room for improvement in terms of mobile compatibility and third-party integrations."
                }
            ]
        }
    ]
)
print(message.content)