feat(pipeline): implement Pipeline DSL system for automated workflows
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Add complete Pipeline DSL system including:
- Rust backend (zclaw-pipeline crate) with parser, executor, and state management
- Frontend components: PipelinesPanel, PipelineResultPreview, ClassroomPreviewer
- Pipeline recommender for Agent conversation integration
- 5 pipeline templates: education, marketing, legal, research, productivity
- Documentation for Pipeline DSL architecture
Pipeline DSL enables declarative workflow definitions with:
- YAML-based configuration
- Expression resolution (${inputs.topic}, ${steps.step1.output})
- LLM integration, parallel execution, file export
- Agent smart recommendations in conversations
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
101
pipelines/README.md
Normal file
101
pipelines/README.md
Normal file
@@ -0,0 +1,101 @@
|
||||
# ZCLAW Pipelines
|
||||
|
||||
Pipeline 是 ZCLAW 中声明式的自动化工作流定义。每个 Pipeline 描述了完成特定任务所需的一系列步骤。
|
||||
|
||||
## 目录结构
|
||||
|
||||
```
|
||||
pipelines/
|
||||
├── education/ # 教育类 Pipeline
|
||||
│ └── classroom.yaml # 互动课堂生成器
|
||||
├── marketing/ # 营销类 Pipeline
|
||||
│ └── (待添加)
|
||||
├── legal/ # 法律类 Pipeline
|
||||
│ └── (待添加)
|
||||
└── _templates/ # Pipeline 模板
|
||||
└── base.yaml # 基础模板
|
||||
```
|
||||
|
||||
## Pipeline DSL
|
||||
|
||||
### 基本结构
|
||||
|
||||
```yaml
|
||||
apiVersion: zclaw/v1
|
||||
kind: Pipeline
|
||||
metadata:
|
||||
name: my-pipeline
|
||||
displayName: 我的 Pipeline
|
||||
category: education
|
||||
description: Pipeline 功能描述
|
||||
spec:
|
||||
inputs:
|
||||
- name: param1
|
||||
type: string
|
||||
required: true
|
||||
steps:
|
||||
- id: step1
|
||||
action:
|
||||
type: llm_generate
|
||||
template: "处理 {{param1}}"
|
||||
outputs:
|
||||
result: ${steps.step1.output}
|
||||
```
|
||||
|
||||
### 输入类型
|
||||
|
||||
- `string` - 文本输入
|
||||
- `number` - 数字输入
|
||||
- `boolean` - 布尔值
|
||||
- `select` - 单选下拉
|
||||
- `multi-select` - 多选
|
||||
- `file` - 文件上传
|
||||
- `text` - 多行文本
|
||||
|
||||
### 动作类型
|
||||
|
||||
| 动作 | 说明 |
|
||||
|------|------|
|
||||
| `llm_generate` | LLM 生成 |
|
||||
| `parallel` | 并行执行 |
|
||||
| `sequential` | 顺序执行 |
|
||||
| `condition` | 条件分支 |
|
||||
| `skill` | 调用 Skill |
|
||||
| `hand` | 调用 Hand |
|
||||
| `classroom_render` | 渲染课堂数据 |
|
||||
| `file_export` | 导出文件 |
|
||||
| `http_request` | HTTP 请求 |
|
||||
| `set_var` | 设置变量 |
|
||||
| `delay` | 延时 |
|
||||
|
||||
### 表达式语法
|
||||
|
||||
Pipeline 支持表达式来引用上下文数据:
|
||||
|
||||
- `${inputs.xxx}` - 输入参数
|
||||
- `${steps.xxx.output}` - 步骤输出
|
||||
- `${item}` - 循环当前项 (parallel 内)
|
||||
- `${index}` - 循环索引 (parallel 内)
|
||||
- `${vars.xxx}` - 自定义变量
|
||||
|
||||
## 创建新 Pipeline
|
||||
|
||||
1. 在对应分类目录下创建 `.yaml` 文件
|
||||
2. 按照 DSL 规范定义 Pipeline
|
||||
3. 在前端 Pipeline 页面测试运行
|
||||
|
||||
## 用户界面
|
||||
|
||||
Pipeline 在用户界面中表现为功能卡片:
|
||||
- 用户看到的是 Pipeline 的 `displayName` 和 `description`
|
||||
- Hands 和 Skills 作为内部实现被隐藏
|
||||
- 用户只需填写输入参数,Pipeline 自动执行
|
||||
|
||||
## Agent 集成
|
||||
|
||||
Agent 可以识别用户意图并推荐合适的 Pipeline:
|
||||
|
||||
```
|
||||
用户: "帮我做一个关于光合作用的课件"
|
||||
Agent: "我可以使用【互动课堂生成器】为你自动生成完整课件..."
|
||||
```
|
||||
195
pipelines/education/classroom.yaml
Normal file
195
pipelines/education/classroom.yaml
Normal file
@@ -0,0 +1,195 @@
|
||||
# ZCLAW Pipeline - Classroom Generator
|
||||
# 互动课堂生成器:输入课题,自动生成完整互动课堂内容
|
||||
|
||||
apiVersion: zclaw/v1
|
||||
kind: Pipeline
|
||||
metadata:
|
||||
name: classroom-generator
|
||||
displayName: 互动课堂生成器
|
||||
category: education
|
||||
description: 输入课题,自动生成结构化大纲、互动场景和课后测验
|
||||
tags:
|
||||
- 教育
|
||||
- 课件
|
||||
- 自动生成
|
||||
icon: 📚
|
||||
author: ZCLAW
|
||||
version: 1.0.0
|
||||
|
||||
spec:
|
||||
# 输入参数定义
|
||||
inputs:
|
||||
- name: topic
|
||||
type: string
|
||||
required: true
|
||||
label: 课题名称
|
||||
placeholder: 例如:牛顿第二定律
|
||||
validation:
|
||||
min_length: 2
|
||||
max_length: 100
|
||||
|
||||
- name: difficulty
|
||||
type: select
|
||||
required: false
|
||||
label: 难度等级
|
||||
default: 中级
|
||||
options:
|
||||
- 初级
|
||||
- 中级
|
||||
- 高级
|
||||
|
||||
- name: scene_count
|
||||
type: number
|
||||
required: false
|
||||
label: 场景数量
|
||||
default: 5
|
||||
validation:
|
||||
min: 1
|
||||
max: 20
|
||||
|
||||
- name: export_formats
|
||||
type: multi-select
|
||||
required: false
|
||||
label: 导出格式
|
||||
default: [html]
|
||||
options:
|
||||
- html
|
||||
- markdown
|
||||
- json
|
||||
|
||||
# 执行步骤
|
||||
steps:
|
||||
# Step 1: 解析课题,生成大纲
|
||||
- id: generate_outline
|
||||
description: 分析课题并生成课程大纲
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
你是一位专业的教育内容设计师。请为以下课题设计一个结构化的课程大纲。
|
||||
|
||||
课题: {{topic}}
|
||||
难度: {{difficulty}}
|
||||
场景数量: {{scene_count}}
|
||||
|
||||
请生成一个 JSON 格式的大纲,包含以下结构:
|
||||
{
|
||||
"title": "课程标题",
|
||||
"description": "课程简介",
|
||||
"outline": {
|
||||
"items": [
|
||||
{"title": "章节1标题", "description": "章节1描述"},
|
||||
{"title": "章节2标题", "description": "章节2描述"}
|
||||
]
|
||||
}
|
||||
}
|
||||
input:
|
||||
topic: ${inputs.topic}
|
||||
difficulty: ${inputs.difficulty}
|
||||
scene_count: ${inputs.scene_count}
|
||||
json_mode: true
|
||||
temperature: 0.7
|
||||
max_tokens: 2000
|
||||
|
||||
# Step 2: 并行生成场景
|
||||
- id: generate_scenes
|
||||
description: 为每个大纲章节生成互动场景
|
||||
action:
|
||||
type: parallel
|
||||
each: ${steps.generate_outline.output.outline.items}
|
||||
max_workers: 4
|
||||
step:
|
||||
id: scene_item
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
为以下课程章节生成一个互动教学场景:
|
||||
|
||||
课题: ${inputs.topic}
|
||||
章节: {{item.title}}
|
||||
章节描述: {{item.description}}
|
||||
难度: ${inputs.difficulty}
|
||||
|
||||
生成 JSON 格式的场景内容:
|
||||
{
|
||||
"title": "场景标题",
|
||||
"content": "场景内容描述",
|
||||
"interaction": {
|
||||
"type": "quiz|discussion|demonstration",
|
||||
"prompt": "互动提示",
|
||||
"options": ["选项1", "选项2"] (如果是 quiz)
|
||||
},
|
||||
"key_points": ["要点1", "要点2", "要点3"]
|
||||
}
|
||||
input:
|
||||
item: ${item}
|
||||
index: ${index}
|
||||
json_mode: true
|
||||
temperature: 0.8
|
||||
max_tokens: 1500
|
||||
|
||||
# Step 3: 生成课后测验
|
||||
- id: generate_quiz
|
||||
description: 根据场景内容生成测验题
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
基于以下课程场景生成一套课后测验:
|
||||
|
||||
课题: ${inputs.topic}
|
||||
场景数量: ${steps.generate_scenes.output | length}
|
||||
|
||||
生成 5 道选择题的 JSON 格式测验:
|
||||
{
|
||||
"questions": [
|
||||
{
|
||||
"question": "问题内容",
|
||||
"options": ["A选项", "B选项", "C选项", "D选项"],
|
||||
"correct": 0,
|
||||
"explanation": "答案解释"
|
||||
}
|
||||
]
|
||||
}
|
||||
input:
|
||||
topic: ${inputs.topic}
|
||||
scene_count: ${steps.generate_scenes.output | length}
|
||||
json_mode: true
|
||||
temperature: 0.6
|
||||
max_tokens: 2000
|
||||
|
||||
# Step 4: 渲染课堂数据
|
||||
- id: render_classroom
|
||||
description: 组装完整的课堂数据结构
|
||||
action:
|
||||
type: classroom_render
|
||||
input: |
|
||||
{
|
||||
"title": ${steps.generate_outline.output.title},
|
||||
"description": ${steps.generate_outline.output.description},
|
||||
"outline": ${steps.generate_outline.output.outline},
|
||||
"scenes": ${steps.generate_scenes.output},
|
||||
"quiz": ${steps.generate_quiz.output}
|
||||
}
|
||||
|
||||
# Step 5: 导出文件
|
||||
- id: export_files
|
||||
description: 导出指定格式的文件
|
||||
action:
|
||||
type: file_export
|
||||
formats: ${inputs.export_formats}
|
||||
input: ${steps.render_classroom.output}
|
||||
|
||||
# 输出映射
|
||||
outputs:
|
||||
classroom_id: ${steps.render_classroom.output.id}
|
||||
title: ${steps.render_classroom.output.title}
|
||||
preview_url: ${steps.render_classroom.output.preview_url}
|
||||
export_files: ${steps.export_files.output}
|
||||
|
||||
# 错误处理
|
||||
on_error: stop
|
||||
|
||||
# 超时设置
|
||||
timeout_secs: 300
|
||||
|
||||
# 并行工作线程上限
|
||||
max_workers: 4
|
||||
250
pipelines/legal/contract-review.yaml
Normal file
250
pipelines/legal/contract-review.yaml
Normal file
@@ -0,0 +1,250 @@
|
||||
# ZCLAW Pipeline - Contract Review
|
||||
# 合同审查:上传合同文档,自动识别风险条款并生成修改建议
|
||||
|
||||
apiVersion: zclaw/v1
|
||||
kind: Pipeline
|
||||
metadata:
|
||||
name: contract-review
|
||||
displayName: 合同智能审查
|
||||
category: legal
|
||||
description: 上传合同文档,AI 自动识别风险条款、合规问题,并生成修改建议
|
||||
tags:
|
||||
- 法律
|
||||
- 合同
|
||||
- 风险评估
|
||||
icon: ⚖️
|
||||
author: ZCLAW
|
||||
version: 1.0.0
|
||||
|
||||
spec:
|
||||
# 输入参数定义
|
||||
inputs:
|
||||
- name: contract_type
|
||||
type: select
|
||||
required: true
|
||||
label: 合同类型
|
||||
options:
|
||||
- 劳动合同
|
||||
- 服务合同
|
||||
- 买卖合同
|
||||
- 租赁合同
|
||||
- 合作协议
|
||||
- 保密协议
|
||||
- 许可协议
|
||||
- 其他
|
||||
|
||||
default: 服务合同
|
||||
|
||||
- name: contract_content
|
||||
type: text
|
||||
required: true
|
||||
label: 合同内容
|
||||
placeholder: 请粘贴或上传合同全文内容
|
||||
|
||||
- name: review_focus
|
||||
type: multi-select
|
||||
required: false
|
||||
label: 审查重点
|
||||
default: [风险条款, 合规问题]
|
||||
options:
|
||||
- 风险条款
|
||||
- 合规问题
|
||||
- 权利义务
|
||||
- 付款条款
|
||||
- 违约责任
|
||||
- 知识产权
|
||||
- 保密条款
|
||||
- 争议解决
|
||||
- 全部审查
|
||||
|
||||
- name: industry
|
||||
type: string
|
||||
required: false
|
||||
label: 行业领域
|
||||
placeholder: 例如:互联网、金融、医疗
|
||||
|
||||
- name: export_formats
|
||||
type: multi-select
|
||||
required: false
|
||||
label: 导出格式
|
||||
default: [html]
|
||||
options:
|
||||
- html
|
||||
- markdown
|
||||
- json
|
||||
|
||||
# 执行步骤
|
||||
steps:
|
||||
# Step 1: 提取合同关键信息
|
||||
- id: extract_info
|
||||
description: 提取合同基本信息
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
从以下合同内容中提取关键信息:
|
||||
|
||||
合同类型: {{contract_type}}
|
||||
行业领域: {{industry}}
|
||||
|
||||
请提取以下信息:
|
||||
1. 合同双方(甲方/乙方)
|
||||
2. 合同标的和 3. 合同期限
|
||||
4. 主要金额/对价
|
||||
5. 关键日期
|
||||
|
||||
合同内容:
|
||||
```
|
||||
{{contract_content}}
|
||||
```
|
||||
|
||||
以 JSON 格式输出:
|
||||
{
|
||||
"parties": {
|
||||
"party_a": "甲方名称",
|
||||
"party_b": "乙方名称"
|
||||
},
|
||||
"subject": "合同标的",
|
||||
"duration": "合同期限",
|
||||
"amount": "主要金额",
|
||||
"key_dates": ["签署日期", "生效日期", "到期日期"]
|
||||
}
|
||||
input:
|
||||
contract_type: ${inputs.contract_type}
|
||||
contract_content: ${inputs.contract_content}
|
||||
industry: ${inputs.industry}
|
||||
json_mode: true
|
||||
temperature: 0.3
|
||||
max_tokens: 1500
|
||||
|
||||
# Step 2: 风险条款分析
|
||||
- id: analyze_risks
|
||||
description: 分析合同中的风险条款
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
作为专业法律顾问,请对以下合同进行风险审查。
|
||||
|
||||
合同基本信息:
|
||||
```
|
||||
${steps.extract_info.output}
|
||||
```
|
||||
|
||||
重点审查以下方面:
|
||||
{{review_focus}}
|
||||
|
||||
请分析以下风险点:
|
||||
1. 不公平条款
|
||||
2. 模糊表述
|
||||
3. 责任限制
|
||||
4. 隐性成本
|
||||
5. 解约风险
|
||||
6. 争议解决机制
|
||||
7. 法律适用问题
|
||||
|
||||
对于每个风险点,请提供:
|
||||
"risk": "风险描述",
|
||||
"severity": "高/中/低",
|
||||
"location": "条款位置",
|
||||
"description": "详细分析",
|
||||
"suggestion": "修改建议"
|
||||
}
|
||||
input:
|
||||
contract_info: ${steps.extract_info.output}
|
||||
review_focus: ${inputs.review_focus}
|
||||
json_mode: true
|
||||
temperature: 0.5
|
||||
max_tokens: 3000
|
||||
|
||||
# Step 3: 合规检查
|
||||
- id: check_compliance
|
||||
description: 检查合同合规性
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
检查以下合同的合规性问题。
|
||||
|
||||
合同类型: {{contract_type}}
|
||||
行业领域: {{industry}}
|
||||
|
||||
请检查:
|
||||
1. 是否符合《民法典》相关规定
|
||||
2. 是否违反消费者权益保护法
|
||||
3. 格式条款是否规范
|
||||
4. 管辖权条款是否合理
|
||||
5. 保密条款是否合规
|
||||
6. 违约责任是否明确
|
||||
|
||||
合同内容摘要:
|
||||
```
|
||||
${steps.extract_info.output}
|
||||
```
|
||||
|
||||
錈对分析输出 JSON:
|
||||
{
|
||||
"compliance_checks": [
|
||||
{
|
||||
"item": "检查项名称",
|
||||
"status": "通过/需注意/存在风险",
|
||||
"details": "详细说明",
|
||||
"recommendation": "建议"
|
||||
}
|
||||
]
|
||||
}
|
||||
input:
|
||||
contract_type: ${inputs.contract_type}
|
||||
contract_info: ${steps.extract_info.output}
|
||||
industry: ${inputs.industry}
|
||||
json_mode: true
|
||||
temperature: 0.4
|
||||
max_tokens: 2000
|
||||
|
||||
# Step 4: 生成审查报告
|
||||
- id: generate_report
|
||||
description: 生成完整审查报告
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
基于以上分析,生成一份完整的合同审查报告。
|
||||
|
||||
报告应包含:
|
||||
1. 合同概览
|
||||
2. 主要风险清单(按严重程度排序)
|
||||
3. 合规问题汇总
|
||||
4. 修改建议(按优先级排序)
|
||||
5. 谈判要点
|
||||
|
||||
分析结果:
|
||||
- 合同基本信息: ${steps.extract_info.output}
|
||||
- 风险分析: ${steps.analyze_risks.output}
|
||||
- 合规检查: ${steps.check_compliance.output}
|
||||
|
||||
请生成结构化的报告内容。
|
||||
input:
|
||||
contract_info: ${steps.extract_info.output}
|
||||
risk_analysis: ${steps.analyze_risks.output}
|
||||
compliance_checks: ${steps.check_compliance.output}
|
||||
json_mode: true
|
||||
temperature: 0.6
|
||||
max_tokens: 4000
|
||||
|
||||
# Step 5: 导出报告
|
||||
- id: export_report
|
||||
description: 导出审查报告
|
||||
action:
|
||||
type: file_export
|
||||
formats: ${inputs.export_formats}
|
||||
input: ${steps.generate_report.output}
|
||||
|
||||
# 输出映射
|
||||
outputs:
|
||||
report_summary: ${steps.generate_report.output.summary}
|
||||
risk_count: ${steps.analyze_risks.output.risks | length}
|
||||
high_risk_count: ${steps.analyze_risks.output.risks | select(.severity == "高") | length
|
||||
compliance_issues: ${steps.check_compliance.output.compliance_checks | length}
|
||||
export_files: ${steps.export_report.output}
|
||||
|
||||
# 错误处理
|
||||
on_error: stop
|
||||
|
||||
# 超时设置
|
||||
timeout_secs: 180
|
||||
292
pipelines/marketing/campaign.yaml
Normal file
292
pipelines/marketing/campaign.yaml
Normal file
@@ -0,0 +1,292 @@
|
||||
# ZCLAW Pipeline - Marketing Campaign Generator
|
||||
# 营销方案生成器:输入产品信息,自动生成完整营销策略
|
||||
|
||||
apiVersion: zclaw/v1
|
||||
kind: Pipeline
|
||||
metadata:
|
||||
name: marketing-campaign
|
||||
displayName: 营销方案生成器
|
||||
category: marketing
|
||||
description: 输入产品/服务信息,自动生成目标受众分析、渠道策略、内容计划和执行时间表
|
||||
tags:
|
||||
- 营销
|
||||
- 推广
|
||||
- 策略
|
||||
- 内容
|
||||
icon: 📢
|
||||
author: ZCLAW
|
||||
version: 1.0.0
|
||||
|
||||
spec:
|
||||
# 输入参数定义
|
||||
inputs:
|
||||
- name: product_name
|
||||
type: string
|
||||
required: true
|
||||
label: 产品/服务名称
|
||||
placeholder: 例如:智能健康手环
|
||||
validation:
|
||||
min_length: 2
|
||||
max_length: 100
|
||||
|
||||
- name: product_description
|
||||
type: text
|
||||
required: true
|
||||
label: 产品描述
|
||||
placeholder: 请简要描述您的产品/服务特点、核心价值和竞争优势
|
||||
|
||||
- name: target_market
|
||||
type: string
|
||||
required: false
|
||||
label: 目标市场
|
||||
placeholder: 例如:一二线城市年轻白领
|
||||
|
||||
- name: budget_level
|
||||
type: select
|
||||
required: false
|
||||
label: 预算级别
|
||||
default: 中等
|
||||
options:
|
||||
- 低预算
|
||||
- 中等
|
||||
- 高预算
|
||||
|
||||
- name: campaign_goals
|
||||
type: multi-select
|
||||
required: false
|
||||
label: 营销目标
|
||||
default: [品牌曝光, 用户增长]
|
||||
options:
|
||||
- 品牌曝光
|
||||
- 用户增长
|
||||
- 销售转化
|
||||
- 用户留存
|
||||
- 口碑传播
|
||||
|
||||
- name: export_formats
|
||||
type: multi-select
|
||||
required: false
|
||||
label: 导出格式
|
||||
default: [html, markdown]
|
||||
options:
|
||||
- html
|
||||
- markdown
|
||||
- json
|
||||
|
||||
# 执行步骤
|
||||
steps:
|
||||
# Step 1: 分析产品和目标受众
|
||||
- id: analyze_product
|
||||
description: 分析产品特点和目标受众
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
你是一位资深的营销策略专家。请分析以下产品/服务,并生成目标受众画像。
|
||||
|
||||
产品/服务: {{product_name}}
|
||||
产品描述: {{product_description}}
|
||||
目标市场: {{target_market}}
|
||||
营销目标: {{campaign_goals}}
|
||||
|
||||
请生成 JSON 格式的分析结果:
|
||||
{
|
||||
"product_analysis": {
|
||||
"core_value": "核心价值主张",
|
||||
"unique_selling_points": ["卖点1", "卖点2", "卖点3"],
|
||||
"competitive_advantages": ["优势1", "优势2"]
|
||||
},
|
||||
"target_audience": {
|
||||
"primary": {
|
||||
"demographics": "人口统计特征",
|
||||
"psychographics": "心理特征",
|
||||
"pain_points": ["痛点1", "痛点2"],
|
||||
"desires": ["需求1", "需求2"]
|
||||
},
|
||||
"secondary": {
|
||||
"demographics": "人口统计特征",
|
||||
"psychographics": "心理特征"
|
||||
}
|
||||
},
|
||||
"market_positioning": "市场定位建议"
|
||||
}
|
||||
input:
|
||||
product_name: ${inputs.product_name}
|
||||
product_description: ${inputs.product_description}
|
||||
target_market: ${inputs.target_market}
|
||||
campaign_goals: ${inputs.campaign_goals}
|
||||
json_mode: true
|
||||
temperature: 0.7
|
||||
max_tokens: 2500
|
||||
|
||||
# Step 2: 生成渠道策略
|
||||
- id: generate_channel_strategy
|
||||
description: 根据预算和目标生成渠道策略
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
基于以下信息,制定营销渠道策略:
|
||||
|
||||
产品分析: ${steps.analyze_product.output.product_analysis}
|
||||
目标受众: ${steps.analyze_product.output.target_audience}
|
||||
预算级别: {{budget_level}}
|
||||
营销目标: {{campaign_goals}}
|
||||
|
||||
请生成 JSON 格式的渠道策略:
|
||||
{
|
||||
"recommended_channels": [
|
||||
{
|
||||
"name": "渠道名称",
|
||||
"priority": "high|medium|low",
|
||||
"budget_allocation": "预算占比%",
|
||||
"rationale": "选择理由",
|
||||
"tactics": ["具体策略1", "具体策略2"]
|
||||
}
|
||||
],
|
||||
"channel_mix_strategy": "渠道组合策略说明",
|
||||
"measurement_metrics": ["指标1", "指标2", "指标3"]
|
||||
}
|
||||
input:
|
||||
product_analysis: ${steps.analyze_product.output.product_analysis}
|
||||
target_audience: ${steps.analyze_product.output.target_audience}
|
||||
budget_level: ${inputs.budget_level}
|
||||
campaign_goals: ${inputs.campaign_goals}
|
||||
json_mode: true
|
||||
temperature: 0.8
|
||||
max_tokens: 2000
|
||||
|
||||
# Step 3: 生成内容计划
|
||||
- id: generate_content_plan
|
||||
description: 生成内容营销计划
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
为以下营销活动制定内容计划:
|
||||
|
||||
产品: ${inputs.product_name}
|
||||
目标受众: ${steps.analyze_product.output.target_audience.primary}
|
||||
渠道策略: ${steps.generate_channel_strategy.output.recommended_channels}
|
||||
营销目标: {{campaign_goals}}
|
||||
|
||||
请生成 JSON 格式的内容计划:
|
||||
{
|
||||
"content_pillars": [
|
||||
{
|
||||
"theme": "内容主题",
|
||||
"description": "主题描述",
|
||||
"content_types": ["内容类型1", "内容类型2"]
|
||||
}
|
||||
],
|
||||
"content_calendar": [
|
||||
{
|
||||
"week": 1,
|
||||
"content_pieces": [
|
||||
{
|
||||
"type": "内容类型",
|
||||
"channel": "发布渠道",
|
||||
"topic": "内容主题",
|
||||
"call_to_action": "行动号召"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"key_messages": ["核心信息1", "核心信息2", "核心信息3"],
|
||||
"hashtag_strategy": ["话题标签1", "话题标签2"]
|
||||
}
|
||||
input:
|
||||
product_name: ${inputs.product_name}
|
||||
target_audience: ${steps.analyze_product.output.target_audience}
|
||||
channel_strategy: ${steps.generate_channel_strategy.output}
|
||||
campaign_goals: ${inputs.campaign_goals}
|
||||
json_mode: true
|
||||
temperature: 0.75
|
||||
max_tokens: 2500
|
||||
|
||||
# Step 4: 生成执行时间表
|
||||
- id: generate_timeline
|
||||
description: 生成营销活动执行时间表
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
为以下营销活动制定4周执行时间表:
|
||||
|
||||
产品: ${inputs.product_name}
|
||||
渠道策略: ${steps.generate_channel_strategy.output}
|
||||
内容计划: ${steps.generate_content_plan.output}
|
||||
|
||||
请生成 JSON 格式的执行时间表:
|
||||
{
|
||||
"phases": [
|
||||
{
|
||||
"name": "阶段名称",
|
||||
"duration": "持续时间",
|
||||
"objectives": ["目标1", "目标2"],
|
||||
"key_activities": ["活动1", "活动2"],
|
||||
"milestones": ["里程碑1", "里程碑2"]
|
||||
}
|
||||
],
|
||||
"weekly_schedule": [
|
||||
{
|
||||
"week": 1,
|
||||
"focus": "本周重点",
|
||||
"tasks": ["任务1", "任务2", "任务3"],
|
||||
"deliverables": ["产出物1", "产出物2"]
|
||||
}
|
||||
],
|
||||
"kpis": {
|
||||
"awareness": ["KPI1", "KPI2"],
|
||||
"engagement": ["KPI1", "KPI2"],
|
||||
"conversion": ["KPI1", "KPI2"]
|
||||
}
|
||||
}
|
||||
input:
|
||||
product_name: ${inputs.product_name}
|
||||
channel_strategy: ${steps.generate_channel_strategy.output}
|
||||
content_plan: ${steps.generate_content_plan.output}
|
||||
json_mode: true
|
||||
temperature: 0.7
|
||||
max_tokens: 2000
|
||||
|
||||
# Step 5: 组装营销方案
|
||||
- id: assemble_campaign
|
||||
description: 组装完整营销方案
|
||||
action:
|
||||
type: set_var
|
||||
name: campaign_data
|
||||
value: |
|
||||
{
|
||||
"title": "${inputs.product_name} 营销方案",
|
||||
"product_name": "${inputs.product_name}",
|
||||
"product_analysis": ${steps.analyze_product.output.product_analysis},
|
||||
"target_audience": ${steps.analyze_product.output.target_audience},
|
||||
"channel_strategy": ${steps.generate_channel_strategy.output},
|
||||
"content_plan": ${steps.generate_content_plan.output},
|
||||
"timeline": ${steps.generate_timeline.output},
|
||||
"created_at": "${chrono::Utc::now().to_rfc3339()}"
|
||||
}
|
||||
|
||||
# Step 6: 导出文件
|
||||
- id: export_files
|
||||
description: 导出营销方案文件
|
||||
action:
|
||||
type: file_export
|
||||
formats: ${inputs.export_formats}
|
||||
input: ${vars.campaign_data}
|
||||
|
||||
# 输出映射
|
||||
outputs:
|
||||
campaign_title: ${vars.campaign_data.title}
|
||||
product_analysis: ${vars.campaign_data.product_analysis}
|
||||
target_audience: ${vars.campaign_data.target_audience}
|
||||
channel_strategy: ${vars.campaign_data.channel_strategy}
|
||||
content_plan: ${vars.campaign_data.content_plan}
|
||||
timeline: ${vars.campaign_data.timeline}
|
||||
export_files: ${steps.export_files.output}
|
||||
|
||||
# 错误处理
|
||||
on_error: stop
|
||||
|
||||
# 超时设置
|
||||
timeout_secs: 300
|
||||
|
||||
# 并行工作线程上限
|
||||
max_workers: 4
|
||||
325
pipelines/productivity/meeting-summary.yaml
Normal file
325
pipelines/productivity/meeting-summary.yaml
Normal file
@@ -0,0 +1,325 @@
|
||||
# ZCLAW Pipeline - Meeting Summary
|
||||
# 会议纪要:输入会议内容,自动生成结构化会议纪要
|
||||
|
||||
apiVersion: zclaw/v1
|
||||
kind: Pipeline
|
||||
metadata:
|
||||
name: meeting-summary
|
||||
displayName: 智能会议纪要
|
||||
category: productivity
|
||||
description: 输入会议记录或转录文本,自动生成结构化会议纪要、待办事项和跟进计划
|
||||
tags:
|
||||
- 会议
|
||||
- 纪要
|
||||
- 生产力
|
||||
- 团队协作
|
||||
icon: 📝
|
||||
author: ZCLAW
|
||||
version: 1.0.0
|
||||
|
||||
spec:
|
||||
# 输入参数定义
|
||||
inputs:
|
||||
- name: meeting_content
|
||||
type: text
|
||||
required: true
|
||||
label: 会议内容
|
||||
placeholder: 请粘贴会议记录、转录文本或会议笔记
|
||||
|
||||
- name: meeting_type
|
||||
type: select
|
||||
required: false
|
||||
label: 会议类型
|
||||
default: 项目会议
|
||||
options:
|
||||
- 项目会议
|
||||
- 决策会议
|
||||
- 头脑风暴
|
||||
- 周会/例会
|
||||
- 客户会议
|
||||
- 面试
|
||||
- 培训/分享
|
||||
- 其他
|
||||
|
||||
- name: participant_names
|
||||
type: string
|
||||
required: false
|
||||
label: 参会人员
|
||||
placeholder: 例如:张三、李四、王五
|
||||
|
||||
- name: output_style
|
||||
type: select
|
||||
required: false
|
||||
label: 输出风格
|
||||
default: 正式
|
||||
options:
|
||||
- 正式
|
||||
- 简洁
|
||||
- 详细
|
||||
|
||||
- name: export_formats
|
||||
type: multi-select
|
||||
required: false
|
||||
label: 导出格式
|
||||
default: [html, markdown]
|
||||
options:
|
||||
- html
|
||||
- markdown
|
||||
- json
|
||||
|
||||
# 执行步骤
|
||||
steps:
|
||||
# Step 1: 提取会议基本信息
|
||||
- id: extract_info
|
||||
description: 提取会议基本信息
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
从以下会议内容中提取基本信息:
|
||||
|
||||
会议类型: {{meeting_type}}
|
||||
参会人员: {{participant_names}}
|
||||
|
||||
请提取以下信息:
|
||||
1. 会议主题/议题
|
||||
2. 会议时间和时长(如有提及)
|
||||
3. 参会人员及其角色
|
||||
4. 会议地点/形式(线上/线下)
|
||||
|
||||
会议内容:
|
||||
```
|
||||
{{meeting_content}}
|
||||
```
|
||||
|
||||
以 JSON 格式输出:
|
||||
{
|
||||
"meeting_topic": "会议主题",
|
||||
"meeting_time": "会议时间",
|
||||
"duration": "时长估计",
|
||||
"participants": [
|
||||
{
|
||||
"name": "姓名",
|
||||
"role": "角色"
|
||||
}
|
||||
],
|
||||
"meeting_format": "线上/线下/混合"
|
||||
}
|
||||
input:
|
||||
meeting_content: ${inputs.meeting_content}
|
||||
meeting_type: ${inputs.meeting_type}
|
||||
participant_names: ${inputs.participant_names}
|
||||
json_mode: true
|
||||
temperature: 0.3
|
||||
max_tokens: 1500
|
||||
|
||||
# Step 2: 提取讨论要点
|
||||
- id: extract_discussion
|
||||
description: 提取讨论要点和关键内容
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
从会议内容中提取讨论要点:
|
||||
|
||||
会议基本信息:
|
||||
${steps.extract_info.output}
|
||||
|
||||
请提取以下内容:
|
||||
1. 主要讨论议题
|
||||
2. 各议题的讨论要点
|
||||
3. 提出的观点和意见
|
||||
4. 争议点和不同看法
|
||||
|
||||
会议内容:
|
||||
```
|
||||
{{meeting_content}}
|
||||
```
|
||||
|
||||
以 JSON 格式输出:
|
||||
{
|
||||
"discussion_topics": [
|
||||
{
|
||||
"topic": "议题名称",
|
||||
"key_points": ["要点1", "要点2"],
|
||||
"different_views": [
|
||||
{
|
||||
"view": "观点",
|
||||
"proponent": "提出者"
|
||||
}
|
||||
],
|
||||
"consensus": "达成的共识"
|
||||
}
|
||||
]
|
||||
}
|
||||
input:
|
||||
meeting_info: ${steps.extract_info.output}
|
||||
meeting_content: ${inputs.meeting_content}
|
||||
json_mode: true
|
||||
temperature: 0.4
|
||||
max_tokens: 3000
|
||||
|
||||
# Step 3: 提取决策和结论
|
||||
- id: extract_decisions
|
||||
description: 提取会议决策和结论
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
从会议内容中提取决策和结论:
|
||||
|
||||
会议类型: {{meeting_type}}
|
||||
|
||||
请提取以下内容:
|
||||
1. 做出的决策
|
||||
2. 达成的结论
|
||||
3. 表决结果(如有)
|
||||
4. 下一步计划
|
||||
|
||||
会议内容:
|
||||
```
|
||||
{{meeting_content}}
|
||||
```
|
||||
|
||||
以 JSON 格式输出:
|
||||
{
|
||||
"decisions": [
|
||||
{
|
||||
"decision": "决策内容",
|
||||
"rationale": "决策理由",
|
||||
"made_by": "决策者",
|
||||
"date": "决策日期"
|
||||
}
|
||||
],
|
||||
"conclusions": ["结论1", "结论2"],
|
||||
"votes": [
|
||||
{
|
||||
"topic": "表决议题",
|
||||
"result": "表决结果",
|
||||
"details": "表决详情"
|
||||
}
|
||||
],
|
||||
"next_steps": [
|
||||
{
|
||||
"step": "下一步计划",
|
||||
"responsible": "负责人",
|
||||
"deadline": "截止日期"
|
||||
}
|
||||
]
|
||||
}
|
||||
input:
|
||||
meeting_type: ${inputs.meeting_type}
|
||||
meeting_content: ${inputs.meeting_content}
|
||||
json_mode: true
|
||||
temperature: 0.4
|
||||
max_tokens: 2000
|
||||
|
||||
# Step 4: 提取待办事项
|
||||
- id: extract_todos
|
||||
description: 提取待办事项和行动项
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
从会议内容中提取待办事项:
|
||||
|
||||
讨论要点:
|
||||
${steps.extract_discussion.output}
|
||||
|
||||
决策结论:
|
||||
${steps.extract_decisions.output}
|
||||
|
||||
请提取所有待办事项,包括:
|
||||
1. 具体任务描述
|
||||
2. 负责人
|
||||
3. 截止日期
|
||||
4. 优先级
|
||||
5. 相关背景
|
||||
|
||||
会议内容:
|
||||
```
|
||||
{{meeting_content}}
|
||||
```
|
||||
|
||||
以 JSON 格式输出:
|
||||
{
|
||||
"action_items": [
|
||||
{
|
||||
"task": "任务描述",
|
||||
"assignee": "负责人",
|
||||
"deadline": "截止日期",
|
||||
"priority": "高/中/低",
|
||||
"context": "相关背景",
|
||||
"dependencies": ["依赖项"]
|
||||
}
|
||||
],
|
||||
"follow_ups": [
|
||||
{
|
||||
"item": "跟进事项",
|
||||
"owner": "跟进人",
|
||||
"next_action": "下一步行动"
|
||||
}
|
||||
]
|
||||
}
|
||||
input:
|
||||
discussion: ${steps.extract_discussion.output}
|
||||
decisions: ${steps.extract_decisions.output}
|
||||
meeting_content: ${inputs.meeting_content}
|
||||
json_mode: true
|
||||
temperature: 0.4
|
||||
max_tokens: 2500
|
||||
|
||||
# Step 5: 生成会议纪要
|
||||
- id: generate_summary
|
||||
description: 生成完整会议纪要
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
基于以上分析,生成一份结构化的会议纪要。
|
||||
|
||||
输出风格: {{output_style}}
|
||||
|
||||
纪要应包含:
|
||||
1. 会议基本信息
|
||||
2. 会议概要
|
||||
3. 讨论要点
|
||||
4. 决策事项
|
||||
5. 待办事项清单
|
||||
6. 下次会议安排(如有提及)
|
||||
7. 附件/补充材料(如有)
|
||||
|
||||
分析数据:
|
||||
- 基本信息: ${steps.extract_info.output}
|
||||
- 讨论要点: ${steps.extract_discussion.output}
|
||||
- 决策结论: ${steps.extract_decisions.output}
|
||||
- 待办事项: ${steps.extract_todos.output}
|
||||
|
||||
请生成结构化的会议纪要内容。
|
||||
input:
|
||||
meeting_info: ${steps.extract_info.output}
|
||||
discussion: ${steps.extract_discussion.output}
|
||||
decisions: ${steps.extract_decisions.output}
|
||||
todos: ${steps.extract_todos.output}
|
||||
output_style: ${inputs.output_style}
|
||||
json_mode: true
|
||||
temperature: 0.6
|
||||
max_tokens: 4000
|
||||
|
||||
# Step 6: 导出纪要
|
||||
- id: export_summary
|
||||
description: 导出会议纪要
|
||||
action:
|
||||
type: file_export
|
||||
formats: ${inputs.export_formats}
|
||||
input: ${steps.generate_summary.output}
|
||||
|
||||
# 输出映射
|
||||
outputs:
|
||||
meeting_topic: ${steps.extract_info.output.meeting_topic}
|
||||
action_items: ${steps.extract_todos.output.action_items}
|
||||
decisions: ${steps.extract_decisions.output.decisions}
|
||||
summary: ${steps.generate_summary.output.summary}
|
||||
export_files: ${steps.export_summary.output}
|
||||
|
||||
# 错误处理
|
||||
on_error: stop
|
||||
|
||||
# 超时设置
|
||||
timeout_secs: 180
|
||||
|
||||
336
pipelines/research/literature-review.yaml
Normal file
336
pipelines/research/literature-review.yaml
Normal file
@@ -0,0 +1,336 @@
|
||||
# ZCLAW Pipeline - Literature Review
|
||||
# 文献综述:输入研究主题,自动检索文献并生成综述报告
|
||||
|
||||
apiVersion: zclaw/v1
|
||||
kind: Pipeline
|
||||
metadata:
|
||||
name: literature-review
|
||||
displayName: 文献综述生成器
|
||||
category: research
|
||||
description: 输入研究主题,自动检索相关文献、分析关键观点、生成结构化综述报告
|
||||
tags:
|
||||
- 研究
|
||||
- 文献
|
||||
- 学术
|
||||
- 综述
|
||||
icon: 📚
|
||||
author: ZCLAW
|
||||
version: 1.0.0
|
||||
|
||||
spec:
|
||||
# 输入参数定义
|
||||
inputs:
|
||||
- name: research_topic
|
||||
type: string
|
||||
required: true
|
||||
label: 研究主题
|
||||
placeholder: 例如:人工智能在医疗诊断中的应用
|
||||
validation:
|
||||
min_length: 5
|
||||
max_length: 200
|
||||
|
||||
- name: research_field
|
||||
type: select
|
||||
required: false
|
||||
label: 研究领域
|
||||
default: 计算机科学
|
||||
options:
|
||||
- 计算机科学
|
||||
- 医学
|
||||
- 生物学
|
||||
- 物理学
|
||||
- 化学
|
||||
- 经济学
|
||||
- 心理学
|
||||
- 社会学
|
||||
- 教育学
|
||||
- 其他
|
||||
|
||||
- name: review_depth
|
||||
type: select
|
||||
required: false
|
||||
label: 综述深度
|
||||
default: 标准
|
||||
options:
|
||||
- 快速概览
|
||||
- 标准
|
||||
- 深度分析
|
||||
|
||||
- name: time_range
|
||||
type: select
|
||||
required: false
|
||||
label: 文献时间范围
|
||||
default: 近5年
|
||||
options:
|
||||
- 近1年
|
||||
- 近3年
|
||||
- 近5年
|
||||
- 近10年
|
||||
- 全部
|
||||
|
||||
- name: language_preference
|
||||
type: select
|
||||
required: false
|
||||
label: 语言偏好
|
||||
default: 中英混合
|
||||
options:
|
||||
- 仅中文
|
||||
- 仅英文
|
||||
- 中英混合
|
||||
|
||||
- name: export_formats
|
||||
type: multi-select
|
||||
required: false
|
||||
label: 导出格式
|
||||
default: [html, markdown]
|
||||
options:
|
||||
- html
|
||||
- markdown
|
||||
- pdf
|
||||
|
||||
# 执行步骤
|
||||
steps:
|
||||
# Step 1: 解析研究主题
|
||||
- id: parse_topic
|
||||
description: 解析研究主题,提取关键词
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
作为学术研究专家,请分析以下研究主题,提取关键概念和搜索词。
|
||||
|
||||
研究主题: {{research_topic}}
|
||||
研究领域: {{research_field}}
|
||||
|
||||
请提取以下信息:
|
||||
1. 核心概念(3-5个)
|
||||
2. 相关关键词(10-15个)
|
||||
3. 同义词和变体
|
||||
4. 相关研究领域
|
||||
5. 建议的搜索策略
|
||||
|
||||
以 JSON 格式输出:
|
||||
{
|
||||
"core_concepts": ["概念1", "概念2"],
|
||||
"keywords": ["关键词1", "关键词2"],
|
||||
"synonyms": {
|
||||
"概念1": ["同义词1", "同义词2"]
|
||||
},
|
||||
"related_fields": ["领域1", "领域2"],
|
||||
"search_strategy": "搜索策略说明"
|
||||
}
|
||||
input:
|
||||
research_topic: ${inputs.research_topic}
|
||||
research_field: ${inputs.research_field}
|
||||
json_mode: true
|
||||
temperature: 0.3
|
||||
max_tokens: 2000
|
||||
|
||||
# Step 2: 生成文献搜索查询
|
||||
- id: generate_queries
|
||||
description: 生成学术搜索查询
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
基于以下关键词,生成用于学术数据库搜索的查询语句。
|
||||
|
||||
核心概念: ${steps.parse_topic.output.core_concepts}
|
||||
关键词: ${steps.parse_topic.output.keywords}
|
||||
时间范围: {{time_range}}
|
||||
语言偏好: {{language_preference}}
|
||||
|
||||
请生成适合以下数据库的搜索查询:
|
||||
1. Google Scholar
|
||||
2. PubMed (如果是医学/生物相关)
|
||||
3. IEEE Xplore (如果是工程/计算机相关)
|
||||
4. CNKI (中国知网)
|
||||
|
||||
以 JSON 格式输出:
|
||||
{
|
||||
"queries": [
|
||||
{
|
||||
"database": "数据库名称",
|
||||
"query": "搜索查询语句",
|
||||
"expected_results": "预期结果描述"
|
||||
}
|
||||
],
|
||||
"inclusion_criteria": ["纳入标准1", "纳入标准2"],
|
||||
"exclusion_criteria": ["排除标准1", "排除标准2"]
|
||||
}
|
||||
input:
|
||||
parsed_topic: ${steps.parse_topic.output}
|
||||
time_range: ${inputs.time_range}
|
||||
language_preference: ${inputs.language_preference}
|
||||
json_mode: true
|
||||
temperature: 0.4
|
||||
max_tokens: 1500
|
||||
|
||||
# Step 3: 分析研究趋势
|
||||
- id: analyze_trends
|
||||
description: 分析研究趋势和发展脉络
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
基于以下研究主题,分析该领域的研究趋势。
|
||||
|
||||
研究主题: {{research_topic}}
|
||||
核心概念: ${steps.parse_topic.output.core_concepts}
|
||||
综述深度: {{review_depth}}
|
||||
|
||||
请分析以下方面:
|
||||
1. 研究历史脉络
|
||||
2. 主要研究方向
|
||||
3. 关键突破和里程碑
|
||||
4. 当前研究热点
|
||||
5. 未来发展趋势
|
||||
6. 主要挑战和争议
|
||||
|
||||
以 JSON 格式输出:
|
||||
{
|
||||
"historical_development": {
|
||||
"early_stage": "早期发展阶段描述",
|
||||
"middle_stage": "中期发展阶段描述",
|
||||
"current_stage": "当前阶段描述"
|
||||
},
|
||||
"main_research_directions": [
|
||||
{
|
||||
"direction": "研究方向名称",
|
||||
"description": "方向描述",
|
||||
"key_contributors": ["主要贡献者"]
|
||||
}
|
||||
],
|
||||
"key_milestones": [
|
||||
{
|
||||
"year": "年份",
|
||||
"event": "里程碑事件",
|
||||
"significance": "意义"
|
||||
}
|
||||
],
|
||||
"current_hotspots": ["热点1", "热点2"],
|
||||
"future_trends": ["趋势1", "趋势2"],
|
||||
"challenges": ["挑战1", "挑战2"]
|
||||
}
|
||||
input:
|
||||
research_topic: ${inputs.research_topic}
|
||||
parsed_topic: ${steps.parse_topic.output}
|
||||
review_depth: ${inputs.review_depth}
|
||||
json_mode: true
|
||||
temperature: 0.5
|
||||
max_tokens: 3000
|
||||
|
||||
# Step 4: 生成关键观点分析
|
||||
- id: analyze_key_points
|
||||
description: 分析领域关键观点和理论
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
基于以下信息,分析该研究领域的核心观点和理论框架。
|
||||
|
||||
研究主题: {{research_topic}}
|
||||
研究趋势: ${steps.analyze_trends.output}
|
||||
综述深度: {{review_depth}}
|
||||
|
||||
请分析以下内容:
|
||||
1. 主要理论框架
|
||||
2. 核心观点和假说
|
||||
3. 研究方法论
|
||||
4. 主要争议和不同学派
|
||||
5. 共识和结论
|
||||
|
||||
以 JSON 格式输出:
|
||||
{
|
||||
"theoretical_frameworks": [
|
||||
{
|
||||
"name": "理论名称",
|
||||
"proponents": ["提出者"],
|
||||
"core_concepts": ["核心概念"],
|
||||
"applications": ["应用领域"]
|
||||
}
|
||||
],
|
||||
"core_viewpoints": [
|
||||
{
|
||||
"viewpoint": "观点描述",
|
||||
"evidence": ["支持证据"],
|
||||
"counter_evidence": ["反对证据"]
|
||||
}
|
||||
],
|
||||
"methodologies": [
|
||||
{
|
||||
"method": "方法名称",
|
||||
"description": "方法描述",
|
||||
"advantages": ["优点"],
|
||||
"limitations": ["局限"]
|
||||
}
|
||||
],
|
||||
"debates": [
|
||||
{
|
||||
"topic": "争议话题",
|
||||
"positions": ["立场1", "立场2"],
|
||||
"current_status": "当前状态"
|
||||
}
|
||||
],
|
||||
"consensus": ["共识1", "共识2"]
|
||||
}
|
||||
input:
|
||||
research_topic: ${inputs.research_topic}
|
||||
trends: ${steps.analyze_trends.output}
|
||||
review_depth: ${inputs.review_depth}
|
||||
json_mode: true
|
||||
temperature: 0.6
|
||||
max_tokens: 4000
|
||||
|
||||
# Step 5: 生成综述报告
|
||||
- id: generate_review
|
||||
description: 生成完整文献综述报告
|
||||
action:
|
||||
type: llm_generate
|
||||
template: |
|
||||
基于以上分析,生成一份完整的文献综述报告。
|
||||
|
||||
报告应包含以下结构:
|
||||
1. 摘要
|
||||
2. 引言(研究背景、目的、意义)
|
||||
3. 研究方法(文献检索策略、筛选标准)
|
||||
4. 研究现状分析
|
||||
5. 主要研究发现
|
||||
6. 讨论与展望
|
||||
7. 结论
|
||||
8. 参考文献建议
|
||||
|
||||
分析数据:
|
||||
- 主题解析: ${steps.parse_topic.output}
|
||||
- 搜索策略: ${steps.generate_queries.output}
|
||||
- 研究趋势: ${steps.analyze_trends.output}
|
||||
- 关键观点: ${steps.analyze_key_points.output}
|
||||
|
||||
请生成结构化的综述内容。
|
||||
input:
|
||||
topic_analysis: ${steps.parse_topic.output}
|
||||
search_queries: ${steps.generate_queries.output}
|
||||
trends: ${steps.analyze_trends.output}
|
||||
key_points: ${steps.analyze_key_points.output}
|
||||
json_mode: true
|
||||
temperature: 0.7
|
||||
max_tokens: 5000
|
||||
|
||||
# Step 6: 导出报告
|
||||
- id: export_review
|
||||
description: 导出综述报告
|
||||
action:
|
||||
type: file_export
|
||||
formats: ${inputs.export_formats}
|
||||
input: ${steps.generate_review.output}
|
||||
|
||||
# 输出映射
|
||||
outputs:
|
||||
review_title: ${steps.generate_review.output.title}
|
||||
abstract: ${steps.generate_review.output.abstract}
|
||||
key_findings: ${steps.generate_review.output.key_findings}
|
||||
future_directions: ${steps.analyze_trends.output.future_trends}
|
||||
export_files: ${steps.export_review.output}
|
||||
|
||||
# 错误处理
|
||||
on_error: stop
|
||||
|
||||
# 超时设置
|
||||
timeout_secs: 300
|
||||
|
||||
Reference in New Issue
Block a user