Files
zhuangang/topics/ai/prompt-engineering/index.md
T

45 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
id: ai.prompt-engineering.index
title: 提示词与上下文工程
type: index
domain: ai
stack: [prompt-engineering]
tags: [提示词, 结构化输出, 上下文工程, 提示词注入]
week: [5, 11, 13]
---
# 提示词与上下文工程
BOSS直聘 2026-10-23 的调研中约 13 个岗位提到 Prompt 工程。重点不是“提示词技巧大全”,而是**结构化写法、结构化输出 + 校验、版本管理和评测、注入防护**这些工程化做法。上下文工程(放什么进上下文)见 [Agent 设计专题](../agent-design/02-context-skills-multiagent.md)。
## 学习路线
| 顺序 | 课程 | 级别 | 预计 |
| --- | --- | --- | --- |
| 1 | [提示词结构、少样本、结构化输出和提示词版本管理](01-prompt-structured-output.md) | 基础 | 2.5 小时 |
| 2 | [提示词注入和防护:直接注入、间接注入、输出校验和权限兜底](02-context-injection.md) | 高级 | 2.5 小时 |
## 企业场景
- [读邮件的办公助手:间接提示词注入的多层防护](scenarios/injection-defense.md)
## 面试题
- [提示词与上下文工程面试题](interview.md)
## 示例代码
- [examples/prompt-kit](examples/prompt-kit/):版本化模板、外部内容隔离和转义、注入启发式检测、结构化输出校验 + 修复重试、链接白名单(带测试)
## 在 16 周计划中
- [第 5 周](../../../plan/week05-rag-1.md)、[第 11 周](../../../plan/week11-agent-m2-langgraph.md)、[第 13 周](../../../plan/week13-agent-m4-eval-lowcode.md)
## 官方资料
各厂商的提示词指南(以官方文档为准):
- OpenAI:https://platform.openai.com/docs/guides/prompt-engineering
- Anthropic:https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview
- OWASP LLM 应用十大风险:https://genai.owasp.org/llm-top-10/