Prompt Engineering
学习利用提示、检索、工具与评估方法构建可靠的语言模型应用。
关于这组笔记
个人自学讲义,按公开课表主题编写,具体论述依据公开论文;原课 slides 与阅读清单未公开。
查看原课程资料适合的起点
建议熟悉 Python 与基础概率,了解语言模型的基本用途。
本系列为个人学习整理,非学校官方发布,不代表学校或授课教师的认可或背书。
沿着目录阅读
当前 20 篇预备知识
课程讲义
- Lecture 01Lecture 1 · 语言模型简史:从词向量到 GPT · History of Language Models
- Lecture 02Lecture 2 · 上下文学习 · In-Context Learning
- Lecture 03Lecture 3 · 指令微调 · Instruction Tuning
- Lecture 04Lecture 4 · 思维链提示 · Chain-of-Thought Prompting
- Lecture 05Lecture 5 · 对齐(一):幻觉与校准 · Alignment: Hallucinations
- Lecture 06Lecture 6 · 对齐(二):偏见、毒性与谄媚 · Alignment: Bias, Toxicity and Sycophancy
- Lecture 07Lecture 7 · 提示增强(一):检索增强生成 · Prompt Augmentation: Retrievers
- Lecture 08Lecture 8 · 提示增强(二):工具使用 · Prompt Augmentation: Tool Usage
- Lecture 09Lecture 9 · 任务分解 · Task Decomposition
- Lecture 10Lecture 10 · 自动提示与自我验证 · Auto-Prompting and Self-Verification
- Lecture 11Lecture 11 · 代码生成 · Code Generation
- Lecture 12Lecture 12 · 对抗性提示与护栏 · Adversarial Prompting and Guardrails
- Lecture 13Lecture 13 · 智能体(一):推理与规划 · Agents – Reasoning and Planning
- Lecture 14Lecture 14 · 智能体(二):角色、记忆与行动 · Agents – Personas, Memory, Actions
- Lecture 15Lecture 15 · 多智能体:协作与辩论 · Agent Interaction: Collaboration and Debate
- Lecture 16Lecture 16 · 超级对齐:伦理、道德与欺骗 · Super Alignment – Ethics, Morality and Deception
- Lecture 17Lecture 17 · 评估提示系统与课程项目 · Evaluating Prompt-Based Systems & Projects
从讲义到代码
按课程目录整理的配套示例,保留各单元的文件结构。阅读讲义时,可以下载整套代码,在本地逐步探索。
下载 CMU17-630 代码请在独立虚拟环境中查看依赖后运行;未附模型权重和运行产物;示例未逐一验证。