一招让你的ChatGPT变聪明|context window原理讲解

单口视频
22 Apr 202431:58

Summary

TLDR本次课程由Yen主讲,主题为“AI助力的生产力:从用户到建设者”。课程以Zoom会议形式进行,前20至25分钟为讲座,随后是问答环节。Yen指出,尽管AI是热门话题,但用户在使用Chat GPT时可能会发现其表现不尽如人意。这主要是因为用户对Chat GPT的使用方式存在误区。课程核心是介绍一个关键概念——上下文窗口(context window),它决定了AI的智能表现和使用效果。上下文窗口是AI生成回复时所“看到”的信息,但受限于其有限的容量。通过有效管理上下文窗口,可以显著提升AI的响应质量和智能表现。Yen还介绍了一个简单但有效的技巧:通过编辑当前提示(prompt),而非仅仅追加聊天内容,来重新构造上下文窗口。此外,课程还讨论了如何通过训练和最佳实践来优化AI的使用,提高生产力。最后,Yen回答了关于课程内容、目标受众和课程实用性的问题,并提到了Google提出的无限窗口模型(infinite window model),这可能在未来减少手动管理上下文窗口的负担。

Takeaways

  • 📈 **AI 应用技巧**:了解如何更有效地使用 AI,比如通过管理上下文窗口来提升 AI 的表现。
  • 🔍 **上下文窗口**:上下文窗口是 AI 生成响应时所看到的内容,它决定了 AI 能够记住的信息量。
  • 🚫 **有限的容量**:AI 的上下文窗口有容量限制,这会导致它忘记早期的对话或要求,从而影响其性能。
  • 💡 **编辑提示**:通过编辑当前的提示并保存,可以有效地管理上下文窗口,而不是简单地追加新的对话。
  • 🔄 **迭代改进**:当 AI 的回答不尽如人意时,可以通过重新组织提示来迭代改进,而不是通过增加更多的对话。
  • 🧠 **AI 作为实习生**:将 AI 视作需要指导的实习生,通过精确的提示来引导它完成复杂的任务。
  • 📚 **持续学习**:随着 AI 技术的快速发展,持续学习最新的研究和最佳实践对于有效使用 AI 至关重要。
  • 🔧 **工具使用**:了解不同工具如 Sandbox 和 Chat Interface 的差异,以及它们如何影响与 AI 的交互。
  • 📈 **效率提升**:通过结构化的提示和上下文窗口管理,可以显著提升个人的工作效率。
  • 📝 **重用性**:编写的提示不仅用于解释期望的结果,还用于纠正 AI 的非预期行为,这增加了提示的重用性。
  • ❓ **问题解决**:在 AI 显得懒惰或健忘时,通过训练和理解其工作原理,可以找到解决问题的有效方法。

Q & A

  • AI为什么有时会表现得懒惰和健忘?

    -AI表现得懒惰和健忘主要是因为它的设计方式。AI如Chat GPT是设计来支持和鼓励对话的,这种形式的产品自然会导致某些使用情况,使得AI忘记事情、失去细节跟踪,并显得笨拙和懒惰。

  • 什么是上下文窗口,它如何影响AI的响应?

    -上下文窗口是AI在生成响应时所看到的内容。它是有限大小的,只能处理一定数量的输入。当AI生成回答时,它会将历史对话和最新问题作为上下文窗口的一部分,如果上下文窗口填满,AI可能会忽略旧的请求,导致它忘记之前的要求。

  • 如何有效地管理上下文窗口以提高AI的效率?

    -可以通过有意地编辑和组织上下文窗口来提高AI的效率。例如,将所有要求汇总在一个段落中,而不是分散在多个对话中。此外,使用编辑功能而不是简单地追加对话,可以帮助AI更精确地理解和响应。

  • 为什么说对AI的训练很重要?

    -对AI的训练很重要,因为它可以纠正我们对AI使用的第一反应,教导我们最佳实践,并帮助我们形成习惯,直到这些做法成为肌肉记忆。通过训练,我们可以更好地理解AI的工作原理,从而更有效地使用它。

  • 课程的目标受众是谁?

    -课程的目标受众是IT行业的专业人士,他们需要具备一些基本的Python知识,例如运行Python程序、阅读简单的Python程序和安装Python库。

  • 参加这个课程我们最终能获得什么?

    -参加这个课程,我们可以理解AI的基础原理,学习最佳实践,这将极大地提高我们的生产力。个人经验表明,这可以提高两到五倍的生产力。

  • Sandbox和Chat GPT界面有什么区别?

    -Sandbox是OpenAI提供的工具,它直接调用底层GPT API,与Chat GPT界面相比,它没有额外的提示和限制。Sandbox允许使用更长的上下文窗口,并且需要手动管理上下文窗口和聊天历史。

  • 课程是否有一个议程或者大纲?

    -是的,课程有一个详细的议程或者大纲,包括课程的日期、课程大纲、预期成果、目标受众等信息,可以通过扫描提供的二维码来获取更多课程信息。

  • 如果我想学习更基础的关于AI的知识,你有什么建议?

    -如果你想要学习更基础的知识,我建议直接注册并使用Chat GPT或其他类似的产品。通过实践使用,你可以感受到AI的能力,并提出自己的问题,这将帮助你更好地理解你想要从AI课程中获得什么。

  • 课程内容是否会随着AI模型的迭代而变得过时?

    -课程内容分为两部分:一部分是基础研究,这些通常长时间内不会改变;另一部分是基于这些研究得出的技巧和技能,这些可能会随着AI模型的发展而更新。课程会尽量跟上领域的发展,确保内容的时效性。

  • Google最近是否提出了解决上下文窗口问题的新模型?

    -是的,Google最近提出了一个新的模型,称为无限窗口模型,但据我所知,它仍处于研究阶段。一旦它投入生产使用,希望我们能减少手动管理上下文窗口的负担。

  • 你个人对Cloud V3有什么体验?

    -我个人使用过Cloud V3,发现与GPT相比,管理上下文窗口的难度要小得多。Cloud V3在处理许多提示和上下文窗口时可能不需要那么多的技巧,这表明人们已经意识到上下文窗口的问题,并试图使其更加用户友好。

Outlines

00:00

😀 课程介绍与AI使用误区

Yen老师欢迎大家参加关于AI增强生产力的课程。课程将通过半小时的Zoom会议进行,前20至25分钟为讲座,剩余时间用于问答。在讲座期间,鼓励学生在Zoom聊天窗口提问,并使用表情反应来为他人的问题投票。课程结束后,会通过邮件发送视频和音频的下载链接。AI是当下热门话题,但使用中常出现忘记事情、懒惰等问题,这可能是因为我们使用方式不当或AI设计上的缺陷。本节课将介绍核心概念,帮助理解AI的意外行为,并提供简单技巧来提高AI的智能性和任务处理能力。

05:02

🔍 理解上下文窗口的重要性

上下文窗口是GPT生成回应时所看到的内容。在对话中,上下文窗口会随着对话的进行而变化,包括聊天记录和最新问题。常见的误解是认为AI有记忆功能,实际上AI通过上下文窗口来模拟记忆。上下文窗口的有限性导致了信息丢失和AI表现不佳的问题。例如,在编写Python程序时,如果上下文窗口已满,AI可能会忽略先前的要求。因此,管理上下文窗口对于有效使用AI至关重要。

10:02

🚀 通过训练改善AI的使用

通过学习驾驶的比喻,强调了训练对于掌握技术内部工作原理和最佳实践的重要性。在AI的使用上,我们需要通过训练来纠正第一反应,采用良好实践。管理上下文窗口是解决方案之一,我们应该主动思考上下文窗口应如何配置以使AI更好地工作。通过有意识地编辑上下文窗口,而不是盲目接受AI的设计,可以显著提高AI的效率和智能性。

15:03

📝 上下文窗口管理的实际应用

介绍了如何通过编辑当前提示来管理上下文窗口,而不是简单地追加对话。通过将所有要求整理在一段中,可以创建更有效的提示或上下文窗口。这种方法可以使AI更精确地理解任务要求,从而更有效地解决问题。编辑风格与聊天风格相比,可以更有效地利用上下文窗口,并且通过编辑功能,我们仍然保持了易用性。此外,编辑风格还提高了提示的可重用性,有助于纠正AI的非预期行为。

20:03

🎓 课程目标与最佳实践

课程的目标是帮助IT行业的专业人士提高生产力,但需要具备一定的Python基础知识。课程内容将涵盖AI的基础和最佳实践,如上下文窗口管理。通过训练,学员将理解AI的工作原理,并学会如何有效地使用AI。课程结束后,学员可以期待生产力的显著提升。同时,讨论了Sandbox与Chat界面的不同,包括安全性、上下文窗口的管理方式和成本等方面。

25:05

📈 课程结构与未来发展

课程将提供详细的日程安排,并通过QR码可以访问课程主页以获取更多信息。课程内容将包括如何通过编辑和提问来改进提示的结构。讨论了AI的发展趋势,包括上下文窗口和无限窗口模型。课程内容将分为两部分:基础研究和基于研究的技巧与技能。虽然AI领域发展迅速,但基础原理预计在长时间内保持稳定。课程将不断更新,以保持信息的时效性。

30:08

🤖 AI模型的比较与课程总结

Yen老师分享了对Cloud V3和GPT-4的体验,认为Cloud V3在管理上下文窗口方面更为用户友好,而GPT-4则相对更智能。由于时间限制,Yen老师选择了最后一个问题进行回答,并感谢大家的参与,表达了对未来课程的期待。

Mindmap

Keywords

💡AI

AI,即人工智能,是指由人制造出来的系统所模拟的智能行为。在视频中,AI是核心主题,讨论了AI在提高工作效率方面的潜力以及如何更有效地使用AI工具。

💡Chat GPT

Chat GPT是一种基于GPT(生成预训练转换器)的聊天机器人模型,设计用于支持和鼓励对话。视频中提到Chat GPT在设计上的局限性,如容易忘记事情、显得懒惰,这通常与它的“上下文窗口”管理有关。

💡上下文窗口(Context Window)

上下文窗口是GPT模型中用于生成响应时所“看到”的信息。它决定了AI在生成回答时所考虑的对话历史和最新问题。视频中解释了上下文窗口的有限性如何导致AI忘记先前的要求或显得不够智能。

💡Token

在AI语言模型中,Token是文本的基本单位,可以是一个词或一个字符。GPT模型对输入和输出的Token数量有限制,这影响了上下文窗口的大小。视频中提到GPT 3.5的上下文窗口限制为4K Tokens,而GPT 4的上下文窗口限制为8K Tokens。

💡Prompt Engineering

Prompt Engineering是指有意地设计和构造输入提示,以引导AI产生期望的输出。视频中强调了通过精确和简洁的提示来管理上下文窗口,从而提高AI的效率和智能。

💡迭代(Iteration)

迭代是指在AI对话中,用户根据AI的响应进一步提出问题或要求,以细化或纠正AI的输出。视频中提到,过多的迭代可能会导致上下文窗口混乱,从而影响AI的表现。

💡训练(Training)

在视频中,训练指的是学习如何更有效地使用AI工具的过程。通过训练,用户可以理解AI的工作原理,掌握最佳实践,并形成习惯,从而提高使用AI的效率。

💡Python

Python是一种广泛使用的高级编程语言,以其清晰的语法和代码可读性而闻名。视频中提到,了解Python的基础知识是本课程的目标受众的要求之一,因为Python在IT行业中被广泛用于自动化和编程任务。

💡API

API,即应用程序编程接口,是软件系统中不同部分之间进行交互的一套规则和协议。视频中提到了使用Sandbox工具直接调用GPT API,与使用基于GPT API构建的Chat GPT产品有所不同。

💡Sandbox

Sandbox是由OpenAI提供的工具,它允许开发者直接调用GPT的API,而不是通过Chat GPT的聊天界面。视频中讨论了Sandbox与Chat GPT在上下文窗口管理、安全性、价格等方面的差异。

💡产品限制(Product Limitations)

产品限制指的是产品在设计和功能上的局限。视频中讨论了Chat GPT在设计上的缺陷,如处理长对话或复杂任务时的局限性,以及如何通过上下文窗口管理和Prompt Engineering来克服这些限制。

Highlights

Yen介绍了AI作为新的热门话题,但指出了当前AI的局限性,比如容易忘记事情和显得懒惰。

提出了AI设计上的缺陷,导致其在对话中容易忽略细节和忘记事情。

课程将介绍一个核心概念,帮助理解AI的意外和不良行为,并提供简单的技巧来改善。

强调了不能再将AI视为一个黑箱,而是需要系统地理解和使用它。

解释了AI的基础模型和如何通过适当的提示和对上下文窗口的理解来有效使用AI。

上下文窗口(context window)的概念,即AI在生成响应时所看到的信息。

讨论了上下文窗口的有限性,以及它如何影响AI的性能和记忆。

提出了管理上下文窗口的技巧,以提高AI的响应质量和智能表现。

通过实际例子展示了如何通过编辑当前提示来改善AI的回答。

强调了训练的重要性,以纠正我们对AI的第一反应,并学习更好的实践方法。

提到了Google提出的无限窗口模型,这可能在未来减少手动管理上下文窗口的负担。

课程的目标受众是IT行业的专业人士,需要具备一些基本的Python知识。

课程旨在提高AI辅助编程的效率,并通过最佳实践提升生产力。

对比了沙盒(Sandbox)和聊天界面(Chat Interface)在使用GPT API时的不同。

讨论了如何通过结构化提示来提高AI的智能性和效率。

建议初学者首先通过使用Chat.com或其他类似产品来感受AI的能力。

提到了课程内容可能会随着模型的迭代而更新,但基础原理将保持不变。

Yen分享了对Google Cloud的新模型的体验,认为它在管理上下文窗口方面更为友好。

Transcripts

play00:15

all right it's four o'clock now let's

play00:17

get started hi everyone this is Yen

play00:21

welcome to the lining lesson for the

play00:22

course from users to builders AI powered

play00:25

productivity for T

play00:27

RS first several Logistics here this is

play00:31

a half an hour Zoom meeting we will

play00:33

spend like 20 to 25 minutes on the

play00:35

lecture and then use the remaining for

play00:38

the

play00:41

Q&A um during the lecture feel free to

play00:44

put your questions in the zoom chat

play00:46

window and then use the emoji react

play00:49

reactions to vote for others questions

play00:51

we will answer the most popular

play00:53

questions in the end the meeting is

play00:55

recorded and you will receive an email

play00:57

from Maven about where to download the

play00:59

recorded video and

play01:01

audio now let's jump right into the

play01:05

topic AI is the new buzz word everyone

play01:08

is talking about it and big companies

play01:10

are pouring money in it but if you

play01:13

really use chbt you may find actually

play01:16

quite often that chpt is dumb it's lazy

play01:20

it forgets about things it didn't do

play01:22

what I asked you to do so we become

play01:25

upset sometimes painful and curious why

play01:28

is others char so smart and so

play01:32

powerful well you're at the right place

play01:35

this is because we used it wrong and

play01:37

it's not our fault to some extent chat

play01:40

gbt is flawed in design this product is

play01:44

designed to support and encourage

play01:46

conversations or chats it makes sense

play01:49

because that's the most intuitive way of

play01:51

interaction however this form of product

play01:55

would naturally lead to certain usage

play01:57

that makes gen forget about things lose

play01:59

track of details and appear dumb and

play02:01

lazy in this lesson you will learn about

play02:04

a core concept from relevant research

play02:07

that can explain this all it will help

play02:09

you make sense of the unexpected and

play02:12

undesired behaviors and naturally leads

play02:14

to a counterintuitive but simple trick

play02:17

if you use it you will find the AI to be

play02:19

smarter and help you better on most

play02:22

tasks

play02:24

immediately but in order to do that we

play02:26

we can't treat chbt as a blackbox

play02:28

anymore we don't come up with a random

play02:31

explanation or try out different tricks

play02:33

and wishing it to work in this lesson we

play02:36

will tackle the lazy and forgetful

play02:38

problems of AI systematically beginning

play02:41

with understanding what is inside

play02:44

trbt not trbd is still developing very

play02:47

fast we hope what you learned today will

play02:50

still be relevant in a few years so we

play02:53

need to go to the

play02:54

research the most relevant research of

play02:57

chbt began about six years ago it began

play03:00

with a foundation model and then

play03:02

alignment was added to make it something

play03:04

similar to today's CH gbt in order to

play03:07

effectively use this tool we also need

play03:10

to add proper prompting and a solid

play03:12

understanding of context Windows this

play03:15

four are most practical and fundamental

play03:17

components of using

play03:20

chbt understanding each component will

play03:23

help us um will make our AI smarter and

play03:26

our work more effective in the full

play03:29

course we we will go over each of them

play03:32

but today we only have about 30 minutes

play03:35

so we'll still try to do it but focus on

play03:37

one thing the contact window because it

play03:40

can help with all of your prompts it's

play03:42

often overlooked but it's Central to

play03:45

explain and correct a lot of the

play03:47

problems of

play03:50

jni after understanding the concept we

play03:52

will then introduce a simple but very

play03:54

effective trick to effectively manage

play03:56

the context window you may be familiar

play03:59

with the G on the left which is often

play04:01

the case for people not managing their

play04:03

contact window it gave short answers not

play04:06

willing to help but with the same model

play04:09

and even the same prompt after we use

play04:12

this simple trick the gbt immediately

play04:14

becomes more willing to help and even

play04:17

smarter this is the power of contact

play04:19

window management and let's begin the

play04:21

journey by first understanding what is a

play04:24

contact

play04:25

window contact window is a concept

play04:28

introduced very early in original GPT

play04:30

paper it has its meaning derived from

play04:33

the original along with time even in

play04:35

open eyes on documents but in this

play04:38

course a contact window is simply what

play04:40

trpd sees when it generates

play04:43

responses what does that mean let's take

play04:46

a look at basic

play04:48

example the simplest way to use trbd is

play04:52

you ask it a question and gives you an

play04:54

answer in this example it ask it I have

play04:58

many large files to copy from one

play04:59

computer to another computer what should

play05:01

I do this sentence is my question and is

play05:06

also what chpd sees when generating the

play05:08

response therefore in this example this

play05:11

sentence is the context window again

play05:15

this is a probably 90% but not 100% the

play05:17

same as original definition in the paper

play05:19

but in the context of this course a

play05:21

context window is what chbd sees when it

play05:24

generates

play05:27

responses we just saw a simply the case

play05:30

of we ask a chpd one question things

play05:33

begin to get more interesting when chpd

play05:35

generates a response and we ask a

play05:37

followup question I cannot upload the

play05:40

file to the cloud storage what are my

play05:42

options in this case the the context

play05:46

window will change to the re red

play05:49

rectangle it would include the chat

play05:52

history and latest the

play05:54

question this might be a little bit

play05:56

counterintuitive for some people so

play05:58

let's stop here and make a clarification

play06:00

on a common

play06:02

misconception trbt is a good product it

play06:06

gives people an impression that we're

play06:08

talking with a human so it's natural for

play06:11

us to imagine oh chbd has a memory

play06:13

storing its understanding of the world

play06:15

storing our chat history our requests

play06:18

and so on and then it reads my question

play06:22

and tries to answer it by recalling from

play06:23

the memory and reasoning based on

play06:26

information in this case the context we

play06:29

though would be the latest only the

play06:31

latest question not including the

play06:33

previous

play06:34

conversation however this is a natural

play06:37

and common

play06:38

misconception open AI here uses a clever

play06:41

trick to make chb appear to have memory

play06:45

under the hood what happened is open AI

play06:48

includes the chat history as part of the

play06:51

context window and ask gbt to answer the

play06:54

question based on all the information

play06:56

including the historical conversations

play06:58

and the latest question in other words

play07:01

chat gbt implements memory by appending

play07:04

chat history to the context window when

play07:07

we ask CH gbt a new question what

play07:10

happens is the answer from the last

play07:12

round and the latest question was added

play07:15

to the contact window nothing else no

play07:17

memory no database no state so in the

play07:21

example above the contact window would

play07:23

be my first question tr's first response

play07:27

and my second question

play07:30

this is a very important clarification

play07:32

actually it immediately causes two

play07:35

problems the first problem is that the

play07:38

contact window is finite chat gbt or any

play07:42

gen so far can only process a limited

play07:44

number of

play07:45

input GPT 3.5 had a limit of 4K tokens

play07:50

which is about 3,000 words and gradually

play07:52

expanded to 16k gbd4 had a limit of 8K

play07:56

tokens and gradually expanded to 120 8K

play08:00

but still kept a limit of output window

play08:03

of 4K tokens these contact Windows

play08:06

appear large but for certain tasks they

play08:09

can be quickly consumed and causing

play08:12

issues for example here the user asks

play08:15

chbt to write a Python program with an

play08:17

actal requirement that for some reason

play08:20

don't use the library of npy the AI then

play08:23

outputs a Python program which can

play08:25

easily cost hundreds sometimes a

play08:27

thousand words of tokens

play08:30

then the user did a few rounds of

play08:32

iterations to ask the AI to add the

play08:34

feature of A and B up to this point the

play08:38

contact window may still hold entire

play08:40

chat history showing the red rectangle

play08:43

but assume that it's close to the upper

play08:45

limit of the context window in this

play08:47

situation then the user asks can you

play08:50

also do c in the program then in order

play08:53

to still fit the contact window and

play08:55

focus on the latest and potentially the

play08:57

most important requests try to be PD

play08:59

drops the first conversation and moves

play09:02

the contact window down to only keep the

play09:04

latest

play09:05

conversations and this causes a problem

play09:08

the request of I cannot use npy is now

play09:11

not in the context window anymore and

play09:13

chbd has no knowledge on that anymore so

play09:16

it's totally possible that in the latest

play09:19

response it may begin using numpy and

play09:22

from the users perspective trag fails to

play09:25

satisfy our requirements it forgets

play09:27

about things it's not as smart as the of

play09:29

the conversation this is all caused by

play09:32

the fact that the contact window is

play09:34

limited and it cannot accommodate

play09:36

infinite

play09:38

chat the finite size of the problem of

play09:42

the context window is easy to recognize

play09:45

and mitigate when the conversation is

play09:47

long and AI appears less smart we can

play09:50

consider restarting a

play09:51

conversation but a lot of times even

play09:55

when the conversation is short we still

play09:58

feel the AI is lazy and dumb and that's

play10:01

because of another more subtle but

play10:03

impactful limit gbt has difficulties

play10:08

processing long or or unorganized

play10:11

content for this long or unorganized

play10:14

cont contacts Windows gbt may miss

play10:17

certain requirements especially those

play10:19

need attention to the details in the

play10:22

previous example even if the entire

play10:24

conversation can fit into the context

play10:26

window it is still not uncommon that you

play10:29

gbt may give a a codee doing a and c and

play10:32

forget about B one way to understand

play10:35

that is we can treat gbt as an intern

play10:38

that have limited intelligence when it

play10:41

spends the bring power on somewhere it

play10:44

has to spend less power somewhere

play10:46

else and in this example because the

play10:50

requirements are scattered everywhere

play10:52

Sean as the green texts gbt needs to

play10:55

spend actual Intelligence on recognizing

play10:58

what are the actual requirements from

play11:00

this long and Massy taxt and that

play11:03

distract it so it couldn't spend as much

play11:06

Intelligence on the actual problem

play11:08

solving and this is just the one side of

play11:11

the story another potentially even worse

play11:14

side is the majority of the contact

play11:16

window is actually bad answers we were

play11:19

not satisfied with gpt's previous

play11:21

answers and that's why we further

play11:22

iterate to add new requests so from the

play11:25

perspective I probably answer latest

play11:27

question all the previous answers are

play11:30

useless or even wrong to some

play11:32

extent this again distracts GPT it needs

play11:37

to figure out oh this taxs are actually

play11:39

wrong where are the problems and how to

play11:41

fix them as humans we all know that this

play11:44

is sometimes even harder than getting

play11:46

something from scratch so overall it is

play11:49

this scattered around the green prompts

play11:51

and the long distracting red promps that

play11:54

degrades gbt's

play11:57

Intelligence on unfortunately this is

play12:00

even not the end of the story when we

play12:03

see AI BEC dumb and lazy what is our

play12:05

first reaction we chat more give it more

play12:09

requests and hope this could correct the

play12:11

problem but now you understand the

play12:13

context window and its limits you can

play12:15

see how this is not only not helping but

play12:18

actually make things

play12:19

worse because now we have even longer

play12:22

chat histor to put in the context window

play12:24

which means it's more likely to get cut

play12:26

off and more distracting the

play12:29

requirements are further scattered

play12:31

around and the bad previous responses

play12:33

are even longer that makes everything

play12:36

worse so it's not self correctable in

play12:39

the case of AI becomes dumb or forgetful

play12:42

following our first reaction of chatting

play12:44

more will make it even

play12:46

worse I'll pause here to review what

play12:49

just happened we now learn from L

play12:52

research that the contact window is a

play12:54

core concept deciding how smart CH GPT

play12:57

may appear and how effective we could

play12:59

use it based on this concept what

play13:02

previously appears frustrating upset and

play13:05

even weird behaviors now suddenly begin

play13:07

to make sense when we chat with chat gbt

play13:11

is nothing more than appending our chat

play13:13

history to its contacts window and more

play13:16

chat ends up with a Messier contact

play13:18

window which will result in a dumb or

play13:20

forgetful or lazy AI our first reaction

play13:24

is to chat more to correct it but it

play13:26

simply doesn't work it's not really our

play13:28

fault

play13:29

is mostly rooted from how chbt is

play13:32

designed it's designed to encourage us

play13:34

to chat and that inevitably leads to

play13:37

this

play13:38

situation but does that mean that we

play13:41

have to live with it not necessarily

play13:44

before touching the actual solution

play13:46

let's detour a little bit to learning to

play13:48

drive for a moment when we learn about

play13:50

driving in many cases our first reaction

play13:53

is actually wrong for example when the

play13:56

tire blows humans first reaction is to

play13:58

hit the brake

play13:59

but it's wrong the best practice is

play14:01

actually to live it alone and gradually

play14:04

decelerate the question is how can we

play14:06

know what is the best practice and how

play14:09

can we really do that in real

play14:11

life the answer is simple through

play14:14

training training tells you how a

play14:17

technology Works internally tells you

play14:19

what's the best to practice and why and

play14:22

helps you practice until make it a habit

play14:25

until you remember it in your muscle

play14:26

memory and it also applies to chbt to

play14:30

properly use chbt we need training too

play14:33

we need training to correct our firstly

play14:35

reaction and use good practice to

play14:37

replace

play14:38

it and for our specific problem the

play14:41

solution based on our previous

play14:43

understanding is we need to manage our

play14:46

contact window

play14:47

intentionally instead of blindly

play14:49

accepting trb suboptimal design we

play14:52

should proactively think about what our

play14:54

contact window should look like is it in

play14:58

the best shape for G to work well if we

play15:00

follow this mindset it will be easy to

play15:03

come up with a much more effective

play15:04

prompt or context window for example

play15:07

simply put all of the requirements in

play15:10

one paragraph with nothing else write a

play15:13

Python program to do a b and c I can I

play15:17

cannot use

play15:18

npy but how do we do that does that mean

play15:21

that we need to start a new conversation

play15:22

every time when I need to chat that's

play15:25

not stupid fortunately we have a hidden

play15:27

feature in the chat gbd UI helps us to

play15:30

do this contact window

play15:32

management and that is this small pencil

play15:35

button below our question it means edit

play15:39

we can click here to edit the current

play15:41

prompt and there will be a button say

play15:42

save and submit clicking it will change

play15:45

this prompt in the context window rather

play15:47

than append it to the context window

play15:50

let's take a look at example here a side

play15:53

note is we are using gbd 3.5 here

play15:55

because it has a smaller contact window

play15:57

and it's easier to trigger those

play15:59

behaviors gbd4 has the same issue and

play16:02

benefits from the same trick it's just

play16:04

not that friendly for this 30 minute

play16:06

long lining

play16:08

course come back to our example it's

play16:11

following the previous example of

play16:12

copying files from a computer to another

play16:15

here we further ask chbt oh I cannot

play16:18

upload the files to the cloud storage

play16:20

what are my options chbt gives a very

play16:23

short answer without any detailed

play16:26

instructions but if we use the addit

play16:29

trick not how we change the prompt here

play16:32

we simply copy paste the second prompt

play16:34

after the first prompt making it a

play16:37

complete request oh I want to copy files

play16:40

from computer to another and I cannot

play16:42

upload the files to the cloud then

play16:44

suddenly Char becomes more diligent and

play16:47

intelligent it gives details and

play16:49

specific and organized answers this is

play16:52

very different behavior from before and

play16:55

note here we still use the same model

play16:57

even the prompt is the same

play16:59

what was changed is the content of

play17:01

contact window we intentionally make it

play17:04

precise and brief and this is the core

play17:07

of context window

play17:09

management we can continue the

play17:11

conversation back to the chat style if

play17:14

we further ask chbt following the

play17:16

previous conversations I'm copying files

play17:19

from a Mac to a PC what shall I do then

play17:22

chbt gives a bunch of solutions the

play17:25

third of them is clock storage and

play17:27

actually we literally just said I cannot

play17:29

upload files to the cloud in the

play17:31

immediate previous round stupid right

play17:34

how to fix it you tell me contact window

play17:38

management instead of relying on chbt to

play17:41

append everything and construct its own

play17:43

contact window we constructed by

play17:45

ourselves simply append I'm copying the

play17:47

files from a Mac to a PC to our previous

play17:50

prompt and that's it gbd suddenly become

play17:53

smart just like a different Ai No cloud

play17:56

storage anymore

play17:59

so let's reflect on this example why did

play18:01

it work what is the internal mechanism

play18:04

so that I can use it somewhere

play18:05

else in the chat style we have the asks

play18:09

or requirements scattered everywhere and

play18:11

GPT needs to spend its intelligence on

play18:14

recognizing and understanding the

play18:16

requirements but in the added style the

play18:19

context is well organized with claim

play18:21

statements on what needs to be done so

play18:23

GPT could save the intelligence to

play18:25

really focus on solving the problem in

play18:28

the chat style Cha's imperfect or

play18:31

incorrect answer becomes a major part of

play18:33

the prompt and that's both a waste and

play18:36

sometimes a distraction of the context

play18:38

window on the contrary this is not

play18:41

included in the edit style and we have

play18:43

efficient use of the context window

play18:46

meanwhile thanks to the editing feature

play18:48

we still keep the same ease of

play18:51

use actually there's the bonus benefit

play18:53

of the editing style that is the

play18:56

reusability when we write prompt to help

play18:58

chbt accomplish some task The Prompt is

play19:01

not only to explain what we expect from

play19:03

it but more importantly to correct its

play19:06

undesired behaviors for example due to

play19:09

some reason we cannot use numpy in the

play19:11

company's computer but trb likes to

play19:13

solve the problem using this Library so

play19:16

we need to include this requirement in

play19:17

the prompt however when we use the chat

play19:21

style it's nearly impossible for us to

play19:23

use the prompt because such kind of

play19:26

Correction of unexpected behaviors are

play19:28

scattered all around the place across

play19:31

many conversations but for the addit

play19:33

style use we always have the latest and

play19:36

greatest The Prompt at hand summarizing

play19:38

all the requirements and Corrections

play19:41

ready to use this is especially helpful

play19:43

in AI assisted programming which we will

play19:45

cover in the full

play19:48

course and what we just experienced is

play19:51

not only a journey to effective use of

play19:53

chbt but also a great example of

play19:56

training before training we Face a lazy

play20:00

forgetful and dumb AI rely on our first

play20:03

reaction to use it and blame open AI for

play20:06

when we see unexpected

play20:08

behaviors after the training we

play20:10

understood how it works internally we

play20:12

made made sense of all those behaviors

play20:14

and learned about the best practices

play20:16

which is addit not chat the training

play20:19

lets us know the best way to use chbt is

play20:22

actually to not chat and in the full

play20:25

course we will also help you to

play20:26

exercises to form a habit to make it a

play20:29

muscle

play20:30

memory overall the general principle is

play20:33

for more complicated tools you need more

play20:35

training it applied to bikes cars planes

play20:40

and AIS and you need people who knows

play20:42

the ins and outs and people who know how

play20:44

to teach to train

play20:46

you in the full course we will also go

play20:49

over different components of chbt and

play20:51

have a comprehensive overview on how to

play20:54

prepare yourself in terms of mindset

play20:56

knowledge and practical tricks like

play20:59

addit not chat we already had the first

play21:01

two cohorts sold out and the current

play21:03

cohort will begin from July

play21:06

22nd all right this is it for linning

play21:08

course hope you enjoy this and I'm happy

play21:11

to take any questions let me go over the

play21:13

chat window to figure out what are the

play21:20

questions about uh Google so the

play21:22

question is didn't Google recently void

play21:24

this issue with the infinit window model

play21:27

uh yes in the recent I think that's in

play21:29

last a few days Google proposed this um

play21:33

but it's my understanding is still in

play21:35

the pretty research phase after it it

play21:38

gets into production hopefully we will

play21:41

have less burden in manually managing

play21:43

all this context window but before that

play21:46

this is a pretty easy easy to use and

play21:49

effective

play21:51

trick uh and I saw that some of the

play21:54

questions are already answered and Eugen

play21:58

is also online to help answer the

play22:01

questions and the question could you

play22:05

point us to some resources where we can

play22:08

dig more into the foundation of L

play22:10

understand more critical Concepts like

play22:12

concept Windows this is a pretty new

play22:16

field and I will say most of resources

play22:19

online is pretty not unsystematic and uh

play22:24

at least for this field the this this

play22:28

makes us painful and we like to have a

play22:31

systematical overview of what was

play22:34

important from our perspective so to

play22:36

direct answer Nick your question um the

play22:39

best place probably is our our course

play22:42

but if we see some other resources they

play22:46

are not a very systematic one on top of

play22:49

my mind um if I see in the future

play22:52

probably we can post it somewhere um

play22:55

such as in the community of our course

play23:00

what is the target audience of this

play23:02

course what can we get out of this

play23:04

course in the end if we are uh talking

play23:07

about the main course the target

play23:09

audience of this course is uh the

play23:12

Professionals in the IT industry by that

play23:15

I mean we need to have some not basic

play23:17

knowledge of python such as we know how

play23:20

to you need to know how to run python

play23:22

programs you need to know how to read

play23:24

simple python programs and install

play23:26

python libraries you don't need to be a

play23:29

professional developer um for example

play23:32

PMS TPMS engineering managers uh

play23:36

analysts the or the target audience of

play23:38

this course um but we do require some

play23:41

basic python knowledge so if uh you're

play23:43

out of the it Prof industry that might

play23:46

not be the best course for

play23:48

you and what we can get out of this

play23:50

course in the end is the general idea is

play23:53

Gen gen is a pretty effective tool to

play23:57

boost our productivity but it's actually

play23:59

there are a lot of petful and nuances as

play24:02

we just demonstrated in this process if

play24:05

we understand better from the foundation

play24:09

and know about the best practices this

play24:11

will help us a lot in boosting our

play24:13

productivity my personal experience is

play24:15

Boost like two times to five times of my

play24:18

productivity and we' like to also share

play24:20

this with our the course audience that

play24:23

is the target outcome of this

play24:26

course so on us sandbox versus chat

play24:29

interface that's a great question I I

play24:32

actually I think using sandbox is a

play24:35

pretty good way of using uh the gbt API

play24:39

or chat gbt uh some background is

play24:42

sandbox is a tool provided by openai

play24:46

it's developer oriented instead of

play24:48

showing you a chat interface it in

play24:51

directly invokes the underlying GPT API

play24:55

so it's a little bit different from the

play24:56

chat interface in a few ways

play24:58

uh difference one is chpt is a product

play25:01

built on top of GPT API so it has quite

play25:04

some additional prompts and limits and

play25:07

features but the sandbox doesn't have

play25:10

that which means you may not have the

play25:11

alignment or Safeguard of chbt or other

play25:15

limits of char BT so you may be able to

play25:18

get into the dark side of GPT which

play25:21

means it may not be that safe and the

play25:24

second is second difference is there is

play25:27

also some limit POS on the CH on the

play25:29

chbt for example gbd4 has a contact

play25:32

window of

play25:33

128k but in chbt you cannot use that

play25:37

long before that you will be cut by Char

play25:39

saying that oh your message is too long

play25:41

but in the sendbox you are able to use

play25:43

that the third difference is the uh

play25:46

maintenance of chat history in chbt web

play25:50

interface chbt will maintain the context

play25:52

window as well as the chat history for

play25:54

you but in the sendbox a little bit more

play25:57

manual process

play25:58

which is good thing and from the

play26:00

perspective of of this course because it

play26:02

forces you to manually manage the

play26:05

context window and the fourth uh

play26:07

potential difference is the price charb

play26:10

is a subscription based $20 per month

play26:13

but sendbox is uh per

play26:16

token so overall it's a pretty

play26:19

interesting idea to use sendbox I if for

play26:22

anyone having haven't tried that before

play26:25

I encourage you to try that it's quite

play26:27

unique and fun experience and that might

play26:30

be the right solution to to the context

play26:32

meal

play26:34

management do we have an agenda of this

play26:37

course yes uh in terms of cohort dates

play26:41

we have that in the latest slide and

play26:44

feel free to also scan the QR code so

play26:46

that you get to uh the cord homepage and

play26:49

know more about the course such as the

play26:52

uh the the uh syllabus the expected

play26:56

outcome target audience we have every

play26:58

everywhere we have everything

play27:00

there s on using iterations of a highly

play27:03

structured prompt by edit and or having

play27:06

start by asking questions to improve

play27:08

context of prompt then incorporating

play27:11

into

play27:12

prompt um that's more about prompt

play27:15

engineering that's my understanding of

play27:17

this question um and we do have some

play27:23

tricks around that but that may be out

play27:24

of the scope of this context window but

play27:27

overall yes having the prompt formulated

play27:31

in a more structured way is definitely

play27:33

helpful for making trbt smarter as we

play27:37

mentioned before tra is like it's pretty

play27:40

much like an intern actually I really

play27:41

like this analogy it's it's energetic it

play27:44

doesn't know what is tiest and it can

play27:47

work 247 but it needs some handh holding

play27:51

and this kind of PR engineering is a

play27:53

great example of handholding you cannot

play27:56

assign a very complicated task to an

play27:58

intern and expect him or her to

play28:01

accomplish the task perfectly you have

play28:02

to do some handholding uh and

play28:04

potentially even babysitting and prompt

play28:07

engineering and contact window

play28:08

management are very good examples of

play28:10

star

play28:13

Point um and what might be a more

play28:17

beginner noice oriented geni

play28:20

course that really depends on your

play28:24

background and the intention of what do

play28:27

you want want to learn and my suggestion

play28:30

is actually if you want even more

play28:33

beginner or novice um course probably of

play28:37

course is not the best option directly

play28:39

go to the the chat.com or other similar

play28:44

products begin using that and begin to

play28:46

feel the capability envelope of geni is

play28:50

probably the best um thing to do to to

play28:54

begin with because this will give you a

play28:56

feeling and

play28:58

then you also give you some questions

play29:01

with the questions it will be easier for

play29:03

you to figure out oh what I want from

play29:06

this a course like that what are the

play29:10

pinpoints what can the AI bring to me

play29:13

what I I think getting those questions

play29:16

might be more important than figing out

play29:18

the answers so to directly answer a

play29:21

question probably the best course is

play29:23

sign up a account using chbd from today

play29:29

it seems that the price of course

play29:31

increases per cohort will that be a

play29:33

trend um it sounds like a you already

play29:35

answered

play29:37

that what are your thoughts on the

play29:40

content of the course potentially

play29:41

becoming outdated in mod models iterate

play29:44

for example context window and

play29:46

information infinite window model that's

play29:48

that's a great question uh sounds like a

play29:50

e already addressed that but generally

play29:53

the idea are two folds the first is the

play29:57

content of course can be be basically

play29:58

divided into two things one is the

play29:59

underlying research and another is based

play30:02

on those research that derve the tricks

play30:04

and skills um for a lot of fundamental

play30:08

things they will not change in a long

play30:09

time for example the initial com initial

play30:13

gbt model has been proposed like six

play30:15

years but it's the basic PR principle

play30:18

Still Remains the Same and another side

play30:21

is we do see this field is growing very

play30:23

fast that's also reason why ourselves

play30:25

are Inus as in Inus as of this field and

play30:29

we keep up with the field every day um

play30:31

we try to figure out what are the most

play30:33

important tricks and principles and

play30:35

distill them into the course to make it

play30:38

up to

play30:40

dat um due to the limit of time we will

play30:42

take the last question here um Yen have

play30:46

you played around cloud. a pick out of

play30:49

curiosity yes I played with it and it's

play30:53

it's quite interesting uh in terms of

play30:55

two aspects the first is I found that

play30:58

the difficulty of managing my contact

play30:59

window is much less for cloud V3

play31:03

especially Opus more more um

play31:06

specifically for a lot of prompts and

play31:09

contact Windows gbt may be lazy so we

play31:12

need to do more tricks to make to like

play31:16

massage those prompts and contact

play31:17

Windows to make it work but for cloud V3

play31:20

we don't need to do that tricks from

play31:22

this perspective we can see a trend that

play31:25

people also realize the problem with

play31:26

contact window and Make it try to make

play31:28

it more user friendly and from another

play31:31

perspective I also feel gbts 4 is still

play31:34

a little bit smarter than Cloud a floud

play31:36

V3 but that may be just my feeling based

play31:38

on limited

play31:40

tests so due to the limit of time uh

play31:43

that's it for the Q&A and really

play31:45

appreciate everyone's time and interest

play31:48

for attending this course we look

play31:50

forward to see you in the actual course

play31:53

thanks a lot bye

Rate This

5.0 / 5 (0 votes)

Related Tags
AI生产力上下文管理IT行业系统训练智能交互Python基础聊天机器人问题解决效率提升技术培训GPT模型
Do you need a summary in English?