第1集-引言-ChatGPT提示工程师|AI大神吴恩达教你写提示词
Summary
TLDR这门课程旨在教开发者如何利用ChatGPT进行提示工程。主讲者和OpenAI技术人员Iza Forfeit将介绍如何使用大型语言模型(LLM)API快速构建软件应用。课程将涵盖提示工程的最佳实践、常见使用案例(如总结、推理、转换、扩展)以及如何构建聊天机器人。强调了基础LLM和指令调整LLM的区别,并推荐使用后者来处理大多数实际应用。课程将帮助开发者了解和运用LLM API的潜力,并提供实用的提示技巧。
Takeaways
- 🎓 本课程由Iza和另一位讲师共同讲授,Iza是OpenAI的技术团队成员,曾构建流行的Chat GPT检索插件,并致力于教授人们如何将大型语言模型技术应用于产品中。
- 📘 网络上有很多关于如何提示(prompting)的文章,但很多都集中在Chat GPT的网页用户界面上,而作为开发者工具,通过API调用快速构建软件应用的能力被低估了。
- 🚀 课程将分享使用大型语言模型(LLM)的可能性和最佳实践,包括软件开发中的提示最佳实践、常见用例以及如何构建聊天机器人。
- 🔍 大型语言模型(LMS)主要分为两种类型:基础型(base LM)和指令调整型(instruction tuned LM)。基础型LMS根据文本训练数据预测下一个词,而指令调整型LMS被训练以遵循指令。
- 🏛 指令调整型LMS通过进一步的训练和人类反馈强化学习(RLHF)技术进行优化,以提高其帮助性、诚实性和无害性,相比基础型LMS,它们更不容易输出有问题的文本。
- 🛠️ 本课程将专注于指令调整型LMS的最佳实践,建议大多数应用使用这种类型的LMS,因为它们更易于使用,并且随着OpenAI和其他语言模型公司的工作,它们变得更加安全和一致。
- 👥 感谢OpenAI和deep learning.ai团队对课程材料的贡献,包括Andrew、Maine、Job、Palermo、Boris、Power、Ted、Centers、Lilian Wang以及Jeff、Ludwig、Ed、Issue和Tommy Nelson。
- 💡 使用指令调整型LMS时,要像给一个聪明但不了解任务细节的人下达指令一样。如果指令不够清晰,可能会导致LMS无法正确工作。
- 📝 明确指定你想要的文本内容、风格和预期的输出,可以帮助LMS更准确地生成你想要的结果。
- 🕒 下一视频中将展示如何清晰具体地提示LMS,这是提示LMS的一个重要原则,并且将介绍另一个原则:给LMS时间思考。
Q & A
这个课程是关于什么的?
-这个课程是关于如何使用大型语言模型(LLM)技术,特别是针对开发者的Chat GPT,来快速构建软件应用程序。
Iza Forfeit是谁,她在课程中扮演什么角色?
-Iza Forfeit是OpenAI的技术团队成员,她构建了流行的Chat GPT检索插件,并且大部分工作是教授人们如何在产品中使用大型语言模型技术。
为什么说使用API调用大型语言模型构建软件的能力被低估了?
-因为许多人还在使用Chat GPT的网页用户界面来执行特定和一次性的任务,而没有意识到作为开发者工具,通过API调用大型语言模型可以更快地构建软件应用。
课程中提到的AI基金是什么?
-AI基金是deep learning.ai的姐妹公司,它与许多初创公司合作,将大型语言模型技术应用于不同的应用场景。
大型语言模型(LLM)主要有两种类型,它们是什么?
-大型语言模型主要有两种类型:基础型LLM和指令调整型LLM。基础型LLM被训练来预测基于文本训练数据的下一个词,而指令调整型LLM被训练来遵循指令。
基础型LLM和指令调整型LLM有什么区别?
-基础型LLM主要基于大量互联网和其他来源的数据来预测下一个最可能的词,而指令调整型LLM则是在基础LLM的基础上,通过进一步的训练使其能够遵循指令,并通过人类反馈的强化学习来提高其帮助性和指令遵循能力。
为什么指令调整型LLM比基础型LLM更安全、更符合要求?
-指令调整型LLM经过特别训练,以变得乐于助人、诚实和无害,因此它们不太可能输出有问题的文本,如有毒输出,与基础型LLM相比。
课程中提到的最佳实践是什么?
-课程中提到的最佳实践包括为软件开发提供明确的提示,以及一些常见的用例,如总结、推断、转换和扩展,还有如何使用LLM构建聊天机器人。
为什么在使用指令调整型LLM时,需要给出清晰的指令?
-清晰的指令有助于LLM更准确地理解任务的具体要求,从而生成所需的输出。如果指令不够清晰,LLM可能无法生成预期的结果。
课程中提到的Rohf是什么?
-Rohf是Reinforcement Learning from Human Feedback的缩写,即人类反馈的强化学习,这是一种通过人类评估者提供的反馈来改进系统性能的技术。
课程中提到的OpenAI Cookbook是什么?
-OpenAI Cookbook是一个教程,它教授人们如何提示(prompting),即使用特定的指令或问题来引导大型语言模型生成所需的输出。
课程中提到的deep learning.ai是什么?
-deep learning.ai是一个提供深度学习教育的平台,它与OpenAI紧密合作,共同开发和提供教育材料和课程。
Outlines
📚 课程介绍与讲师团队
本段介绍了一门关于如何为开发者使用大型语言模型(LLM)的课程。讲师Iza和AI基金团队成员将教授如何使用大型语言模型来快速构建软件应用。提到了Iza在openai的工作经历,包括构建流行的chat GPT检索插件和贡献于open AI cookbook。课程内容将涵盖最佳实践、常见用例以及如何使用LLM构建聊天机器人。强调了大型语言模型作为开发者工具的潜力,以及如何通过API调用快速构建应用。
🗣️ 提示最佳实践与指令调整
在这一段中,讲师讨论了如何有效地使用大型语言模型(LLM)。强调了清晰和具体的指令对于获得期望结果的重要性。举例说明了如何针对Alan Turing的不同方面(如科学工作、个人生活或历史角色)给出具体指令。还提到了指定文本的语气和风格,以及如何提供背景资料以帮助模型更好地完成任务。接下来,视频将展示如何清晰具体地提示LLM,并介绍如何给予LLM思考时间的第二个提示原则。
Mindmap
Keywords
💡大型语言模型
💡指令调优LLM
💡API调用
💡最佳实践
💡总结
💡推断
💡转换
💡扩展
💡给LLM时间思考
💡强化学习
Highlights
欢迎来到这门关于为开发者设计的Chat GPT工程课程
Iza Forshayit是OpenAI的技术团队成员,她构建了流行的Chat GPT检索插件并教授人们如何使用大型语言模型技术
Iza Forshayit还为Open AI的食谱书做出了贡献,该食谱书教授人们如何提示
大型语言模型作为开发者工具的使用,通过API调用快速构建软件应用程序,这一能力被严重低估
AI基金团队与许多初创公司合作,将这些技术应用于不同的应用,看到语言模型API能快速帮助开发者构建软件非常令人兴奋
本课程将分享使用大型语言模型的可能性和最佳实践
首先学习软件开发的提示最佳实践,然后介绍常见用例:总结、推断、转换、扩展,并构建一个聊天机器人
大型语言模型(LMS)主要有两种类型:基础LMS和指令调整LMS
基础LMS被训练用于根据文本训练数据预测下一个词
指令调整LMS被训练以遵循指令,更有可能输出有用的答案
指令调整LMS通过人类反馈的强化学习进一步优化,以更好地提供帮助和遵循指令
指令调整LMS被训练为有用、诚实和无害,不太可能输出有问题的文本
本课程将专注于指令调整LMS的最佳实践,推荐用于大多数应用
感谢OpenAI和deep learning.ai团队对材料的贡献
使用指令调整LMS时,想象给另一个人下达指令,比如一个聪明但不了解你任务细节的人
如果OM工作不正常,有时是因为指令不够清晰
在下一个视频中,你将看到如何清晰具体地给出指令,这是提示OM的一个重要原则
你还将学习到提示OM的第二个原则:给DLM时间思考
Transcripts
welcome to this course on chat GPT prom
engineering for developers I'm thrilled
to have with me Iza forfeit to teach
this along with me she is a member of
the technical staff of openai and had
built the popular chat GPT retrieval
plugin and a large part of work has been
teaching people how to use om or large
language model of technology in products
she's also contributed to the open AI
cookbook that teaches people prompting
so thrilled to have you with you and I'm
thrilled to be here and share some
prompting best practices with you all
so there's been a lot of material on the
internet for prompting with articles
like 30 prompts everyone has to know
a lot of that has been focused on the
chat GPT web user interface which many
people are using to do specific and
often one-off tasks but I think the
power of om's large language models as a
developer tool that is using API calls
to OMS to quickly build software
applications I think that is still very
underappreciated in fact my team at AI
fund which is a sister company to deep
learning.ai has been working with many
startups on applying these Technologies
to many different applications and it's
been exciting to see what LM apis can
enable developers to very quickly build
so in this course we'll share with you
some of the possibilities for what you
can do as well as best practices for how
you can do them
there's a lot of material to cover first
you'll learn best certain prompting best
practices for software development then
we'll cover some common use cases
summarizing inferring transforming
expanding and then you'll build a chat
bot using an llm
we hope that this will spark your
imagination about new applications that
you can build
so in the development of large language
models or LMS they've been broadly two
types of LMS which I'm going to refer to
as base LMS and instruction tuned orms
so base om has been trained to predict
the next word based on text training
data often trained on large amounts of
data from the internet and other sources
to figure out what's the next most
likely word to follow
so for example if you were to prompt
this once upon a time there was a
unicorn it may complete this that is
they may predict the next several words
are that live the magical forest with
all unicorn friends
but if you were to prompt us with what
is the capital of France then based on
what articles on the internet might have
is quite possible that the base LM will
complete this with what is France's
largest city what is France's population
and so on because articles on the
internet could quite plausibly be list
of quiz questions about the country of
France
in contrast an instruction Tunes om
which is where a lot of the momentum of
LM research and practice has been going
an instruction team has been trained to
follow instructions so if you were to
ask it what is the capital of France is
much more likely to output something
like the capital Francis Paris
so the way that instruction tuned orms
are typically trained is you start off
with a base orm doesn't train on a huge
amount of Text data and further train it
for the fine tune it with inputs and
outputs that are instructions and good
attempts to follow those instructions
and then often further refine using a
technique called rohf reinforcement
learning from Human feedback to make the
system better able to be helpful and
follow instructions because instruction
tune OMS have been trained to be helpful
honest and harmless so for example
they're less likely to Output
problematic text such as toxic outputs
compared to base om
a lot of the Practical usage scenarios
have been shifting into all the
instructions you know arms some of the
best practices you find on the internet
may be more suited for a base om but for
most practical applications today we
would recommend most people instead
focus on instruction Tunes OMS which are
easier to use and also because of the
work of openai and other LM companies
becoming safer and more aligned
so this course will focus on best
practices for instruction tuner homes
which is what we recommend you use for
most of your applications
before moving on I just want to
acknowledge the team from openai and
deep learning.ai that contributed to the
materials that Iza and I will be
presenting I'm very grateful to Andrew
Maine job Palermo Boris power Ted
centers and Lilian Wang from open AI
that we're very involved with our
springstorming materials vetting the
materials to put together the curriculum
for this short course and I'm also
grateful on the Deep learning side for
the work of Jeff Ludwig Ed issue and
Tommy Nelson so when you use an
instruction tuned oom think of giving
instructions to another person say
someone that's smart but doesn't know
the specifics of your task so when an OM
doesn't work sometimes it's because the
instructions weren't clear enough for
example if you were to say please write
me something about Alan Turing well in
addition to that it can be helpful to be
clear about whether you want the text to
focus on his scientific work or his
personal life or his role in history or
something else and if you specify what
you want the tone of the text to be
should it take on the tone like a
professional journalist would write or
is it more of a casual note that you
dash off to a friend that holds the OM
generate what you want and of course if
you picture yourself asking say a fresh
college graduate to carry out this task
for you if you can even specify what
Snippets of text they should read in
advance to write this text about Alan
Turing then that even better sets up
fresh college track for success to carry
out the sauce for you
so in the next video you see examples of
how to be clear and specific which is an
important principle of prompting OMS and
you also learn from either a second
principle of prompting that is giving a
dlm time to think so that let's go on to
the next video
5.0 / 5 (0 votes)