Google人工智能提示工程(英)

Prompt EngineeringAuthor: Lee BoonstraPrompt EngineeringFebruary 20252AcknowledgementsContent contributorsMichael ShermanYuan CaoErick ArmbrustAnant NawalgariaAntonio GulliSimone CammelCurators and EditorsAntonio GulliAnant NawalgariaGrace Mollison Technical WriterJoey HaymakerDesignerMichael Lanning Introduction 6Prompt engineering 7LLM output configuration 8Output length 8Sampling controls 9Temperature 9Top-K and top-P 10Putting it all together 11Prompting techniques 13General prompting / zero shot 13One-shot & few-shot 15System, contextual and role prompting 18System prompting 19Role prompting 21Contextual prompting 23Table of contentsStep-back prompting 25Chain of Thought (CoT) 29Self-consistency 32Tree of Thoughts (ToT) 36ReAct (reason & act) 37Automatic Prompt Engineering 40Code prompting 42Prompts for writing code 42Prompts for explaining code 44Prompts for translating code 46Prompts for debugging and reviewing code 48What about multimodal prompting? 54Best Practices 54Provide examples 54Design with simplicity 55Be specific about the output 56Use Instructions over Constraints 56Control the max token length 58Use variables in prompts 58Experiment with input formats and writing styles 59For few-shot prompting with classification tasks, mix up the classes 59Adapt to model updates 60Experiment with output formats 60JSON Repair 61Working with Schemas 62Experiment together with other prompt engineers 63CoT Best practices 64Document the various prompt attempts 64Summary 66Endnotes 68Prompt EngineeringFebruary 20256IntroductionWhen thinking about a large language model input and output, a text prompt (sometimes accompanied by other modalities such as image prompts) is the input the model uses to predict a specific output. You don’t need to be a data scientist or a machine learning engineer – everyone can write a prompt. However, crafting the most effective prompt can be complicated. Many aspects of your prompt affect its efficacy: the model you use, the model’s training data, the model configurations, your word-choice, style and tone, structure, and context all matter. Therefore, prompt engineering is an iterative process. Inadequate prompts can lead to ambiguous, inaccurate responses, and can hinder the model’s ability to provide meaningful output.You don’t need to be a data scientist or a machine learning engineer – everyone can write a prompt.Prompt EngineeringFebruary 20257When you chat with the Gemini chatbot,1 you basically write prompts, however this whitepaper focuses on writing prompts for the Gemini model within Vertex AI or by using the API, because by prompting the model directly you will have access to the configuration such as temperature etc.This whitepaper discusses prompt engineering in detail. We will look into the various prompting techniques to help you getting started and share tips and best practices to become a prompting expert. We will also discuss some of the challenges you can face while crafting prompts.Prompt enginee

立即下载
信息科技
2025-04-21
68页
6.96M
收藏
分享

Google人工智能提示工程(英),点击即可下载。报告格式为PDF,大小6.96M,页数68页,欢迎下载。

本报告共68页,只提供前10页预览,清晰完整版报告请下载后查看,喜欢就下载吧!
立即下载
本报告共68页,只提供前10页预览,清晰完整版报告请下载后查看,喜欢就下载吧!
立即下载
水滴研报所有报告均是客户上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作商用。
相关图表
产品模式下D&A与软件工程团队的敏捷协同趋势
信息科技
2025-04-21
来源:领导力协同:软件领导者与D-A领导者如何共同推动AI创新
查看原文
AI项目主体(交付)责任分布
信息科技
2025-04-21
来源:领导力协同:软件领导者与D-A领导者如何共同推动AI创新
查看原文
软件工程和D&A领导者的职责框架
信息科技
2025-04-21
来源:领导力协同:软件领导者与D-A领导者如何共同推动AI创新
查看原文
软件工程与D&A领导者的战略协同
信息科技
2025-04-21
来源:领导力协同:软件领导者与D-A领导者如何共同推动AI创新
查看原文
中国 AI Agent 市场规模及预测
信息科技
2025-04-21
来源:计算机行业“人工智能”系列专题:AutoGLM沉思,DeepResearch+Operator,开启智能体新阶段
查看原文
实现制造业 Agent 的关键组件
信息科技
2025-04-21
来源:计算机行业“人工智能”系列专题:AutoGLM沉思,DeepResearch+Operator,开启智能体新阶段
查看原文
回顶部
报告群
公众号
小程序
在线客服
收起