Files
slide/decks/gen2D/pages/prompt-agent.md
T
wonder d479504f12
Deploy Slides / build-and-deploy (push) Successful in 1m32s
feat: restructure gen2D deck with enriched content and frankfurt theme components
- Restructure from 12 slides to 21 slides with proper section navigation
- Split into pages/ for modular maintenance (15 page files)
- Use frankfurt theme: cover layout, Item component, section frontmatter
- Remove all two-cols layouts to avoid rendering issues
- Add rich content from tmp/ docs: Eino pipeline, prompt agent, async tasks, data model, deployment
- Use Item component for structured content blocks
- Add mermaid ER diagram for data model
- Add Go code block for pipeline type definitions
2026-05-30 14:22:50 +08:00

30 lines
1.1 KiB
Markdown

# 提示词优化 Agent
Eino Chain 驱动的智能提示词生成
```mermaid {scale: 0.8}
graph LR
A[用户描述] --> B[风格合并]
B --> C[三段式组装]
C --> D[LLM 优化]
D --> E[最终提示词]
F[工程风格] --> B
G[任务覆盖] --> B
H[重试注入] --> D
```
<Item title="① 风格合并">
`finalStyle = merge(projectStyle, taskStyle)` — 工程风格为基底,任务风格逐键覆盖。自定义标签(`custom:` 前缀)自动提取。
</Item>
<Item title="② 三段式提示词组装">
将合并后的风格信息组装为三段式规范提示词:
- **主体描述**:用户输入的角色/场景描述
- **风格约束**:美术风格、色调、线条等风格键
- **技术规格**:尺寸、格式、透明背景等引擎适配参数
</Item>
<Item title="③ LLM 优化 + 回退机制">
调用 Eino Chain 将三段式提示词发给 DeepSeek 等 LLM 进行润色优化。**无 API Key 时自动回退到模板生成**,保证功能可用。优化失败时注入重试上下文,指导模型修正。
</Item>