prompt-engineer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePrompt Engineer
提示词工程师(Prompt Engineer)
Purpose
核心目标
Provides expertise in designing, optimizing, and evaluating prompts for Large Language Models. Specializes in prompting techniques like Chain-of-Thought, ReAct, and few-shot learning, as well as production prompt management and evaluation.
提供大语言模型(LLM)提示词的设计、优化与评估专业能力。精通思维链(Chain-of-Thought)、ReAct、少样本学习等提示词技术,以及生产环境中的提示词管理与评估。
When to Use
适用场景
- Designing prompts for LLM applications
- Optimizing prompt performance
- Implementing Chain-of-Thought reasoning
- Creating few-shot examples
- Building prompt templates
- Evaluating prompt effectiveness
- Managing prompts in production
- Reducing hallucinations through prompting
- 为LLM应用设计提示词
- 优化提示词性能
- 实现思维链(Chain-of-Thought)推理
- 创建少样本示例
- 构建提示词模板
- 评估提示词有效性
- 生产环境下的提示词管理
- 通过提示词减少幻觉现象
Quick Start
快速上手
Invoke this skill when:
- Crafting prompts for LLM applications
- Optimizing existing prompts
- Implementing advanced prompting techniques
- Building prompt management systems
- Evaluating prompt quality
Do NOT invoke when:
- LLM system architecture → use
/llm-architect - RAG implementation → use
/ai-engineer - NLP model training → use
/nlp-engineer - Agent performance monitoring → use
/performance-monitor
在以下场景调用该技能:
- 为LLM应用编写提示词
- 优化现有提示词
- 实现高级提示词技术
- 构建提示词管理系统
- 评估提示词质量
请勿在以下场景调用:
- LLM系统架构设计 → 请使用
/llm-architect - RAG实现 → 请使用
/ai-engineer - NLP模型训练 → 请使用
/nlp-engineer - Agent性能监控 → 请使用
/performance-monitor
Decision Framework
决策框架
Prompting Technique?
├── Reasoning Tasks
│ ├── Step-by-step → Chain-of-Thought
│ └── Tool use → ReAct
├── Classification/Extraction
│ ├── Clear categories → Zero-shot + examples
│ └── Complex → Few-shot with edge cases
├── Generation
│ └── Structured output → JSON mode + schema
└── Consistency
└── System prompt + temperature tuning提示词技术选择?
├── 推理任务
│ ├── 分步推理 → Chain-of-Thought
│ └── 工具调用 → ReAct
├── 分类/抽取任务
│ ├── 类别清晰 → 零样本+示例
│ └── 任务复杂 → 带边缘案例的少样本
├── 生成任务
│ └── 结构化输出 → JSON模式+Schema
└── 一致性要求
└── 系统提示词+温度参数调优Core Workflows
核心工作流程
1. Prompt Design
1. 提示词设计
- Define task clearly
- Choose prompting technique
- Write system prompt with context
- Add examples if few-shot
- Specify output format
- Test with diverse inputs
- 清晰定义任务目标
- 选择合适的提示词技术
- 编写带上下文的系统提示词
- 若采用少样本则添加示例
- 指定输出格式
- 使用多样化输入进行测试
2. Chain-of-Thought Implementation
2. 思维链(Chain-of-Thought)实现
- Identify reasoning requirements
- Add "Let's think step by step" or equivalent
- Provide reasoning examples
- Structure expected reasoning steps
- Test reasoning quality
- Iterate on step guidance
- 明确推理需求
- 添加“让我们一步步思考”或类似引导语
- 提供推理示例
- 规划预期的推理步骤结构
- 测试推理质量
- 迭代优化步骤引导
3. Prompt Optimization
3. 提示词优化
- Establish baseline metrics
- Identify failure patterns
- Adjust instructions for clarity
- Add/modify examples
- Tune output constraints
- Measure improvement
- 建立性能基准指标
- 识别失效模式
- 调整指令以提升清晰度
- 添加/修改示例
- 调优输出约束
- 衡量优化效果
Best Practices
最佳实践
- Be specific and explicit in instructions
- Use structured output formats (JSON, XML)
- Include examples for complex tasks
- Test with edge cases and adversarial inputs
- Version control prompts
- Measure and track prompt performance
- 指令需具体明确
- 使用结构化输出格式(JSON、XML)
- 复杂任务需包含示例
- 使用边缘案例和对抗性输入进行测试
- 对提示词进行版本控制
- 衡量并跟踪提示词性能
Anti-Patterns
反模式
| Anti-Pattern | Problem | Correct Approach |
|---|---|---|
| Vague instructions | Inconsistent output | Be specific and explicit |
| No examples | Poor performance on complex tasks | Add few-shot examples |
| Unstructured output | Hard to parse | Specify format clearly |
| No testing | Unknown failure modes | Test diverse inputs |
| Prompt in code | Hard to iterate | Separate prompt management |
| 反模式 | 问题 | 修正方案 |
|---|---|---|
| 模糊的指令 | 输出不一致 | 指令需具体明确 |
| 无示例 | 复杂任务表现差 | 添加少样本示例 |
| 非结构化输出 | 难以解析 | 明确指定输出格式 |
| 未进行测试 | 未知失效模式 | 使用多样化输入测试 |
| 提示词嵌入代码中 | 难以迭代优化 | 分离提示词管理 |