CMU / CMU17-630已收录

Prompt Engineering

学习利用提示、检索、工具与评估方法构建可靠的语言模型应用。

关于这组笔记

个人自学讲义,按公开课表主题编写,具体论述依据公开论文;原课 slides 与阅读清单未公开。

查看原课程资料

适合的起点

建议熟悉 Python 与基础概率,了解语言模型的基本用途。

本系列为个人学习整理,非学校官方发布,不代表学校或授课教师的认可或背书。

沿着目录阅读

当前 20 篇

预备知识

  1. 预备知识 1前置讲 P1 · 文本、字节与 token · Text, Bytes and Tokens
  2. 预备知识 2前置讲 P2 · 把 LLM 当作一个软件服务 · The LLM as a Software Service
  3. 预备知识 3前置讲 P3 · 提示实验的统计学 · Statistics for Prompt Experiments

课程讲义

  1. Lecture 01Lecture 1 · 语言模型简史:从词向量到 GPT · History of Language Models
  2. Lecture 02Lecture 2 · 上下文学习 · In-Context Learning
  3. Lecture 03Lecture 3 · 指令微调 · Instruction Tuning
  4. Lecture 04Lecture 4 · 思维链提示 · Chain-of-Thought Prompting
  5. Lecture 05Lecture 5 · 对齐(一):幻觉与校准 · Alignment: Hallucinations
  6. Lecture 06Lecture 6 · 对齐(二):偏见、毒性与谄媚 · Alignment: Bias, Toxicity and Sycophancy
  7. Lecture 07Lecture 7 · 提示增强(一):检索增强生成 · Prompt Augmentation: Retrievers
  8. Lecture 08Lecture 8 · 提示增强(二):工具使用 · Prompt Augmentation: Tool Usage
  9. Lecture 09Lecture 9 · 任务分解 · Task Decomposition
  10. Lecture 10Lecture 10 · 自动提示与自我验证 · Auto-Prompting and Self-Verification
  11. Lecture 11Lecture 11 · 代码生成 · Code Generation
  12. Lecture 12Lecture 12 · 对抗性提示与护栏 · Adversarial Prompting and Guardrails
  13. Lecture 13Lecture 13 · 智能体(一):推理与规划 · Agents – Reasoning and Planning
  14. Lecture 14Lecture 14 · 智能体(二):角色、记忆与行动 · Agents – Personas, Memory, Actions
  15. Lecture 15Lecture 15 · 多智能体:协作与辩论 · Agent Interaction: Collaboration and Debate
  16. Lecture 16Lecture 16 · 超级对齐:伦理、道德与欺骗 · Super Alignment – Ethics, Morality and Deception
  17. Lecture 17Lecture 17 · 评估提示系统与课程项目 · Evaluating Prompt-Based Systems & Projects

从讲义到代码

按课程目录整理的配套示例,保留各单元的文件结构。阅读讲义时,可以下载整套代码,在本地逐步探索。

下载 CMU17-630 代码

请在独立虚拟环境中查看依赖后运行;未附模型权重和运行产物;示例未逐一验证。

返回全部课程