Education (3): research-to-quiz, student-analysis, lesson-plan Healthcare (3): policy-compliance, meeting-minutes, data-report Design Shantou (4): trend-to-design, competitor-research, client-communication, supply-chain-collect
269 lines
7.8 KiB
YAML
269 lines
7.8 KiB
YAML
# ZCLAW Pipeline - 教研到测验一站式生成
|
||
# 输入教研主题,自动完成:文献调研 → 课件大纲 → 互动场景 → 课后测验
|
||
|
||
apiVersion: zclaw/v1
|
||
kind: Pipeline
|
||
metadata:
|
||
name: research-to-quiz
|
||
displayName: 教研→课件→测验
|
||
category: education
|
||
industry: education
|
||
description: 输入教研主题,自动生成文献摘要、课件大纲、互动场景和测验题目
|
||
tags:
|
||
- 教育
|
||
- 教研
|
||
- 课件生成
|
||
- 测验
|
||
icon: 🎓
|
||
author: ZCLAW
|
||
version: 1.0.0
|
||
|
||
spec:
|
||
inputs:
|
||
- name: topic
|
||
type: string
|
||
required: true
|
||
label: 教研主题
|
||
placeholder: 例如:PBL 项目式学习在初中科学课中的应用
|
||
validation:
|
||
min_length: 4
|
||
max_length: 200
|
||
|
||
- name: subject
|
||
type: select
|
||
required: false
|
||
label: 学科
|
||
default: 综合
|
||
options:
|
||
- 语文
|
||
- 数学
|
||
- 英语
|
||
- 物理
|
||
- 化学
|
||
- 生物
|
||
- 历史
|
||
- 地理
|
||
- 科学
|
||
- 信息科技
|
||
- 综合
|
||
|
||
- name: grade_level
|
||
type: select
|
||
required: false
|
||
label: 学段
|
||
default: 初中
|
||
options:
|
||
- 小学低段(1-3)
|
||
- 小学高段(4-6)
|
||
- 初中
|
||
- 高中
|
||
- 大学
|
||
- 成人教育
|
||
|
||
- name: scene_count
|
||
type: number
|
||
required: false
|
||
label: 互动场景数
|
||
default: 4
|
||
validation:
|
||
min: 2
|
||
max: 10
|
||
|
||
- name: quiz_count
|
||
type: number
|
||
required: false
|
||
label: 测验题数
|
||
default: 5
|
||
validation:
|
||
min: 3
|
||
max: 20
|
||
|
||
steps:
|
||
# Step 1: 文献调研摘要
|
||
- id: literature_review
|
||
description: 针对教研主题生成文献综述和关键发现
|
||
action:
|
||
type: llm_generate
|
||
template: |
|
||
你是一位资深教育研究员。请针对以下教研主题生成文献综述:
|
||
|
||
主题: {{topic}}
|
||
学科: {{subject}}
|
||
学段: {{grade_level}}
|
||
|
||
请生成 JSON 格式的文献综述:
|
||
{
|
||
"title": "综述标题",
|
||
"summary": "200字以内概述",
|
||
"key_findings": [
|
||
{"finding": "核心发现", "source_type": "期刊/报告/政策", "implication": "实践启示"}
|
||
],
|
||
"trends": ["趋势1", "趋势2", "趋势3"],
|
||
"gaps": ["研究空白1", "研究空白2"]
|
||
}
|
||
input:
|
||
topic: ${inputs.topic}
|
||
subject: ${inputs.subject}
|
||
grade_level: ${inputs.grade_level}
|
||
json_mode: true
|
||
temperature: 0.6
|
||
max_tokens: 2500
|
||
|
||
# Step 2: 生成课件大纲
|
||
- id: generate_outline
|
||
description: 基于文献综述生成课件大纲
|
||
action:
|
||
type: llm_generate
|
||
template: |
|
||
基于以下文献综述,设计一节完整的课件大纲:
|
||
|
||
教研主题: ${inputs.topic}
|
||
学科: ${inputs.subject}
|
||
学段: ${inputs.grade_level}
|
||
|
||
文献综述关键发现:
|
||
${steps.literature_review.output.key_findings}
|
||
|
||
请生成 JSON 格式的课件大纲:
|
||
{
|
||
"title": "课件标题",
|
||
"objectives": ["教学目标1", "教学目标2", "教学目标3"],
|
||
"sections": [
|
||
{
|
||
"title": "章节标题",
|
||
"duration_mins": 10,
|
||
"type": "导入|讲解|互动|练习|总结",
|
||
"key_points": ["要点1", "要点2"]
|
||
}
|
||
],
|
||
"materials": ["教学材料1", "教学材料2"]
|
||
}
|
||
input:
|
||
topic: ${inputs.topic}
|
||
subject: ${inputs.subject}
|
||
grade_level: ${inputs.grade_level}
|
||
findings: ${steps.literature_review.output.key_findings}
|
||
json_mode: true
|
||
temperature: 0.7
|
||
max_tokens: 2000
|
||
|
||
# Step 3: 并行生成互动场景
|
||
- id: generate_scenes
|
||
description: 为课件各章节生成互动教学场景
|
||
action:
|
||
type: parallel
|
||
each: ${steps.generate_outline.output.sections}
|
||
max_workers: 4
|
||
step:
|
||
id: scene_item
|
||
action:
|
||
type: llm_generate
|
||
template: |
|
||
为以下课件章节设计互动教学场景:
|
||
|
||
主题: ${inputs.topic}
|
||
章节: {{item.title}}
|
||
类型: {{item.type}}
|
||
要点: {{item.key_points}}
|
||
学段: ${inputs.grade_level}
|
||
|
||
请生成 JSON 格式的互动场景:
|
||
{
|
||
"section_title": "{{item.title}}",
|
||
"scene_type": "讨论|实验|角色扮演|小组竞赛|案例分析",
|
||
"description": "场景描述",
|
||
"teacher_guide": "教师引导语",
|
||
"student_prompt": "学生任务提示",
|
||
"duration_mins": 5,
|
||
"materials_needed": ["材料1"],
|
||
"assessment": "评价方式"
|
||
}
|
||
input:
|
||
item: ${item}
|
||
json_mode: true
|
||
temperature: 0.8
|
||
max_tokens: 1000
|
||
|
||
# Step 4: 生成测验题目
|
||
- id: generate_quiz
|
||
description: 根据课件内容生成测验
|
||
action:
|
||
type: llm_generate
|
||
template: |
|
||
基于以下课件内容生成测验题:
|
||
|
||
教研主题: ${inputs.topic}
|
||
教学目标: ${steps.generate_outline.output.objectives}
|
||
场景数: ${steps.generate_scenes.output | length}
|
||
题目数量: {{quiz_count}}
|
||
学段: ${inputs.grade_level}
|
||
|
||
请生成 JSON 格式测验:
|
||
{
|
||
"quiz_title": "测验标题",
|
||
"questions": [
|
||
{
|
||
"type": "single_choice|multi_choice|true_false|short_answer",
|
||
"question": "题目内容",
|
||
"options": ["A", "B", "C", "D"],
|
||
"correct": "A",
|
||
"explanation": "解析",
|
||
"difficulty": "基础|提高|挑战",
|
||
"related_objective": "对应教学目标"
|
||
}
|
||
]
|
||
}
|
||
input:
|
||
topic: ${inputs.topic}
|
||
objectives: ${steps.generate_outline.output.objectives}
|
||
scene_count: ${steps.generate_scenes.output | length}
|
||
quiz_count: ${inputs.quiz_count}
|
||
grade_level: ${inputs.grade_level}
|
||
json_mode: true
|
||
temperature: 0.5
|
||
max_tokens: 3000
|
||
|
||
# Step 5: 组装完整输出
|
||
- id: assemble_output
|
||
description: 组装教研→课件→测验完整包
|
||
action:
|
||
type: llm_generate
|
||
template: |
|
||
请将以下内容整合为一份完整的教学方案摘要:
|
||
|
||
文献综述: ${steps.literature_review.output.summary}
|
||
课件大纲: ${steps.generate_outline.output.title}
|
||
互动场景数: ${steps.generate_scenes.output | length}
|
||
测验题数: ${inputs.quiz_count}
|
||
|
||
生成 JSON 格式摘要:
|
||
{
|
||
"title": "方案标题",
|
||
"literature_summary": "文献综述摘要",
|
||
"course_outline": "课件大纲摘要",
|
||
"total_interactive_scenes": 0,
|
||
"total_quiz_questions": 0,
|
||
"estimated_duration_mins": 0,
|
||
"preview_text": "300字方案预览"
|
||
}
|
||
input:
|
||
literature: ${steps.literature_review.output}
|
||
outline: ${steps.generate_outline.output}
|
||
scenes: ${steps.generate_scenes.output}
|
||
quiz: ${steps.generate_quiz.output}
|
||
quiz_count: ${inputs.quiz_count}
|
||
json_mode: true
|
||
temperature: 0.5
|
||
max_tokens: 1500
|
||
|
||
outputs:
|
||
literature: ${steps.literature_review.output}
|
||
outline: ${steps.generate_outline.output}
|
||
scenes: ${steps.generate_scenes.output}
|
||
quiz: ${steps.generate_quiz.output}
|
||
summary: ${steps.assemble_output.output}
|
||
|
||
on_error: stop
|
||
timeout_secs: 300
|
||
max_workers: 4
|