prompt-engineer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Prompt 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. 提示词设计

  1. Define task clearly
  2. Choose prompting technique
  3. Write system prompt with context
  4. Add examples if few-shot
  5. Specify output format
  6. Test with diverse inputs
  1. 清晰定义任务目标
  2. 选择合适的提示词技术
  3. 编写带上下文的系统提示词
  4. 若采用少样本则添加示例
  5. 指定输出格式
  6. 使用多样化输入进行测试

2. Chain-of-Thought Implementation

2. 思维链(Chain-of-Thought)实现

  1. Identify reasoning requirements
  2. Add "Let's think step by step" or equivalent
  3. Provide reasoning examples
  4. Structure expected reasoning steps
  5. Test reasoning quality
  6. Iterate on step guidance
  1. 明确推理需求
  2. 添加“让我们一步步思考”或类似引导语
  3. 提供推理示例
  4. 规划预期的推理步骤结构
  5. 测试推理质量
  6. 迭代优化步骤引导

3. Prompt Optimization

3. 提示词优化

  1. Establish baseline metrics
  2. Identify failure patterns
  3. Adjust instructions for clarity
  4. Add/modify examples
  5. Tune output constraints
  6. Measure improvement
  1. 建立性能基准指标
  2. 识别失效模式
  3. 调整指令以提升清晰度
  4. 添加/修改示例
  5. 调优输出约束
  6. 衡量优化效果

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-PatternProblemCorrect Approach
Vague instructionsInconsistent outputBe specific and explicit
No examplesPoor performance on complex tasksAdd few-shot examples
Unstructured outputHard to parseSpecify format clearly
No testingUnknown failure modesTest diverse inputs
Prompt in codeHard to iterateSeparate prompt management
反模式问题修正方案
模糊的指令输出不一致指令需具体明确
无示例复杂任务表现差添加少样本示例
非结构化输出难以解析明确指定输出格式
未进行测试未知失效模式使用多样化输入测试
提示词嵌入代码中难以迭代优化分离提示词管理