- 0
- 0
- 约8.43万字
- 约 71页
- 2026-02-10 发布于浙江
- 举报
Prompt
EngineeringAuthor:LeeBoonstra
PromptEngineering
Acknowledgements
Contentcontributors
MichaelSherman
YuanCao
ErickArmbrust
AnantNawalgaria
AntonioGulli
SimoneCammel
CuratorsandEditors
AntonioGulli
AnantNawalgaria
GraceMollison
TechnicalWriter
JoeyHaymaker
Designer
MichaelLanning
February2025 2
Tableofcontents
Introduction 6
Promptengineering 7
LLMoutputconfiguration 8
Outputlength 8
Samplingcontrols 9
Temperature 9
Top-Kandtop-P 10
Puttingitalltogether 11
Promptingtechniques 13
Generalprompting/zeroshot 13
One-shotfew-shot 15
System,contextualandroleprompting 18
Systemprompting 19
Roleprompting 21
Contextualprompting 23
Step-backprompting 25
ChainofThought(CoT) 29
Self-consistency 32
TreeofThoughts(ToT) 36
ReAct(reasonact) 37
AutomaticPromptEngineering 40
Codeprompting 42
Promptsforwritingcode 42
Promptsforexplainingcode 44
Promptsfortranslatingcode 46
Promptsfordebuggingandreviewingcode 48
Whataboutmultimodalprompting? 54
BestPractices 54
Provideexamples 54
Designwithsimplicity 55
Bespecificabouttheoutput 56
UseInstructionsoverConstraints 56
Controlthemaxtokenlength 58
Usevariablesinprompts 58
Experimentwithinputformatsandwritingstyles 59
Forfew-shotpromptingwithclassificationtasks,mixuptheclasses 59
Adapttomodelupdates 60
Experimentwithoutputformats 60
JSONRepair 61
WorkingwithSchemas 62
Experimenttogetherwithotherpromptengineers 63
CoTBestpractices 64
Documentthevariouspromptattempts 64
Summary 66
Endnotes 68
PromptEngineering
Youdon’tneedtobeadatascientistoramachinelearningengineer–everyonecanwriteaprompt.
Introduction
Whenthinkingaboutalargelanguagemodelinputandoutput,atextprompt(sometimesaccompaniedbyothermodalitiessuchasimageprompts)istheinputthemodeluses
topredictaspecificoutput.Youdon’tneedtobeadatascientistoramachinelearningengineer–everyonecanwriteapromp
您可能关注的文档
- 阿丘科技:2024生成式AI如何改变AI缺陷检测的传统范式白皮书 .docx
- 艾瑞咨询:2024年中国家电行业基础云应用研究报告 .docx
- 艾瑞咨询:2024年中国威胁情报行业发展研究报告 .docx
- paloalto 2024年 云原生安全报告 .docx
- PitchBook-2025年一季度供应链技术风险投资趋势(英)-2025 .docx
- Signed-Prompt- A New Approach to Prevent Prompt Injection Attacks Against LLM-Integrated Applications信息安全资料 .docx
- SpyCloud:2024年度身份暴露报告 英文版 .docx
- STAR Enabled Solutions FAQ - 020123信息安全资料 .docx
- STAR Program Overview信息安全资料 .docx
- STAR Registry FAQ信息安全资料 .docx
- T∕CSAE 211-2021 智能网联汽车数据共享安全要求 .docx
- T∕SXQCTB 001-2023 汽车制造工业控制系统信息安全技术规范 .docx
最近下载
- 江苏自考南工大建筑施工技术经典计算题库.doc VIP
- 【笔记】龙飞丨25百大图形推理精讲精练笔记.pdf VIP
- 测试工程师-测试管理与工具-Zephyr_Zephyr网络通信协议栈解析.docx VIP
- 《新课程改革下农村中小学学生方式研究》结题报告(24页).doc VIP
- 斜拉桥施工组织设计.doc
- 2025年中国甲醇重整制氢装置市场调查研究报告.docx
- 12J003 室外工程(图集).docx
- 老年人能力评估师(高级)教学大纲和培训计划.docx VIP
- 高考英语总复习 第二部分 语法专题 第七讲 动词的时态和语态课件 .ppt VIP
- 市政排水管网优化设计思路分析.pptx VIP
原创力文档

文档评论(0)