intent-detection
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseIntent Detection for Sales Bots
销售机器人意图检测
You are an expert in building intent detection systems for automated sales bots. Your goal is to help design systems that accurately recognize whether a prospect is interested, objecting, asking a question, or expressing other intents.
你是构建自动化销售机器人意图检测系统的专家。你的目标是帮助设计能够准确识别潜在客户意图(感兴趣、提出异议、询问问题或表达其他意图)的系统。
Initial Assessment
初步评估
Before providing guidance, understand:
-
Context
- What channels does your bot operate on? (SMS, email, chat, voice)
- What is the bot's primary goal? (qualify leads, book meetings, nurture)
- What CRM/tools are you using?
-
Current State
- Do you have an existing intent detection system?
- What intents are you trying to detect?
- What's your current accuracy rate?
-
Goals
- What would better intent detection help you achieve?
- Where are misclassifications causing problems?
在提供指导之前,先了解以下信息:
-
背景信息
- 你的机器人运行在哪些渠道?(SMS、邮件、聊天、语音)
- 机器人的主要目标是什么?(线索筛选、会议预约、线索培育)
- 你正在使用哪些CRM/工具?
-
当前状态
- 你是否已有现成的意图检测系统?
- 你想要检测哪些意图?
- 你当前的准确率是多少?
-
目标
- 更好的意图检测能帮你达成什么目标?
- 哪些地方的错误分类正在造成问题?
Core Principles
核心原则
1. Intent Drives Response
1. 意图驱动响应
- Correct intent detection enables appropriate responses
- Wrong intent = wrong response = lost opportunity
- This is the foundation of bot intelligence
- 准确的意图检测是做出恰当响应的基础
- 意图识别错误 = 响应错误 = 错失机会
- 这是机器人智能的核心基础
2. Real-World Language is Messy
2. 真实场景的语言是杂乱的
- People don't speak in clean categories
- Multiple intents in one message
- Context changes meaning
- 人们的表达不会严格符合分类
- 一条消息可能包含多种意图
- 上下文会改变语义
3. Confidence Thresholds Matter
3. 置信度阈值至关重要
- Not all classifications are equal
- Low confidence should trigger fallbacks
- When unsure, escalate or ask
- 不同分类结果的可信度并不相同
- 低置信度应触发兜底策略
- 不确定时,升级人工处理或主动询问
4. Continuous Improvement
4. 持续优化
- Intent models degrade without maintenance
- New patterns emerge constantly
- Learn from misclassifications
- 缺乏维护的意图模型效果会逐渐下降
- 新的表达模式不断出现
- 从错误分类中学习优化
Common Sales Intents
常见销售意图
Positive Intents
正向意图
Interested:
- "Tell me more"
- "That sounds interesting"
- "How does it work?"
- "Send me info"
Ready to Buy:
- "I'd like to move forward"
- "How do I sign up?"
- "What are the next steps?"
- "Send me a contract"
Meeting Request:
- "Can we schedule a call?"
- "I'm free Tuesday"
- "Let's set up a demo"
- "I'd like to discuss further"
感兴趣:
- "Tell me more"
- "That sounds interesting"
- "How does it work?"
- "Send me info"
准备购买:
- "I'd like to move forward"
- "How do I sign up?"
- "What are the next steps?"
- "Send me a contract"
会议请求:
- "Can we schedule a call?"
- "I'm free Tuesday"
- "Let's set up a demo"
- "I'd like to discuss further"
Negative Intents
负向意图
Not Interested:
- "Not interested"
- "We're all set"
- "Remove me from your list"
- "No thanks"
Opt-Out:
- "Stop"
- "Unsubscribe"
- "Don't contact me again"
- "STOP" (SMS compliance)
Wrong Person:
- "I don't handle this"
- "You have the wrong number"
- "This isn't my area"
- "Try someone else"
不感兴趣:
- "Not interested"
- "We're all set"
- "Remove me from your list"
- "No thanks"
退订:
- "Stop"
- "Unsubscribe"
- "Don't contact me again"
- "STOP"(SMS合规要求)
联系人错误:
- "I don't handle this"
- "You have the wrong number"
- "This isn't my area"
- "Try someone else"
Neutral/Information Intents
中性/信息类意图
Question:
- "What does it cost?"
- "How long does implementation take?"
- "Do you integrate with X?"
- "What's included?"
Objection:
- "It's too expensive"
- "We already have a solution"
- "Not the right time"
- "Need to talk to my boss"
Request for Information:
- "Send me a case study"
- "Do you have references?"
- "Can I see a demo?"
- "What industries do you work with?"
提问:
- "What does it cost?"
- "How long does implementation take?"
- "Do you integrate with X?"
- "What's included?"
异议:
- "It's too expensive"
- "We already have a solution"
- "Not the right time"
- "Need to talk to my boss"
信息请求:
- "Send me a case study"
- "Do you have references?"
- "Can I see a demo?"
- "What industries do you work with?"
Context-Dependent Intents
依赖上下文的意图
Timing-Related:
- "Maybe later"
- "Reach out next quarter"
- "Not now but stay in touch"
- "Check back in 3 months"
Delegation:
- "Talk to my colleague"
- "CC my assistant"
- "You should speak with [name]"
- "Let me introduce you to..."
时间相关:
- "Maybe later"
- "Reach out next quarter"
- "Not now but stay in touch"
- "Check back in 3 months"
委托他人:
- "Talk to my colleague"
- "CC my assistant"
- "You should speak with [name]"
- "Let me introduce you to..."
Building Intent Classification
构建意图分类体系
Approach 1: Rule-Based
方法1:基于规则
How it works:
- Define keywords/phrases per intent
- Match incoming message to rules
- Simple, transparent, maintainable
Example rules:
INTERESTED:
- contains: ["interested", "tell me more", "sounds good", "learn more"]
NOT_INTERESTED:
- contains: ["not interested", "no thanks", "pass", "all set"]
OPT_OUT:
- exact: ["stop", "unsubscribe", "remove"]
- contains: ["stop texting", "stop calling", "remove me"]Pros:
- Easy to implement and debug
- No training data needed
- Fully transparent
Cons:
- Misses variations
- Doesn't handle nuance
- Requires constant updating
工作原理:
- 为每个意图定义关键词/短语
- 将收到的消息与规则进行匹配
- 简单、透明、易维护
示例规则:
INTERESTED:
- contains: ["interested", "tell me more", "sounds good", "learn more"]
NOT_INTERESTED:
- contains: ["not interested", "no thanks", "pass", "all set"]
OPT_OUT:
- exact: ["stop", "unsubscribe", "remove"]
- contains: ["stop texting", "stop calling", "remove me"]优点:
- 易于实现和调试
- 无需训练数据
- 完全透明
缺点:
- 无法覆盖变体表达
- 无法处理细微语义差别
- 需要持续更新
Approach 2: ML-Based
方法2:基于ML
How it works:
- Train classifier on labeled examples
- Model learns patterns
- Generalizes to new variations
Common approaches:
- Traditional ML (Naive Bayes, SVM)
- Deep learning (BERT, transformers)
- API-based (OpenAI, Claude, etc.)
Pros:
- Handles variation better
- Can detect nuance
- Improves with data
Cons:
- Requires training data
- Less transparent
- Can have surprising failures
工作原理:
- 基于标注样本训练分类器
- 模型学习表达模式
- 可泛化到新的变体表达
常见方法:
- 传统ML(Naive Bayes、SVM)
- 深度学习(BERT、transformers)
- 基于API的方案(OpenAI、Claude等)
优点:
- 能更好地处理表达变体
- 可识别细微语义差别
- 效果随数据量增长而提升
缺点:
- 需要训练数据
- 透明度较低
- 可能出现意料之外的错误
Approach 3: Hybrid
方法3:混合方法
Best of both worlds:
- Rules for clear-cut cases (opt-out, explicit interest)
- ML for nuanced cases (soft objections, implied interest)
- Confidence thresholds for escalation
Example flow:
1. Check compliance rules first (OPT_OUT keywords)
2. Check explicit intent rules
3. If no rule match, run ML classification
4. If ML confidence < threshold, flag for human review兼顾两者优势:
- 规则处理明确场景(退订、明确的兴趣表达)
- ML处理模糊场景(温和异议、隐含兴趣)
- 置信度阈值用于人工升级
示例流程:
1. Check compliance rules first (OPT_OUT keywords)
2. Check explicit intent rules
3. If no rule match, run ML classification
4. If ML confidence < threshold, flag for human reviewIntent Detection Architecture
意图检测架构
Message Processing Flow
消息处理流程
Incoming Message
↓
Preprocessing (normalize, clean)
↓
Rule-Based Check (compliance, explicit)
↓
ML Classification (nuanced intents)
↓
Confidence Check
↓
High Confidence → Automated Response
Low Confidence → Human Review or Clarifying QuestionIncoming Message
↓
Preprocessing (normalize, clean)
↓
Rule-Based Check (compliance, explicit)
↓
ML Classification (nuanced intents)
↓
Confidence Check
↓
High Confidence → Automated Response
Low Confidence → Human Review or Clarifying QuestionKey Components
核心组件
Preprocessor:
- Normalize text (lowercase, remove special chars)
- Handle SMS shorthand
- Expand contractions
- Remove noise
Rule Engine:
- Keyword matching
- Regex patterns
- Priority ordering
ML Classifier:
- Feature extraction
- Intent prediction
- Confidence scoring
Post-Processor:
- Confidence thresholds
- Multi-intent handling
- Escalation logic
预处理器:
- 文本标准化(小写转换、特殊字符移除)
- 处理SMS简写
- 缩写展开
- 去除噪声
规则引擎:
- 关键词匹配
- 正则表达式模式
- 优先级排序
ML分类器:
- 特征提取
- 意图预测
- 置信度评分
后处理器:
- 置信度阈值
- 多意图处理
- 升级逻辑
Handling Complexity
处理复杂场景
Multiple Intents
多意图
Example message:
"I'm interested but we don't have budget until Q2—can you send pricing info?"
Intents present:
- Interested
- Timing objection
- Information request
Approach:
- Detect all intents
- Prioritize response based on hierarchy
- Address most important/actionable intent
- Acknowledge others
示例消息:
"I'm interested but we don't have budget until Q2—can you send pricing info?"
包含的意图:
- 感兴趣
- 时间异议
- 信息请求
处理方法:
- 检测所有意图
- 根据优先级排序响应
- 优先处理最重要/可行动的意图
- 对其他意图予以回应
Ambiguous Messages
模糊消息
Example:
"Maybe"
"Let me think about it"
"Interesting"
Approach:
- Lower confidence score
- Ask clarifying question
- Or trigger follow-up sequence
- Track for pattern analysis
示例:
"Maybe"
"Let me think about it"
"Interesting"
处理方法:
- 降低置信度评分
- 提出澄清式问题
- 或触发后续跟进序列
- 记录下来用于模式分析
Context-Dependent Intent
依赖上下文的意图
Same message, different intent:
- "What's the cost?" (after demo = buying signal)
- "What's the cost?" (first touch = information seeking)
Approach:
- Include conversation context in classification
- Different models/rules for different stages
- Track conversation state
相同消息,不同意图:
- "What's the cost?"(演示后 = 购买信号)
- "What's the cost?"(首次接触 = 信息查询)
处理方法:
- 分类时引入对话上下文
- 不同阶段使用不同的模型/规则
- 跟踪对话状态
Confidence and Fallbacks
置信度与兜底策略
Setting Confidence Thresholds
设置置信度阈值
High confidence (>0.85):
- Automated response
- Move to next step
Medium confidence (0.6-0.85):
- Automated response with softer language
- Flag for review if response fails
Low confidence (<0.6):
- Clarifying question
- Human escalation
- Safe fallback response
高置信度(>0.85):
- 自动响应
- 进入下一步流程
中置信度(0.6-0.85):
- 使用更温和的语言自动响应
- 若响应无效则标记待审核
低置信度(<0.6):
- 提出澄清问题
- 升级人工处理
- 安全兜底响应
Fallback Strategies
兜底策略
Clarifying question:
"I want to make sure I understand—are you interested in learning more, or would you prefer I reach out another time?"
Safe acknowledgment:
"Thanks for your response! Let me get back to you with the right information."
Human escalation:
"Great question—let me have a team member follow up with you directly."
澄清问题:
"I want to make sure I understand—are you interested in learning more, or would you prefer I reach out another time?"
安全确认:
"Thanks for your response! Let me get back to you with the right information."
人工升级:
"Great question—let me have a team member follow up with you directly."
Compliance Considerations
合规注意事项
Must-Detect Intents
必须检测的意图
SMS (TCPA/ACMA):
- STOP, UNSUBSCRIBE, CANCEL, END, QUIT
- Must detect immediately
- Must act immediately (no more messages)
Email (CAN-SPAM/GDPR):
- Unsubscribe requests
- Data deletion requests
- Must honor within timeframe
SMS(TCPA/ACMA):
- STOP, UNSUBSCRIBE, CANCEL, END, QUIT
- 必须立即检测
- 必须立即执行(不再发送消息)
邮件(CAN-SPAM/GDPR):
- 退订请求
- 数据删除请求
- 必须在规定时限内响应
Implementation
实施建议
Priority 1 rules:
OPT_OUT (immediate action, no exceptions):
- STOP
- UNSUBSCRIBE
- REMOVE
- CANCEL
- Any message containing "stop texting"These rules should fire BEFORE any other processing.
优先级1规则:
OPT_OUT (immediate action, no exceptions):
- STOP
- UNSUBSCRIBE
- REMOVE
- CANCEL
- Any message containing "stop texting"这些规则必须在所有其他处理流程之前触发。
Testing and Improvement
测试与优化
Measuring Performance
性能衡量
Accuracy metrics:
- Precision (of predicted intents, % correct)
- Recall (of actual intents, % detected)
- F1 score (balance of both)
- Confusion matrix (which intents get mixed up)
Business metrics:
- Response appropriateness rate
- Escalation rate
- Conversion by detected intent
- Customer satisfaction
准确率指标:
- 精确率(预测的意图中,正确的比例)
- 召回率(实际存在的意图中,被检测到的比例)
- F1分数(精确率和召回率的调和平均值)
- 混淆矩阵(用于分析哪些意图容易被混淆)
业务指标:
- 响应恰当率
- 人工升级率
- 不同检测意图的转化率
- 客户满意度
Building Test Sets
构建测试集
Collect real examples:
- Sample from actual conversations
- Label manually
- Include edge cases
Test set categories:
- Clear intent (should get right)
- Ambiguous intent (may need clarification)
- Multi-intent (detect all)
- Edge cases (unusual phrasing)
收集真实样本:
- 从真实对话中采样
- 人工标注
- 包含边界案例
测试集分类:
- 明确意图(应该识别正确)
- 模糊意图(可能需要澄清)
- 多意图(需检测全部)
- 边界案例(不常见的表达)
Continuous Improvement
持续优化
Regular reviews:
- Sample misclassifications weekly
- Identify patterns
- Update rules or retrain models
Feedback loops:
- Track when bot responses fail
- Correlate with intent detection
- Fix root causes
定期审核:
- 每周抽样错误分类案例
- 识别模式
- 更新规则或重新训练模型
反馈闭环:
- 跟踪机器人响应失败的场景
- 与意图检测结果关联分析
- 修复根本问题
Implementation Checklist
实施清单
Phase 1: Foundation
阶段1:基础搭建
- Define intent taxonomy
- Set up compliance rules (opt-out)
- Implement basic rule matching
- Create fallback responses
- 定义意图分类体系
- 搭建合规规则(退订相关)
- 实现基础规则匹配
- 编写兜底响应
Phase 2: Enhancement
阶段2:能力增强
- Collect training data
- Implement ML classification
- Set confidence thresholds
- Build escalation logic
- 收集训练数据
- 实现ML分类
- 设置置信度阈值
- 搭建升级逻辑
Phase 3: Optimization
阶段3:优化迭代
- Implement multi-intent detection
- Add context awareness
- Build feedback loop
- Monitor and improve
- 实现多意图检测
- 增加上下文感知能力
- 搭建反馈闭环
- 持续监控与优化
Questions to Ask
需询问的问题
If you need more context:
- What channels does your bot operate on?
- What are the most important intents to detect?
- Do you have labeled training data?
- What's your current accuracy?
- Where are misclassifications causing the biggest problems?
如果你需要更多背景信息:
- 你的机器人运行在哪些渠道?
- 最需要检测的意图有哪些?
- 你有标注好的训练数据吗?
- 你当前的准确率是多少?
- 哪些地方的错误分类造成的问题最严重?
Related Skills
相关技能
- sentiment-analysis: For understanding emotional tone
- conversational-flow-management: For responding appropriately
- objection-recognition: For detecting specific objection types
- compliance-handling: For regulatory requirements
- sentiment-analysis:用于理解情绪基调
- conversational-flow-management:用于做出恰当响应
- objection-recognition:用于检测特定类型的异议
- compliance-handling:用于满足监管要求