@axiom-lattice/examples-deep_research 1.0.17 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +6 -0
- package/dist/index.js +14 -39
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/agents/data_agent/index.ts +13 -38
- package/src/agents/data_agent/skills/data-query/SKILL.md +90 -0
- package/src/agents/data_agent/skills/data-query.ts +89 -0
- package/src/agents/data_agent/skills/data-visualization/SKILL.md +1 -1
- package/src/agents/data_agent/skills/analysis-methodology.ts +0 -73
- package/src/agents/data_agent/skills/analyst.ts +0 -100
- package/src/agents/data_agent/skills/data-visualization.ts +0 -77
- package/src/agents/data_agent/skills/infographic-creator.ts +0 -344
- package/src/agents/data_agent/skills/inventory-doctor.ts +0 -47
- package/src/agents/data_agent/skills/notebook-report.ts +0 -82
- package/src/agents/data_agent/skills/sql-query.ts +0 -58
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export const dataQuery = {
|
|
2
|
+
name: "data-query",
|
|
3
|
+
description:
|
|
4
|
+
"查询数据库中的数据。适用于用户需要直接从数据库获取数据(明细或聚合)的场景。",
|
|
5
|
+
prompt: `## 查询数据
|
|
6
|
+
|
|
7
|
+
用户可以直接请求查询数据库中的数据。作为数据代理,你应该帮助用户查询所需的数据。
|
|
8
|
+
|
|
9
|
+
## 核心原则
|
|
10
|
+
|
|
11
|
+
- **用户可以直接请求数据**:用户可以直接要求查询数据库中的特定数据,无论是明细数据还是聚合数据
|
|
12
|
+
- **优先使用真实数据**:优先基于数据库最新数据回答问题,不要猜测或使用假设数据
|
|
13
|
+
- **明确数据需求**:如果当前数据不足以回答问题,明确说明需要的表、字段和过滤条件
|
|
14
|
+
|
|
15
|
+
## 工作流程
|
|
16
|
+
|
|
17
|
+
当用户需要数据库数据时:
|
|
18
|
+
|
|
19
|
+
1. **理解用户需求**:
|
|
20
|
+
- 识别用户需要查询的数据类型(明细、聚合、统计等)
|
|
21
|
+
- 明确数据的时间范围、维度、筛选条件
|
|
22
|
+
|
|
23
|
+
2. **协调 sql-builder-agent**:
|
|
24
|
+
- 将查询任务委托给 sql-builder-agent 子代理
|
|
25
|
+
- 使用以下工具完成检索与执行:
|
|
26
|
+
- \`list_tables_sql\`: 列出数据库中的所有表
|
|
27
|
+
- \`info_sql\`: 获取表的详细结构信息
|
|
28
|
+
- \`query_checker_sql\`: 验证 SQL 查询的正确性
|
|
29
|
+
- \`query_sql\`: 执行 SQL 查询并返回结果
|
|
30
|
+
|
|
31
|
+
3. **数据验证**:
|
|
32
|
+
- 验证查询结果是否满足用户需求
|
|
33
|
+
- 检查数据完整性和质量
|
|
34
|
+
- 确认返回的数据准确回答了用户的问题
|
|
35
|
+
|
|
36
|
+
4. **结果呈现**:
|
|
37
|
+
- 以清晰、业务友好的方式呈现查询结果
|
|
38
|
+
- 提供必要的上下文和解释
|
|
39
|
+
- 如果数据不足,明确说明需要哪些额外数据
|
|
40
|
+
|
|
41
|
+
## 常见场景
|
|
42
|
+
|
|
43
|
+
### 场景 1:用户直接请求查询数据
|
|
44
|
+
|
|
45
|
+
**用户请求示例**:
|
|
46
|
+
- "请查询最近一个月的订单数据"
|
|
47
|
+
- "显示每个地区的销售总额"
|
|
48
|
+
- "给我看看用户注册的明细数据"
|
|
49
|
+
|
|
50
|
+
**处理方式**:
|
|
51
|
+
1. 理解用户需要的数据类型和范围
|
|
52
|
+
2. 委托 sql-builder-agent 执行查询
|
|
53
|
+
3. 返回查询结果和必要的解释
|
|
54
|
+
|
|
55
|
+
### 场景 2:用户需要数据来回答问题
|
|
56
|
+
|
|
57
|
+
**用户请求示例**:
|
|
58
|
+
- "我们的收入趋势如何?"
|
|
59
|
+
- "哪个产品类别表现最好?"
|
|
60
|
+
- "用户留存率是多少?"
|
|
61
|
+
|
|
62
|
+
**处理方式**:
|
|
63
|
+
1. 识别需要查询的数据来回答问题
|
|
64
|
+
2. 委托 sql-builder-agent 执行必要的查询
|
|
65
|
+
3. 基于查询结果进行分析和回答
|
|
66
|
+
|
|
67
|
+
### 场景 3:数据不足的情况
|
|
68
|
+
|
|
69
|
+
**处理方式**:
|
|
70
|
+
1. 明确说明当前数据无法完全回答问题
|
|
71
|
+
2. 详细列出需要查询的表、字段和过滤条件
|
|
72
|
+
3. 解释为什么这些数据对完整回答问题至关重要
|
|
73
|
+
4. 提供后续查询建议
|
|
74
|
+
|
|
75
|
+
## 最佳实践
|
|
76
|
+
|
|
77
|
+
- **主动查询**:不要猜测数据,主动查询数据库获取准确信息
|
|
78
|
+
- **清晰沟通**:如果数据不足,明确说明需要什么数据以及如何获取
|
|
79
|
+
- **数据质量**:注意数据质量,识别异常值、缺失值等问题
|
|
80
|
+
- **性能考虑**:对于大型查询,考虑使用适当的限制和筛选条件
|
|
81
|
+
- **文档化**:将查询和结果记录在分析文档中,便于后续参考
|
|
82
|
+
|
|
83
|
+
## 与 sql-query skill 的关系
|
|
84
|
+
|
|
85
|
+
- \`sql-query\` skill 专注于 SQL 查询的技术执行细节
|
|
86
|
+
- \`data-query\` skill 专注于如何响应用户的数据查询请求
|
|
87
|
+
- 两者配合使用,确保用户能够顺利获取所需数据
|
|
88
|
+
`,
|
|
89
|
+
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
export const analysisMethodology = {
|
|
2
|
-
name: "analysis-methodology",
|
|
3
|
-
description:
|
|
4
|
-
"应用结构化分析方法论(5W2H、SCQA、MECE、5 Whys、帕累托原则等)来理解问题、拆解任务、识别根本原因和优先级排序。适用于复杂业务问题的结构化分析和规划。",
|
|
5
|
-
prompt: `## 结构化分析方法论
|
|
6
|
-
|
|
7
|
-
### 问题定义(5W2H + SCQA)
|
|
8
|
-
|
|
9
|
-
**5W2H 模型**:全面梳理问题边界
|
|
10
|
-
- What: 问题本质
|
|
11
|
-
- Why: 解决目标和动机
|
|
12
|
-
- Who: 受影响方和决策者
|
|
13
|
-
- When: 发生时间和紧急程度
|
|
14
|
-
- Where: 发生环节/地区/模块
|
|
15
|
-
- How: 当前处理方式
|
|
16
|
-
- How much: 影响面和成本
|
|
17
|
-
|
|
18
|
-
**SCQA 模型**:理清问题上下文
|
|
19
|
-
- Situation: 现状事实
|
|
20
|
-
- Complication: 变化/挑战
|
|
21
|
-
- Question: 具体难题
|
|
22
|
-
- Answer: 解决方案
|
|
23
|
-
|
|
24
|
-
### 问题拆解(MECE + 议题树)
|
|
25
|
-
|
|
26
|
-
**MECE 原则**:相互独立,完全穷尽
|
|
27
|
-
- 不重叠、不遗漏
|
|
28
|
-
- 确保分类逻辑清晰
|
|
29
|
-
|
|
30
|
-
**议题树**:树状结构拆解
|
|
31
|
-
- 基于假设:提高利润 → 增加收入 OR 降低成本
|
|
32
|
-
- 基于流程:转化率低 → 流量获取 → 注册激活 → 留存 → 付费
|
|
33
|
-
|
|
34
|
-
### 根本原因分析(5 Whys + 鱼骨图)
|
|
35
|
-
|
|
36
|
-
**5 Whys**:连续追问为什么,直到找到根本原因
|
|
37
|
-
- 避免表面症状,找到深层原因
|
|
38
|
-
|
|
39
|
-
**鱼骨图(4M1E)**:从五个维度分析
|
|
40
|
-
- 人(Man)、机(Machine)、料(Material)、法(Method)、环(Environment)
|
|
41
|
-
|
|
42
|
-
### 优先级排序(帕累托 + 艾森豪威尔矩阵)
|
|
43
|
-
|
|
44
|
-
**80/20 法则**:识别关键的 20% 原因
|
|
45
|
-
|
|
46
|
-
**四象限矩阵**:按重要性和紧急程度排序
|
|
47
|
-
- 重要且紧急:优先处理
|
|
48
|
-
- 重要不紧急:计划处理
|
|
49
|
-
- 紧急不重要:快速处理
|
|
50
|
-
- 不重要不紧急:可忽略
|
|
51
|
-
|
|
52
|
-
### 综合表达(金字塔原理)
|
|
53
|
-
|
|
54
|
-
- **结论先行**:先说最重要的结果
|
|
55
|
-
- **以上统下**:上层论点总结下层论据
|
|
56
|
-
- **归类分组**:逻辑 MECE
|
|
57
|
-
- **逻辑递进**:按时间/空间/重要性排序
|
|
58
|
-
|
|
59
|
-
## 应用流程
|
|
60
|
-
|
|
61
|
-
1. **问题理解**:使用 5W2H 和 SCQA 明确问题
|
|
62
|
-
2. **任务拆解**:使用 MECE 和议题树拆解为子问题
|
|
63
|
-
3. **原因分析**:使用 5 Whys 和鱼骨图找到根本原因
|
|
64
|
-
4. **优先级排序**:使用 80/20 和四象限矩阵排序任务
|
|
65
|
-
5. **结果表达**:使用金字塔原理组织输出
|
|
66
|
-
|
|
67
|
-
## 假设驱动方法
|
|
68
|
-
|
|
69
|
-
- 先提出假设,用数据验证
|
|
70
|
-
- 假设错误时快速调整方向
|
|
71
|
-
- 避免列出所有可能性,聚焦关键路径
|
|
72
|
-
`,
|
|
73
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
export const analyst = {
|
|
2
|
-
name: "analyst",
|
|
3
|
-
description:
|
|
4
|
-
"协调和执行完整的业务数据分析流程,整合分析方法论、SQL查询、数据可视化和报告编写技能。适用于需要端到端分析流程的复杂业务问题。",
|
|
5
|
-
prompt: `## 角色定位
|
|
6
|
-
|
|
7
|
-
作为分析协调者,整合使用以下技能完成端到端分析:
|
|
8
|
-
- \`analysis-methodology\`: 结构化问题拆解和方法论应用
|
|
9
|
-
- \`sql-query\`: 数据检索和查询执行
|
|
10
|
-
- \`data-visualization\`: 图表设计和可视化配置
|
|
11
|
-
- \`notebook-report\`: 报告生成和洞察整合
|
|
12
|
-
|
|
13
|
-
## 分析工作流程
|
|
14
|
-
|
|
15
|
-
### 步骤 0:问题理解与规划
|
|
16
|
-
|
|
17
|
-
1. **记录问题**:写入 \`/question.md\`(问题陈述、业务背景、成功标准)
|
|
18
|
-
2. **应用分析方法论**:使用 \`analysis-methodology\` 技能
|
|
19
|
-
- 使用 5W2H 和 SCQA 明确问题
|
|
20
|
-
- 使用 MECE 和议题树拆解为子问题
|
|
21
|
-
- 使用四象限矩阵排序优先级
|
|
22
|
-
3. **创建待办列表**:每个子问题作为独立任务
|
|
23
|
-
|
|
24
|
-
### 步骤 1:数据库模式探索(如需要)
|
|
25
|
-
|
|
26
|
-
使用 \`sql-query\` 技能:
|
|
27
|
-
1. 检查 \`/db_schema.md\` 是否存在
|
|
28
|
-
2. 如需要,探索表结构
|
|
29
|
-
3. 将模式文档写入 \`/db_schema.md\`
|
|
30
|
-
|
|
31
|
-
### 步骤 2:迭代分析执行
|
|
32
|
-
|
|
33
|
-
对每个待办任务:
|
|
34
|
-
|
|
35
|
-
**2.1 数据检索**:
|
|
36
|
-
- 委托 sql-builder-agent 执行查询
|
|
37
|
-
- 验证查询结果的质量和完整性
|
|
38
|
-
|
|
39
|
-
**2.2 数据分析**:
|
|
40
|
-
- 委托 data-analysis-agent 分析数据
|
|
41
|
-
- 请求关键发现、业务解释和可视化建议
|
|
42
|
-
|
|
43
|
-
**2.3 可视化设计**:
|
|
44
|
-
- 使用 \`data-visualization\` 技能
|
|
45
|
-
- 根据分析结果选择合适的图表类型
|
|
46
|
-
- 生成完整的 ECharts 配置
|
|
47
|
-
|
|
48
|
-
**2.4 文档化**:
|
|
49
|
-
- 写入 \`/topic_[sub_topic_name].md\`:
|
|
50
|
-
- 业务问题/目标
|
|
51
|
-
- SQL 查询
|
|
52
|
-
- 查询结果
|
|
53
|
-
- 分析洞察
|
|
54
|
-
- 图表配置(使用 \`data-visualization\` 技能生成)
|
|
55
|
-
- 关键要点
|
|
56
|
-
|
|
57
|
-
**2.5 进度管理**:
|
|
58
|
-
- 标记任务完成,更新待办列表
|
|
59
|
-
- 验证分析回答了预期问题
|
|
60
|
-
|
|
61
|
-
### 步骤 3:综合与模式识别
|
|
62
|
-
|
|
63
|
-
1. 读取所有 \`/topic_*.md\` 文件
|
|
64
|
-
2. 应用 \`analysis-methodology\` 中的模式识别方法
|
|
65
|
-
3. 识别跨领域主题、趋势、异常值
|
|
66
|
-
4. 应用 80/20 原则,按业务影响排序
|
|
67
|
-
5. 准备执行级别的综合摘要
|
|
68
|
-
|
|
69
|
-
### 步骤 4:生成分析报告
|
|
70
|
-
|
|
71
|
-
使用 \`notebook-report\` 技能:
|
|
72
|
-
- 整合所有分析步骤
|
|
73
|
-
- 生成笔记本风格报告
|
|
74
|
-
- 包含执行摘要、分析步骤、结论
|
|
75
|
-
|
|
76
|
-
## 技能组合使用
|
|
77
|
-
|
|
78
|
-
根据分析阶段选择合适的技能:
|
|
79
|
-
- **规划阶段**:\`analysis-methodology\`
|
|
80
|
-
- **数据获取**:\`sql-query\`
|
|
81
|
-
- **可视化设计**:\`data-visualization\`
|
|
82
|
-
- **报告生成**:\`notebook-report\`
|
|
83
|
-
|
|
84
|
-
## 关键实践
|
|
85
|
-
|
|
86
|
-
- **假设驱动**:提出假设,用数据验证,快速调整
|
|
87
|
-
- **迭代优化**:根据发现优化查询和分析
|
|
88
|
-
- **完整文档化**:记录问题、查询、结果、洞察
|
|
89
|
-
- **质量优先**:确保每步完整准确后再继续
|
|
90
|
-
- **业务聚焦**:将技术发现与业务影响关联
|
|
91
|
-
|
|
92
|
-
## 错误处理
|
|
93
|
-
|
|
94
|
-
- **查询错误**:与 sql-builder-agent 协作调试
|
|
95
|
-
- **数据质量问题**:记录并调整分析
|
|
96
|
-
- **意外结果**:调查异常,可能揭示重要洞察
|
|
97
|
-
- **缺失数据**:识别差距,调整分析范围
|
|
98
|
-
- **新问题**:添加新待办事项继续探索
|
|
99
|
-
`,
|
|
100
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
export const dataVisualization = {
|
|
2
|
-
name: "data-visualization",
|
|
3
|
-
description:
|
|
4
|
-
"为数据分析结果选择合适的图表类型并生成 ECharts 配置。适用于需要将查询结果可视化为柱状图、折线图、饼图、散点图等图表的场景。",
|
|
5
|
-
prompt: `## 图表类型选择指南
|
|
6
|
-
|
|
7
|
-
根据数据特征和业务问题选择最合适的图表类型:
|
|
8
|
-
|
|
9
|
-
- **柱状图** (bar): 比较类别或时间周期
|
|
10
|
-
- 使用 category xAxis,value yAxis
|
|
11
|
-
- 多系列用于分组/堆叠柱状图
|
|
12
|
-
|
|
13
|
-
- **折线图** (line): 展示时间趋势
|
|
14
|
-
- 使用 category/time xAxis,value yAxis
|
|
15
|
-
- 多系列展示多个指标
|
|
16
|
-
|
|
17
|
-
- **饼图** (pie): 展示构成/百分比
|
|
18
|
-
- 无需 xAxis/yAxis
|
|
19
|
-
- 数据格式: [{value: number, name: string}, ...]
|
|
20
|
-
- 使用 radius: ["40%", "70%"] 创建环形图
|
|
21
|
-
|
|
22
|
-
- **散点图** (scatter): 相关性分析
|
|
23
|
-
- 使用 value xAxis 和 value yAxis
|
|
24
|
-
- 数据格式: [[x, y], [x, y], ...]
|
|
25
|
-
|
|
26
|
-
- **热力图** (heatmap): 多维数据
|
|
27
|
-
- 需要 category xAxis 和 yAxis
|
|
28
|
-
- 数据格式: [[xIndex, yIndex, value], ...]
|
|
29
|
-
|
|
30
|
-
## ECharts 配置要求
|
|
31
|
-
|
|
32
|
-
生成完整的 ECharts 配置,必须包含:
|
|
33
|
-
|
|
34
|
-
\`\`\`json
|
|
35
|
-
{
|
|
36
|
-
"table": [...], // 原始数据表格
|
|
37
|
-
"echarts": {
|
|
38
|
-
"title": {"text": "清晰的图表标题"},
|
|
39
|
-
"tooltip": {
|
|
40
|
-
"trigger": "axis", // bar/line 用 "axis", pie/scatter 用 "item"
|
|
41
|
-
"formatter": "..." // 可选:自定义格式化
|
|
42
|
-
},
|
|
43
|
-
"legend": {...}, // 多系列时必需
|
|
44
|
-
"xAxis": {
|
|
45
|
-
"type": "category", // 或 "time", "value"
|
|
46
|
-
"name": "X轴名称",
|
|
47
|
-
"data": [...] // category 类型时必需
|
|
48
|
-
},
|
|
49
|
-
"yAxis": {
|
|
50
|
-
"type": "value",
|
|
51
|
-
"name": "Y轴名称"
|
|
52
|
-
},
|
|
53
|
-
"series": [{
|
|
54
|
-
"type": "bar|line|pie|scatter|heatmap",
|
|
55
|
-
"name": "系列名称",
|
|
56
|
-
"data": [...],
|
|
57
|
-
"label": {...} // 可选:显示数值
|
|
58
|
-
}],
|
|
59
|
-
"grid": {...} // 可选:控制边距
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
\`\`\`
|
|
63
|
-
|
|
64
|
-
## 最佳实践
|
|
65
|
-
|
|
66
|
-
- 图表标题清晰描述业务问题
|
|
67
|
-
- 轴标签使用业务术语,而非技术字段名
|
|
68
|
-
- 数值格式化:百分比、货币、千分位
|
|
69
|
-
- 时间序列使用 "xAxis.type: 'time'" 并正确格式化日期
|
|
70
|
-
- 多系列时使用 legend 区分
|
|
71
|
-
- 重要数值在图表上直接标注(series.label)
|
|
72
|
-
|
|
73
|
-
## 输出格式
|
|
74
|
-
|
|
75
|
-
提供完整的 chart JSON 配置,可直接用于渲染。
|
|
76
|
-
`,
|
|
77
|
-
};
|
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
export const infographicCreator = {
|
|
2
|
-
name: "infographic-creator",
|
|
3
|
-
description:
|
|
4
|
-
"创建信息图表,将数据可视化为易于理解的图表。适用于需要将数据可视化为易于理解的图表的场景。",
|
|
5
|
-
prompt: `
|
|
6
|
-
|
|
7
|
-
信息图(Infographic)将数据、信息与知识转化为可感知的视觉语言。它结合视觉设计与数据可视化,用直观符号压缩复杂信息,帮助受众快速理解并记住要点。
|
|
8
|
-
|
|
9
|
-
Infographic = Information Structure + Visual Expression
|
|
10
|
-
|
|
11
|
-
本任务使用 AntV Infographic 创建可视化信息图。
|
|
12
|
-
|
|
13
|
-
在开始任务前,需要理解 AntV Infographic 语法规范,包括模板列表、数据结构、主题等。
|
|
14
|
-
|
|
15
|
-
规范
|
|
16
|
-
AntV Infographic 语法
|
|
17
|
-
AntV Infographic 语法是一种自定义的 DSL,用于描述信息图渲染配置。它使用缩进描述信息,具有较强鲁棒性,便于 AI 流式输出并渲染信息图。主要包含以下信息:
|
|
18
|
-
|
|
19
|
-
template:用模板表达文字信息结构。
|
|
20
|
-
data:信息图数据,包含 title、desc、数据项等。数据项通常包含 label、desc、icon 等字段。
|
|
21
|
-
theme:主题包含 palette、font 等样式配置。
|
|
22
|
-
例如:
|
|
23
|
-
|
|
24
|
-
\`\`\`infographic
|
|
25
|
-
infographic list-row-horizontal-icon-arrow
|
|
26
|
-
data
|
|
27
|
-
title Title
|
|
28
|
-
desc Description
|
|
29
|
-
lists
|
|
30
|
-
- label Label
|
|
31
|
-
value 12.5
|
|
32
|
-
desc Explanation
|
|
33
|
-
icon document text
|
|
34
|
-
theme
|
|
35
|
-
palette #3b82f6 #8b5cf6 #f97316
|
|
36
|
-
\`\`\`
|
|
37
|
-
语法规范
|
|
38
|
-
第一行必须是 infographic <template-name>,模板从下方列表中选择(见“可用模板”部分)。
|
|
39
|
-
|
|
40
|
-
使用 data / theme 块,块内用两个空格缩进。
|
|
41
|
-
|
|
42
|
-
键值对使用「键 空格 值」;数组使用 - 作为条目前缀。
|
|
43
|
-
|
|
44
|
-
icon 使用图标关键词(如 star fill)。
|
|
45
|
-
|
|
46
|
-
data 应包含 title/desc + 模板对应的主数据字段(不一定是 items)。
|
|
47
|
-
|
|
48
|
-
主数据字段选择(只用一个,避免混用):
|
|
49
|
-
|
|
50
|
-
list-* → lists
|
|
51
|
-
sequence-* → sequences(可选 order asc|desc)
|
|
52
|
-
compare-* → compares(支持 children 分组对比),可包含多个对比项
|
|
53
|
-
hierarchy-structure → items(每一项对应一个独立层级,每一层级可以包含子项,最多可嵌套 3 层)
|
|
54
|
-
hierarchy-* → 单一 root(树结构,通过 children 嵌套);
|
|
55
|
-
relation-* → nodes + relations;简单关系图可省略 nodes,在 relations 中用箭头语法
|
|
56
|
-
chart-* → values(数值统计,可选 category)
|
|
57
|
-
不确定时再用 items 兜底
|
|
58
|
-
compare-binary-* / compare-hierarchy-left-right-* 二元模板:必须两个根节点,所有对比项挂在这两个根节点的 children
|
|
59
|
-
|
|
60
|
-
hierarchy-*:使用单一 root,通过 children 嵌套(不要重复 root)
|
|
61
|
-
|
|
62
|
-
theme 用于自定义主题(palette、font 等) 例如:暗色主题 + 自定义配色
|
|
63
|
-
|
|
64
|
-
\`\`\`infographic
|
|
65
|
-
infographic list-row-simple-horizontal-arrow
|
|
66
|
-
theme dark
|
|
67
|
-
palette
|
|
68
|
-
- #61DDAA
|
|
69
|
-
- #F6BD16
|
|
70
|
-
- #F08BB4
|
|
71
|
-
\`\`\`
|
|
72
|
-
使用 theme.base.text.font-family 指定字体,如手写风格 851tegakizatsu
|
|
73
|
-
|
|
74
|
-
使用 theme.stylize 选择内置风格并传参 常见风格:
|
|
75
|
-
|
|
76
|
-
rough:手绘效果
|
|
77
|
-
pattern:图案填充
|
|
78
|
-
linear-gradient / radial-gradient:线性/径向渐变
|
|
79
|
-
例如:手绘风格(rough)
|
|
80
|
-
|
|
81
|
-
\`\`\`infographic
|
|
82
|
-
infographic list-row-simple-horizontal-arrow
|
|
83
|
-
theme
|
|
84
|
-
stylize rough
|
|
85
|
-
base
|
|
86
|
-
text
|
|
87
|
-
font-family 851tegakizatsu
|
|
88
|
-
\`\`\`
|
|
89
|
-
输出格式要求:
|
|
90
|
-
必须使用 Markdown 代码块格式输出,语言标识为 infographic。格式如下:
|
|
91
|
-
|
|
92
|
-
\`\`\`infographic
|
|
93
|
-
infographic <template-name>
|
|
94
|
-
data
|
|
95
|
-
...
|
|
96
|
-
theme
|
|
97
|
-
...
|
|
98
|
-
\`\`\`
|
|
99
|
-
|
|
100
|
-
禁止输出纯文本、JSON、HTML、JS 代码或其他格式。只能输出上述格式的 Markdown 代码块。
|
|
101
|
-
|
|
102
|
-
数据语法示例
|
|
103
|
-
按模板类别的数据语法示例(使用对应字段,避免同时添加 items):
|
|
104
|
-
|
|
105
|
-
list-* 模版
|
|
106
|
-
\`\`\`infographic
|
|
107
|
-
infographic list-grid-badge-card
|
|
108
|
-
data
|
|
109
|
-
title Feature List
|
|
110
|
-
lists
|
|
111
|
-
- label Fast
|
|
112
|
-
icon flash fast
|
|
113
|
-
- label Secure
|
|
114
|
-
icon secure shield check
|
|
115
|
-
\`\`\`
|
|
116
|
-
sequence-* 模版
|
|
117
|
-
\`\`\`infographic
|
|
118
|
-
infographic sequence-steps-simple
|
|
119
|
-
data
|
|
120
|
-
sequences
|
|
121
|
-
- label Step 1
|
|
122
|
-
- label Step 2
|
|
123
|
-
- label Step 3
|
|
124
|
-
order asc
|
|
125
|
-
\`\`\`
|
|
126
|
-
hierarchy-* 模版
|
|
127
|
-
\`\`\`infographic
|
|
128
|
-
infographic hierarchy-structure
|
|
129
|
-
data
|
|
130
|
-
root
|
|
131
|
-
label Company
|
|
132
|
-
children
|
|
133
|
-
- label Dept A
|
|
134
|
-
- label Dept B
|
|
135
|
-
\`\`\`
|
|
136
|
-
compare-* 模版
|
|
137
|
-
\`\`\`infographic
|
|
138
|
-
infographic compare-swot
|
|
139
|
-
data
|
|
140
|
-
compares
|
|
141
|
-
- label Strengths
|
|
142
|
-
children
|
|
143
|
-
- label Strong brand
|
|
144
|
-
- label Loyal users
|
|
145
|
-
- label Weaknesses
|
|
146
|
-
children
|
|
147
|
-
- label High cost
|
|
148
|
-
- label Slow release
|
|
149
|
-
\`\`\`
|
|
150
|
-
四象限图
|
|
151
|
-
|
|
152
|
-
\`\`\`infographic
|
|
153
|
-
infographic compare-quadrant-quarter-simple-card
|
|
154
|
-
data
|
|
155
|
-
compares
|
|
156
|
-
- label High Impact & Low Effort
|
|
157
|
-
- label High Impact & High Effort
|
|
158
|
-
- label Low Impact & Low Effort
|
|
159
|
-
- label Low Impact & High Effort
|
|
160
|
-
\`\`\`
|
|
161
|
-
chart-* 模版
|
|
162
|
-
\`\`\`infographic
|
|
163
|
-
infographic chart-column-simple
|
|
164
|
-
data
|
|
165
|
-
values
|
|
166
|
-
- label Visits
|
|
167
|
-
value 1280
|
|
168
|
-
- label Conversion
|
|
169
|
-
value 12.4
|
|
170
|
-
\`\`\`
|
|
171
|
-
relation-* 模版
|
|
172
|
-
边标签写法:A -label-> B 或 A -->|label| B
|
|
173
|
-
|
|
174
|
-
\`\`\`infographic
|
|
175
|
-
infographic relation-dagre-flow-tb-simple-circle-node
|
|
176
|
-
data
|
|
177
|
-
nodes
|
|
178
|
-
- id A
|
|
179
|
-
label Node A
|
|
180
|
-
- id B
|
|
181
|
-
label Node B
|
|
182
|
-
relations
|
|
183
|
-
A - approves -> B
|
|
184
|
-
A -->|blocks| B
|
|
185
|
-
\`\`\`
|
|
186
|
-
兜底 items 示例
|
|
187
|
-
\`\`\`infographic
|
|
188
|
-
infographic list-row-horizontal-icon-arrow
|
|
189
|
-
data
|
|
190
|
-
items
|
|
191
|
-
- label Item A
|
|
192
|
-
desc Description
|
|
193
|
-
icon sun
|
|
194
|
-
- label Item B
|
|
195
|
-
desc Description
|
|
196
|
-
icon moon
|
|
197
|
-
\`\`\`
|
|
198
|
-
可用模板
|
|
199
|
-
chart-bar-plain-text
|
|
200
|
-
chart-column-simple
|
|
201
|
-
chart-line-plain-text
|
|
202
|
-
chart-pie-compact-card
|
|
203
|
-
chart-pie-donut-pill-badge
|
|
204
|
-
chart-pie-donut-plain-text
|
|
205
|
-
chart-pie-plain-text
|
|
206
|
-
chart-wordcloud
|
|
207
|
-
compare-binary-horizontal-badge-card-arrow
|
|
208
|
-
compare-binary-horizontal-simple-fold
|
|
209
|
-
compare-binary-horizontal-underline-text-vs
|
|
210
|
-
compare-hierarchy-left-right-circle-node-pill-badge
|
|
211
|
-
compare-quadrant-quarter-circular
|
|
212
|
-
compare-quadrant-quarter-simple-card
|
|
213
|
-
compare-swot
|
|
214
|
-
hierarchy-mindmap-branch-gradient-capsule-item
|
|
215
|
-
hierarchy-mindmap-level-gradient-compact-card
|
|
216
|
-
hierarchy-structure
|
|
217
|
-
hierarchy-tree-curved-line-rounded-rect-node
|
|
218
|
-
hierarchy-tree-tech-style-badge-card
|
|
219
|
-
hierarchy-tree-tech-style-capsule-item
|
|
220
|
-
list-column-done-list
|
|
221
|
-
list-column-simple-vertical-arrow
|
|
222
|
-
list-column-vertical-icon-arrow
|
|
223
|
-
list-grid-badge-card
|
|
224
|
-
list-grid-candy-card-lite
|
|
225
|
-
list-grid-ribbon-card
|
|
226
|
-
list-row-horizontal-icon-arrow
|
|
227
|
-
list-sector-plain-text
|
|
228
|
-
list-zigzag-down-compact-card
|
|
229
|
-
list-zigzag-down-simple
|
|
230
|
-
list-zigzag-up-compact-card
|
|
231
|
-
list-zigzag-up-simple
|
|
232
|
-
relation-dagre-flow-tb-animated-badge-card
|
|
233
|
-
relation-dagre-flow-tb-animated-simple-circle-node
|
|
234
|
-
relation-dagre-flow-tb-badge-card
|
|
235
|
-
relation-dagre-flow-tb-simple-circle-node
|
|
236
|
-
sequence-ascending-stairs-3d-underline-text
|
|
237
|
-
sequence-ascending-steps
|
|
238
|
-
sequence-circular-simple
|
|
239
|
-
sequence-color-snake-steps-horizontal-icon-line
|
|
240
|
-
sequence-cylinders-3d-simple
|
|
241
|
-
sequence-filter-mesh-simple
|
|
242
|
-
sequence-funnel-simple
|
|
243
|
-
sequence-horizontal-zigzag-underline-text
|
|
244
|
-
sequence-mountain-underline-text
|
|
245
|
-
sequence-pyramid-simple
|
|
246
|
-
sequence-roadmap-vertical-plain-text
|
|
247
|
-
sequence-roadmap-vertical-simple
|
|
248
|
-
sequence-snake-steps-compact-card
|
|
249
|
-
sequence-snake-steps-simple
|
|
250
|
-
sequence-snake-steps-underline-text
|
|
251
|
-
sequence-stairs-front-compact-card
|
|
252
|
-
sequence-stairs-front-pill-badge
|
|
253
|
-
sequence-timeline-rounded-rect-node
|
|
254
|
-
sequence-timeline-simple
|
|
255
|
-
sequence-zigzag-pucks-3d-simple
|
|
256
|
-
sequence-zigzag-steps-underline-text
|
|
257
|
-
模板选择建议:
|
|
258
|
-
|
|
259
|
-
严格顺序(流程/步骤/发展趋势)→ sequence-*
|
|
260
|
-
时间线 → sequence-timeline-*
|
|
261
|
-
阶梯图 → sequence-stairs-*
|
|
262
|
-
路线图 → sequence-roadmap-vertical-*
|
|
263
|
-
折线路径 → sequence-zigzag-*
|
|
264
|
-
环形进度 → sequence-circular-simple
|
|
265
|
-
彩色蛇形步骤 → sequence-color-snake-steps-*
|
|
266
|
-
金字塔 → sequence-pyramid-simple
|
|
267
|
-
观点列举 → list-row-* 或 list-column-*
|
|
268
|
-
二元对比(利弊)→ compare-binary-*
|
|
269
|
-
SWOT → compare-swot
|
|
270
|
-
层级结构(树图)→ hierarchy-tree-*
|
|
271
|
-
数据图表 → chart-*
|
|
272
|
-
象限分析 → quadrant-*
|
|
273
|
-
网格列表(要点)→ list-grid-*
|
|
274
|
-
关系展示 → relation-*
|
|
275
|
-
词云 → chart-wordcloud
|
|
276
|
-
思维导图 → hierarchy-mindmap-*
|
|
277
|
-
示例
|
|
278
|
-
绘制互联网技术演进信息图
|
|
279
|
-
|
|
280
|
-
\`\`\`infographic
|
|
281
|
-
infographic list-row-horizontal-icon-arrow
|
|
282
|
-
data
|
|
283
|
-
title Internet Technology Evolution
|
|
284
|
-
desc From Web 1.0 to AI era, key milestones
|
|
285
|
-
lists
|
|
286
|
-
- time 1991
|
|
287
|
-
label Web 1.0
|
|
288
|
-
desc Tim Berners-Lee published the first website, opening the Internet era
|
|
289
|
-
icon web
|
|
290
|
-
- time 2004
|
|
291
|
-
label Web 2.0
|
|
292
|
-
desc Social media and user-generated content become mainstream
|
|
293
|
-
icon account multiple
|
|
294
|
-
- time 2007
|
|
295
|
-
label Mobile
|
|
296
|
-
desc iPhone released, smartphone changes the world
|
|
297
|
-
icon cellphone
|
|
298
|
-
- time 2015
|
|
299
|
-
label Cloud Native
|
|
300
|
-
desc Containerization and microservices architecture are widely used
|
|
301
|
-
icon cloud
|
|
302
|
-
- time 2020
|
|
303
|
-
label Low Code
|
|
304
|
-
desc Visual development lowers the technology threshold
|
|
305
|
-
icon application brackets
|
|
306
|
-
- time 2023
|
|
307
|
-
label AI Large Model
|
|
308
|
-
desc ChatGPT ignites the generative AI revolution
|
|
309
|
-
icon brain
|
|
310
|
-
\`\`\`
|
|
311
|
-
生成流程
|
|
312
|
-
第一步:理解用户需求
|
|
313
|
-
在创建信息图之前,先理解用户需求与想表达的信息,以便确定模板和数据结构。
|
|
314
|
-
|
|
315
|
-
若用户提供清晰的内容描述,应将其拆解为清晰、简洁的结构。
|
|
316
|
-
|
|
317
|
-
否则需要向用户澄清(如:“请提供清晰简洁的内容描述。”、“你希望使用哪个模板?”)
|
|
318
|
-
|
|
319
|
-
提取关键信息结构(title、desc、items 等)。
|
|
320
|
-
明确所需数据字段(title、desc、items、label、value、icon 等)。
|
|
321
|
-
选择合适模板。
|
|
322
|
-
使用 AntV Infographic 语法描述信息图内容,并以 Markdown 代码块格式输出,语言标识为 infographic。
|
|
323
|
-
|
|
324
|
-
输出格式示例:
|
|
325
|
-
\`\`\`infographic
|
|
326
|
-
infographic <template-name>
|
|
327
|
-
data
|
|
328
|
-
title ...
|
|
329
|
-
desc ...
|
|
330
|
-
...
|
|
331
|
-
theme
|
|
332
|
-
...
|
|
333
|
-
\`\`\`
|
|
334
|
-
|
|
335
|
-
关键注意:
|
|
336
|
-
1. 必须尊重用户输入的语言。例如用户输入中文,则语法中的文本也必须是中文。
|
|
337
|
-
2. 必须使用 Markdown 代码块格式,语言标识为 infographic,而不是 HTML、JS 或其他代码格式。
|
|
338
|
-
3. 代码块内只包含 AntV Infographic DSL 语法,不要包含任何解释性文字。
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
`,
|
|
344
|
-
};
|