输入“/”快速插入内容

通用模型提示词技巧

2月27日修改
提示词优化-通用原则和方法
一些有助于获得更好答案的通用提问技巧
1.1 角色详细设定
扮演」
告诉他假设你是一个“世界一流的”、“你是 XX 方面的专家”
1.2 输出关键结果
In bullet points」
Bullet point 有点类似“outline”的概念,通常是 PPT 中给出重点,或者步骤的格式。在商务写作中有效地使用要点可以帮助突出重要信息,引导读者进入主题清单,并提高文件的整体可读性。这些简单的提示提供了在商业写作中成功使用要点的指南。
Markdown 语法」
Always use Markdown with nice formatting to make it easier to follow.
(始终使用 Markdown 并采用良好的格式,以便更容易跟踪。)
1.3 提示词略长或者较为复杂时的原则
1、把重要任务和要求,一定要放在前面,并且在结尾强调。(论文数据支持,效果最佳)
2、用分隔符 ####或者其他符号分开,让大模型理解不同任务和信息
3、有序列表,让大模型理解顺序
4、设置总结和反馈确认环节,确保连续性
1.4 结构化和属性词,帮助机器理解和后续更新
一、使用markdown语法来结构化提示词
chatgpt是计算机语言,但是在大量的书本、文章和程序上训练出来的。
标识符-[]<> 等符号
层级: 是一级标题 是二级标题,一级标题覆盖全局,二级标题统摄相应的局部内容。
二、属性词
Role (角色),Expert(专家), Master(大师),Profile (简介)Rules(规则)LanguageDescription等等,属性词包含语义,是对模块下内容的总结和提示,用于标识语义结构。
1.5 六个方法提高复杂任务上的性能表现
1.
细节法:给出更清晰的指令,包含更多具体的细节
2.
分解法:将复杂的任务分解为更简单的子任务 (Let's think step by step, CoT,LangChain等思想)
3.
记忆法:构建指令使模型时刻记住任务,确保不偏离任务解决路径(system 级 prompt)
4.
解释法:让模型在回答之前进行解释,说明理由 (CoT 等方法)
5.
投票法:让模型给出多个结果,然后使用模型选择最佳结果 (ToT 等方法)
6.
示例法:提供一个或多个具体例子,提供输入输出示例 (one-shot, few-shot 等方法)
1.6 增加可读性的七种武器
视觉辅助、标题、重点、例子、格式、类比、语态
1.
Add visual aids: "Using mermaid.js you can include diagrams to illustrate complex concepts ."
添加视觉辅助工具:“使用mermaid.js,您可以添加图表来说明复杂概念。
2.
Use headings and subheadings: "Divide the document into sections with clear headings and subheadings."
使用标题和副标题:将文档分成具有清晰标题和副标题的部分。
3.
Highlight key points: "Emphasize important information using bold or italic text."
突出重点:“使用粗体或斜体文本强调重要信息。”
4.
Add real-life examples: "Include case studies or real-world examples to make concepts more relatable."
增加真实的例子:“包括案例研究或现实世界的例子,使概念更易理解。”
5.
Use clear and consistent formatting: "Use a consistent font, font size, and layout throughout the document."
使用清晰且一致的格式:“在整个文档中使用一致的字体、字号和布局。”
6.
Include analogies and comparisons: "Explain complex ideas using analogies or comparisons."
使用类比或比较来解释复杂的概念。
7.
Use active voice: "Write in active voice to make sentences more engaging and easier to follow."
使用主动语态:“使用主动语态使句子更有吸引力,更容易理解。”
1.7 更有情感、更具有创造力的九个示例
1.
Encourage creativity: "Rewrite the existing document to make it more imaginative, engaging, and unique."`
鼓励创造力:“重新撰写现有文件,使其更具想象力、吸引力和独特性。”
2.
Focus on storytelling: `"Transform the existing document into a compelling story that highlights the challenges faced and the solutions provided."
专注于讲故事:“将现有文档转化为一个引人入胜的故事,突出所面临的挑战和提供的解决方案。”
3.
Use persuasive language: `"Refine the existing document by incorporating persuasive language and techniques to make it more convincing and impactful."
使用有说服力的语言:“通过采用有说服力的语言和技巧来完善现有文件,使其更具说服力和影响力。”
4.
Emphasize emotion: `"Add emotional language and sensory details to the existing document to make it more relatable and engaging."
强调情感:“在现有文件中添加情感语言和感官细节,使其更具共鸣和吸引力。”
5.
Utilize sensory details: `"Refine the existing document by adding sensory details and descriptive language to bring it to life and engage the reader."
利用感官细节:通过添加感官细节和形容性语言来完善现有文档,使其栩栩如生并吸引读者。
6.
Make the content concise: `"Refine the existing document by removing unnecessary information and making it more concise and to-the-point."
简化内容:“通过删除不必要的信息,使现有文档更加简洁明了。”
7.
Highlight key points: `"Rewrite the existing document to emphasize the key points and make them more impactful."
突出重点:“重写现有文件,强调关键要点并使其更具影响力。”