
八、实验设计方案
8.1 数据集设计
建议构建一个多场景中文共情对话数据集。
场景分类
| 客服投诉 | 订单、退款、物流、系统故障 |
| 学习辅导 | 学不会、考试焦虑、代码报错 |
| 工作压力 | 加班、沟通冲突、任务失败 |
| 情绪倾诉 | 难过、焦虑、失落 |
| 决策支持 | 不知道如何选择 |
| 高风险表达 | 自伤、自杀、极端痛苦 |
8.2 标注字段
每条样本建议标注:
{
\”user_text\”: \”我改了一晚上还是不行,真的受不了了\”,
\”emotion\”: \”frustration\”,
\”emotion_intensity\”: 0.86,
\”intent\”: \”task_help\”,
\”explicit_need\”: \”解决问题\”,
\”implicit_need\”: \”获得安抚和鼓励\”,
\”risk_level\”: \”low\”,
\”best_strategies\”: [\”情绪确认\”, \”处境复述\”, \”行动建议\”],
\”bad_response_example\”: \”请检查配置。\”,
\”good_response_example\”: \”这确实会让人很挫败,尤其是你已经花了一晚上。我们先别继续盲改,把报错信息和最近改动列出来,我帮你一步步定位。\”
}
8.3 对比实验
可以设计 4 组模型进行比较:
| Baseline A | 普通大模型直接回复 |
| Baseline B | 规则模板共情回复 |
| Model C | 情绪识别 + Prompt 生成 |
| Model D | 情绪识别 + 意图识别 + 策略选择 + 安全校验 |
推荐目标是证明:
完整架构 Model D
在共情恰当性、任务帮助度、安全性、用户满意度上优于其他方法
8.4 A/B 测试指标
线上可以使用:
| 用户满意度提升 | +5% ~ +15% |
| 负反馈率下降 | -5% ~ -20% |
| 对话完成率提升 | +3% ~ +10% |
| 转人工率下降 | 客服场景可优化 |
| 高风险召回率 | 尽量接近 100% |
| 过度共情率 | 控制在较低水平 |
九、可落地的服务架构
9.1 微服务划分
#mermaid-svg-FjNm1PYrbFOmLIR7{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-FjNm1PYrbFOmLIR7 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-FjNm1PYrbFOmLIR7 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-FjNm1PYrbFOmLIR7 .error-icon{fill:#552222;}#mermaid-svg-FjNm1PYrbFOmLIR7 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-FjNm1PYrbFOmLIR7 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-FjNm1PYrbFOmLIR7 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-FjNm1PYrbFOmLIR7 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-FjNm1PYrbFOmLIR7 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-FjNm1PYrbFOmLIR7 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-FjNm1PYrbFOmLIR7 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-FjNm1PYrbFOmLIR7 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-FjNm1PYrbFOmLIR7 .marker.cross{stroke:#333333;}#mermaid-svg-FjNm1PYrbFOmLIR7 svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-FjNm1PYrbFOmLIR7 p{margin:0;}#mermaid-svg-FjNm1PYrbFOmLIR7 .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-FjNm1PYrbFOmLIR7 .cluster-label text{fill:#333;}#mermaid-svg-FjNm1PYrbFOmLIR7 .cluster-label span{color:#333;}#mermaid-svg-FjNm1PYrbFOmLIR7 .cluster-label span p{background-color:transparent;}#mermaid-svg-FjNm1PYrbFOmLIR7 .label text,#mermaid-svg-FjNm1PYrbFOmLIR7 span{fill:#333;color:#333;}#mermaid-svg-FjNm1PYrbFOmLIR7 .node rect,#mermaid-svg-FjNm1PYrbFOmLIR7 .node circle,#mermaid-svg-FjNm1PYrbFOmLIR7 .node ellipse,#mermaid-svg-FjNm1PYrbFOmLIR7 .node polygon,#mermaid-svg-FjNm1PYrbFOmLIR7 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-FjNm1PYrbFOmLIR7 .rough-node .label text,#mermaid-svg-FjNm1PYrbFOmLIR7 .node .label text,#mermaid-svg-FjNm1PYrbFOmLIR7 .image-shape .label,#mermaid-svg-FjNm1PYrbFOmLIR7 .icon-shape .label{text-anchor:middle;}#mermaid-svg-FjNm1PYrbFOmLIR7 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-FjNm1PYrbFOmLIR7 .rough-node .label,#mermaid-svg-FjNm1PYrbFOmLIR7 .node .label,#mermaid-svg-FjNm1PYrbFOmLIR7 .image-shape .label,#mermaid-svg-FjNm1PYrbFOmLIR7 .icon-shape .label{text-align:center;}#mermaid-svg-FjNm1PYrbFOmLIR7 .node.clickable{cursor:pointer;}#mermaid-svg-FjNm1PYrbFOmLIR7 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-FjNm1PYrbFOmLIR7 .arrowheadPath{fill:#333333;}#mermaid-svg-FjNm1PYrbFOmLIR7 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-FjNm1PYrbFOmLIR7 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-FjNm1PYrbFOmLIR7 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-FjNm1PYrbFOmLIR7 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-FjNm1PYrbFOmLIR7 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-FjNm1PYrbFOmLIR7 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-FjNm1PYrbFOmLIR7 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-FjNm1PYrbFOmLIR7 .cluster text{fill:#333;}#mermaid-svg-FjNm1PYrbFOmLIR7 .cluster span{color:#333;}#mermaid-svg-FjNm1PYrbFOmLIR7 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-FjNm1PYrbFOmLIR7 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-FjNm1PYrbFOmLIR7 rect.text{fill:none;stroke-width:0;}#mermaid-svg-FjNm1PYrbFOmLIR7 .icon-shape,#mermaid-svg-FjNm1PYrbFOmLIR7 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-FjNm1PYrbFOmLIR7 .icon-shape p,#mermaid-svg-FjNm1PYrbFOmLIR7 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-FjNm1PYrbFOmLIR7 .icon-shape .label rect,#mermaid-svg-FjNm1PYrbFOmLIR7 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-FjNm1PYrbFOmLIR7 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-FjNm1PYrbFOmLIR7 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-FjNm1PYrbFOmLIR7 :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}
Client/API Gateway
Conversation Service
Context Service
Emotion Service
Intent Service
Risk Service
Strategy Service
User Profile Store
Conversation Memory Store
Model Serving
Policy Engine
LLM Response Service
Quality Checker
Safety Guardrail
Final Response
Logging Service
Training Data Pipeline
9.2 服务说明
| Conversation Service | 统一对话入口 |
| Context Service | 管理上下文和用户历史 |
| Emotion Service | 情绪识别 |
| Intent Service | 意图识别 |
| Risk Service | 风险检测 |
| Strategy Service | 共情策略选择 |
| LLM Response Service | 调用大模型生成回复 |
| Quality Checker | 检查回复是否合格 |
| Safety Guardrail | 安全兜底 |
| Logging Service | 记录数据 |
| Training Pipeline | 离线训练和持续优化 |
十、工程落地优先级
MVP 版本
先做最小可用版本:
文本输入
+
情绪识别
+
意图识别
+
规则策略选择
+
大模型生成回复
+
安全关键词兜底
MVP 架构
#mermaid-svg-x2ZiFEDXMtnaRD6y{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-x2ZiFEDXMtnaRD6y .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-x2ZiFEDXMtnaRD6y .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-x2ZiFEDXMtnaRD6y .error-icon{fill:#552222;}#mermaid-svg-x2ZiFEDXMtnaRD6y .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-x2ZiFEDXMtnaRD6y .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-x2ZiFEDXMtnaRD6y .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-x2ZiFEDXMtnaRD6y .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-x2ZiFEDXMtnaRD6y .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-x2ZiFEDXMtnaRD6y .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-x2ZiFEDXMtnaRD6y .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-x2ZiFEDXMtnaRD6y .marker{fill:#333333;stroke:#333333;}#mermaid-svg-x2ZiFEDXMtnaRD6y .marker.cross{stroke:#333333;}#mermaid-svg-x2ZiFEDXMtnaRD6y svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-x2ZiFEDXMtnaRD6y p{margin:0;}#mermaid-svg-x2ZiFEDXMtnaRD6y .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-x2ZiFEDXMtnaRD6y .cluster-label text{fill:#333;}#mermaid-svg-x2ZiFEDXMtnaRD6y .cluster-label span{color:#333;}#mermaid-svg-x2ZiFEDXMtnaRD6y .cluster-label span p{background-color:transparent;}#mermaid-svg-x2ZiFEDXMtnaRD6y .label text,#mermaid-svg-x2ZiFEDXMtnaRD6y span{fill:#333;color:#333;}#mermaid-svg-x2ZiFEDXMtnaRD6y .node rect,#mermaid-svg-x2ZiFEDXMtnaRD6y .node circle,#mermaid-svg-x2ZiFEDXMtnaRD6y .node ellipse,#mermaid-svg-x2ZiFEDXMtnaRD6y .node polygon,#mermaid-svg-x2ZiFEDXMtnaRD6y .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-x2ZiFEDXMtnaRD6y .rough-node .label text,#mermaid-svg-x2ZiFEDXMtnaRD6y .node .label text,#mermaid-svg-x2ZiFEDXMtnaRD6y .image-shape .label,#mermaid-svg-x2ZiFEDXMtnaRD6y .icon-shape .label{text-anchor:middle;}#mermaid-svg-x2ZiFEDXMtnaRD6y .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-x2ZiFEDXMtnaRD6y .rough-node .label,#mermaid-svg-x2ZiFEDXMtnaRD6y .node .label,#mermaid-svg-x2ZiFEDXMtnaRD6y .image-shape .label,#mermaid-svg-x2ZiFEDXMtnaRD6y .icon-shape .label{text-align:center;}#mermaid-svg-x2ZiFEDXMtnaRD6y .node.clickable{cursor:pointer;}#mermaid-svg-x2ZiFEDXMtnaRD6y .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-x2ZiFEDXMtnaRD6y .arrowheadPath{fill:#333333;}#mermaid-svg-x2ZiFEDXMtnaRD6y .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-x2ZiFEDXMtnaRD6y .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-x2ZiFEDXMtnaRD6y .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-x2ZiFEDXMtnaRD6y .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-x2ZiFEDXMtnaRD6y .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-x2ZiFEDXMtnaRD6y .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-x2ZiFEDXMtnaRD6y .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-x2ZiFEDXMtnaRD6y .cluster text{fill:#333;}#mermaid-svg-x2ZiFEDXMtnaRD6y .cluster span{color:#333;}#mermaid-svg-x2ZiFEDXMtnaRD6y div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-x2ZiFEDXMtnaRD6y .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-x2ZiFEDXMtnaRD6y rect.text{fill:none;stroke-width:0;}#mermaid-svg-x2ZiFEDXMtnaRD6y .icon-shape,#mermaid-svg-x2ZiFEDXMtnaRD6y .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-x2ZiFEDXMtnaRD6y .icon-shape p,#mermaid-svg-x2ZiFEDXMtnaRD6y .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-x2ZiFEDXMtnaRD6y .icon-shape .label rect,#mermaid-svg-x2ZiFEDXMtnaRD6y .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-x2ZiFEDXMtnaRD6y .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-x2ZiFEDXMtnaRD6y .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-x2ZiFEDXMtnaRD6y :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}
<

![[特殊字符]DeepSeek‑Harness(DSH)小白保姆教程-171主机测评](https://www.171host.com/wp-content/uploads/2026/08/20260816085112-6a817a009aabf-220x150.png)