Prompt工程
优化Prompt设计,提升AI生成内容质量和相关性
Prompt工程概述
Prompt工程设计有效的提示词[1],引导AI生成期望输出[2]。
核心原则
清晰明确[3]
- 具体指令、明确目标、详细要求
上下文充分[4]
- 背景信息、示例参考、约束条件
结构化[5]
- 分步骤、有逻辑、可验证
常用技巧
Few-Shot Learning[6]
- 提供示例、展示格式、引导风格
Chain of Thought[7]
- 分步推理、逻辑链条、中间步骤
Role Prompting[8]
- 角色设定、专业视角、特定风格
应用场景
内容生成[9]
- 文章创作、问答生成、内容优化
数据提取[10]
- 信息抽取、结构化输出、数据转换
相关资源
参考文献
-
OpenAI. (2024). "Prompt Engineering". Best Practices. https://platform.openai.com/docs/guides/prompt-engineering
-
Anthropic. (2024). "Prompt Design". Claude Guide. https://docs.anthropic.com/claude/docs/prompt-design
-
Google. (2024). "Prompting Guide". Gemini Documentation. https://ai.google.dev/docs/prompting_intro
-
OpenAI. (2024). "Context Window". Technical Guide. https://platform.openai.com/docs/guides/
-
Microsoft. (2024). "Prompt Engineering". Azure AI. https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/prompt-engineering
-
OpenAI. (2024). "Few-Shot Learning". Techniques. https://platform.openai.com/docs/guides/prompt-engineering/strategy-provide-examples
-
Google AI. (2024). "Chain of Thought". Research. https://ai.googleblog.com/2022/05/language-models-perform-reasoning-via.html
-
Anthropic. (2024). "Role Prompting". Techniques. https://docs.anthropic.com/
-
OpenAI. (2024). "Content Generation". Use Cases. https://platform.openai.com/docs/guides/
-
LangChain. (2024). "Data Extraction". Documentation. https://python.langchain.com/docs/use_cases/extraction/
更新日期:2025-11
词条状态:✅ 已完成