更新日期:2023-10-2 : 最佳实践 (大白话编译解读版) OpenAI GPT 写在前面 这是我们策划的《提示词工程祛魅》主题大会的 附属产品。来自 OpenAI 的官方文档。 今年 6 月份,OpenAI 更新了这一篇题目为 《GPT 最佳实践/GPT Best Practice》的文档; 里面介绍了一些与 ChatGPT 交互的技巧,且附 有用例。 首先,这部分内容本来就是完全免费、完全公开 的。同时,它是用通俗的英语写成,并不是一份 晦涩难懂的技术文档。人人都可以通过掌握这些 简单的原则, “getting better results from GPTs”——让 GPT 为你输出想要的结果。 因为我们没有看到特别好的中文版本,所以我们 自己对它进行了重新编译,让语言风格尽量直 白,并补充了一些在中文互联网环境里更容易理 解的用例,形成了这份“大白话编译解读版本”的 OpenAI:GPT 最佳实践。 欢迎大家阅读和交流。希望我们编译这份材料的 目标能基本达到,即:为提示词工程「祛魅」 (中译中:有些付费课不必买)。 目录 第一部分 六大提示词策略概览 第二部分 技巧实战 感谢下列参与者 《提示词工程祛魅进阶》主题大会的 Speakers ——陈财猫 和 Rain。协助筹办活动的:谢国希谢 老师、以及 HackHouse 的各位童鞋。 OpenAI 推荐的相关资源列表 以下均在 OpenAI Cookbook 里: lib / 工具 Prompting libraries & tools 提示词工程指南 Prompting guides 视频课 Video courses 论文 Papers on advanced prompting to improve reasoning 另外,OpenAI Community 里也有很多宝贵的讨 论! 关于 @AI 加一切 各行各业的人们怎么利用生成式 AI 辅助自己的学 习和工作?这项技能在未来一定会成为职业教育 和义务教育的一个重要部分。 附录 OpenAI Playground 是什么,怎么用? 我们希望以「内容策展」的方式,通过邀请在自 己行业里有充分经验的 Speakers 做主题分享, 来完成这类信息的收集整理和传递。 第一部分 六大策略概览 六个能提高输出质量的核心提示词策略 Six strategies for getting better results This guide shares strategies and tactics for getting better results from GPTs. The methods described here can sometimes be deployed in combination for greater effect. We encourage experimentation to find the methods that work best for you. 这是一份指南。我们列出了一些策略和技巧,它们或许能帮你从 GPT 中拿到更好的输出结果。我们鼓励 你多试——通过自己反复实验,找出最合适的技巧。 Some of the examples demonstrated here currently work only with our most capable model, gpt-4. If you don't yet have access to gpt-4 consider joining the waitlist. In general, if you find that a GPT model fails at a task and a more capable model is available, it's often worth trying again with the more capable model. 有些用例只在目前地表最强模型 gpt-4 上生效。记住,模型是第一大影响要素。只要你有更强的模型可 用,我们一般都会建议你用更强的模型。 01 「知道自己要什么,就展开说 说」 01 - Write clear instructions Include details in your query to get more relevant answers GPTs can’t read your mind. If outputs are too long, ask for brief replies. If outputs are too simple, ask for expert-level writing. If you 1.1 延伸:“展开说说”的技巧 你越讲细节,输出就越好 dislike the format, demonstrate the format you’d like to see. The less GPTs have to guess at what you want, the more likely you’ll get it. 清晰地告诉 GPT,你想要什么。 GPT 不会读心术。 你不说,它就猜。所以有时不是能力不行,就 是你没说清,它没猜准。 嫌输出太长?那就直说,要短的。 嫌输出太简单?要求提高,说要专家级 的。 嫌格式不好?给它看个样。 你让它猜你的心思猜得越少,结果就越好。 02 「给 GPT 发阅读材料」 Provide reference text GPTs can confidently invent fake answers, especially when asked about esoteric topics or for citations and URLs. In the same way that a sheet of notes can help a student do better on a test, providing reference text to GPTs can help in answering with fewer fabrications. Ask the model to adopt a persona 搞角色扮演,一直很好用 1.2 Use delimiters to clearly indicate distinct parts of the input 1.3 使用分隔符号,明确地把话和话区分开来 Specify the steps required to complete a task 解题步骤,你自己最好也负责展开 1.4 Provide examples 1.5 多给举几个例子 Specify the desired length of the output 1.6 说一下你想要多长的答案 02 - Instruct the model to answer using a reference text 2.1 要求按阅读材料作答,不开放答 Instruct the model to answer with citations from a reference text 增加要求:要求 GPT 直接把阅读材料里 的原文引用出来 2.2 经常自编答案。 瞎编重灾区:比较冷门的问题、需要引用,需 要读取链接的问题。 我们都知道,最常见的考试题型,是给一大篇 阅读材料,要求阅读并回答问题。 纯开放式问答对于人和机器来说都比较难。 GPT 延伸:“发阅读材料”的技巧 那么同理,把你的“阅读材料”给 GPT 粘贴过 去,当它必须按照材料来回答的时候,它就不 03 「把复杂任务拆解成子任务」 Split complex tasks into simpler subtasks Just as it is good practice in software engineering to decompose a complex system into a set of modular components, the same is true of tasks submitted to GPTs. Complex tasks tend to have higher error rates than simpler tasks. Furthermore, complex tasks can often be re-defined as a workflow of simpler tasks in which the outputs of earlier tasks are used to construct the inputs to later tasks. 在软件开发和常规的项目管理里,大项目都得 拆解成子任务,再拆解出不同的步骤。 让 GPT 做任务也一样。直接搞一个大任务容 易翻车。 拆解开来,一个接一个做,反而容易些。 04 「允许 GPT 思考一下」 Give GPTs time to "think" If asked to multiply 17 by 28, you might not know it instantly, but can still work it out with time. Similarly, GPTs make more reasoning errors when trying to answer right away, rather than taking time to work out an answer. 03 - 延伸:“任务拆解”的技巧 Use intent classification to identify the most relevant instructions for a user query. 3.1 使用意图分类,来找到最切题的提示 For dialogue applications that require very long conversations, summarize or filter previous dialogue. 如果是一段很长的对话,可以经常对上文 做手动总结归纳。 (起提醒作用,防止把天儿聊跑了) 3.2 Summarize long documents piecewise and construct a full summary recursively. 遇到长文档, 主动分段总结,递归构造完 整摘要 3.3 04 - 延伸:“允许思考”的技巧 Inst

pdf文档 OpenAI:GPT 最佳实践(大白话编译解读版)-未来力场-2023.10.2-38页

双碳基础知识 > 碳达峰碳中和培训 > 碳达峰碳中和培训 > 文档预览
38 页 0 下载 62 浏览 0 评论 0 收藏 3.0分
温馨提示:当前文档最多只能预览 5 页,若文档总页数超出了 5 页,请下载原文档以浏览全部内容。
本文档由 2023-11-06 15:19:42上传分享
给文档打分
您好可以输入 255 个字符
中国约定的碳达峰是哪一年( 答案:2030 )
评论列表
  • 暂时还没有评论,期待您的金玉良言