面向开发者的 Prompt Engineering 提示词工程(免费公开课)

1.1 角色设定、任务目标与约束护栏写法

No replay is currently available. You can read the handout or download lesson materials.

Lesson handout

高信噪比 Prompt 的三段式骨架

  1. System 身份与原则(简短明确)
  2. Context 最小上下文(结构化 XML 标签隔离 <spec> / <code>)
  3. Output Contract 输出契约(指定字段名、枚举值与异常缺省值)