davidshapiro_youtube_transcripts
/
ChatGPT API with Salience and Anticipation of User Needs Towards a fully autonomous assistant_transcript.csv
text,start,duration | |
hey everyone David Shapiro here with a,0.599,5.341 | |
video today's video is going to cover,3.48,6.0 | |
the concept of one salience and two,5.94,5.579 | |
anticipating user needs before the user,9.48,3.779 | |
knows what they need,11.519,3.481 | |
um but before we dive in I've got a,13.259,4.561 | |
couple of announcements to make so one,15.0,4.92 | |
um there is a subreddit that I and a,17.82,4.08 | |
couple other folks that are experts on,19.92,4.439 | |
artificial cognition or an autonomous,21.9,5.82 | |
cognitive entities have created it's R,24.359,6.42 | |
artificial sentience so if you want to,27.72,5.999 | |
start uh having conversations and jump,30.779,5.28 | |
in uh please feel free to do so it's,33.719,5.52 | |
public uh beginners are welcome,36.059,5.701 | |
um basically now that the concepts of,39.239,4.561 | |
cognitive architectures and autonomous,41.76,4.2 | |
cognitive entities are taking off,43.8,3.9 | |
I'm taking my hands off the steering,45.96,3.18 | |
wheel right I've done my part I've,47.7,3.539 | |
popularized the idea I'm starting the,49.14,4.56 | |
conversation and now it's time for,51.239,4.561 | |
everyone to get involved so this is our,53.7,5.22 | |
subreddit artificial sentience,55.8,5.34 | |
um a quick update on Raven,58.92,4.08 | |
um which is my artificial cognitive,61.14,3.78 | |
entity project,63.0,6.6 | |
um we have moved to the um to the third,64.92,7.26 | |
stage of creating,69.6,6.059 | |
um consensus so we're drafting proposals,72.18,6.36 | |
um so I we we listed um you know the,75.659,5.46 | |
decision criteria I made a proposal,78.54,4.2 | |
we're getting feedback on it another,81.119,3.721 | |
person made a proposal and we'll start,82.74,3.78 | |
working on doing feedback so we're,84.84,4.56 | |
workshopping the consensus mechanism and,86.52,5.94 | |
again uh creating autonomous machines,89.4,4.68 | |
that can think and decide on their own,92.46,3.839 | |
the stakes are way too high for it to be,94.08,5.399 | |
done completely behind closed doors,96.299,4.86 | |
um and so that's why we're doing this,99.479,3.301 | |
and the first thing that you need to do,101.159,4.201 | |
with any project is decide how the,102.78,4.979 | |
governance is going to be now,105.36,4.5 | |
um really big update for me personally I,107.759,4.261 | |
have decided to leave,109.86,4.86 | |
um my startup so I'm going to take the,112.02,6.419 | |
rest of 2023 off I'm not going to do any,114.72,6.78 | |
startups no full-time jobs nothing I am,118.439,6.601 | |
going to focus on uh primarily finishing,121.5,5.939 | |
my novel which includes amongst other,125.04,7.62 | |
things Ai and then uh other AI stuff you,127.439,8.101 | |
know YouTube patreon that sort of thing,132.66,4.439 | |
um so this is my full-time thing so,135.54,4.14 | |
because of that I really need to ask for,137.099,6.301 | |
y'all's help with support on patreon,139.68,6.059 | |
so I'm doing this full time I'm,143.4,4.74 | |
organizing meetups I'm organizing online,145.739,5.341 | |
communities so on and so forth and uh so,148.14,5.099 | |
yeah every little bit helps the average,151.08,5.04 | |
supporter I think is about 15 a month so,153.239,4.561 | |
most people are somewhere between the 10,156.12,4.08 | |
and 20 a month support but every little,157.8,4.56 | |
bit helps I've got over 20 000,160.2,4.56 | |
subscribers and less than 400 supporters,162.36,4.5 | |
on patreon so some of y'all could jump,164.76,4.08 | |
over onto patreon that would be a really,166.86,4.32 | |
big help and then furthermore if you,168.84,5.399 | |
want some one-on-one help either via,171.18,5.58 | |
chat email and I try and avoid Zoom just,174.239,4.621 | |
because Zoom fatigue is real,176.76,3.54 | |
um that being said sometimes a,178.86,4.56 | |
conversation is necessary if you sign up,180.3,5.04 | |
for a higher tier I'm happy to jump on a,183.42,3.72 | |
call with you and your team in fact I've,185.34,4.44 | |
got a couple calls later today,187.14,4.92 | |
um anyways so with all that out of the,189.78,5.039 | |
way I'm working on this concept of,192.06,5.039 | |
salience so here's the repo chat GPT,194.819,4.801 | |
underscore API underscore salience,197.099,5.581 | |
so this is a concept from neuroscience,199.62,5.399 | |
and it is it is one of the primary,202.68,4.62 | |
attention mechanisms that happens in our,205.019,5.161 | |
brains and if you look this up you're,207.3,5.04 | |
probably not going to find anything in,210.18,4.559 | |
in like the Neuroscience literature this,212.34,3.96 | |
is an emergent property that I've,214.739,3.241 | |
noticed from having read a whole bunch,216.3,3.78 | |
of neuroscience and psychology,217.98,4.56 | |
and so basically what happens is as,220.08,4.019 | |
you're having a conversation or,222.54,3.839 | |
listening or working on something your,224.099,4.56 | |
brain is forming like a basically a,226.379,4.681 | |
Knowledge Graph around the most Salient,228.659,4.8 | |
points of what you're working on so say,231.06,5.22 | |
for instance I'm uh working on a chat,233.459,4.321 | |
bot so the most Salient thing that I'm,236.28,3.78 | |
working on is what is the goal that I,237.78,5.039 | |
have here and what is the um what what,240.06,4.2 | |
am I currently working on are the,242.819,4.92 | |
problems that I'm facing so salience is,244.26,5.699 | |
um in in humans there's a few there's a,247.739,4.86 | |
few things there's tasks aliens so tasks,249.959,4.86 | |
alien says okay what information is most,252.599,4.2 | |
relevant to the task that I'm doing,254.819,4.32 | |
there's also emotional salience or,256.799,5.461 | |
emotional content so this is this our,259.139,4.981 | |
memories are organized primarily around,262.26,3.659 | |
emotional valence,264.12,4.32 | |
and surveillance is the energy level and,265.919,4.621 | |
then disposition is the direction or the,268.44,3.66 | |
kind of emotion is it positive or,270.54,2.939 | |
negative,272.1,4.08 | |
um and so emotional salience is is how,273.479,5.28 | |
we uh prioritize memories which is why,276.18,4.92 | |
you remember stressful events more than,278.759,4.741 | |
just ordinary daily events because your,281.1,4.379 | |
emotions are a heuristic that allows,283.5,3.66 | |
your brain to say oh this was important,285.479,3.78 | |
because we were scared this is important,287.16,4.979 | |
because we were angry or whatever now,289.259,4.921 | |
tasks aliens is more about cognitive,292.139,4.681 | |
control and cognitive control is Task,294.18,5.459 | |
selection which is which task do I do I,296.82,4.62 | |
choose to do and then task switching,299.639,4.321 | |
which is when you need to change tasks,301.44,4.74 | |
so cognitive control is one of the,303.96,3.66 | |
primary things that we need to figure,306.18,3.54 | |
out in order to have autonomous,307.62,4.2 | |
cognitive entities or cognitive,309.72,4.62 | |
architectures and salience and this is,311.82,4.2 | |
why I'm doing a video an entire video,314.34,5.82 | |
about salience is how we do that so,316.02,7.32 | |
you guys have probably seen the Wolfram,320.16,5.94 | |
Alpha video right where there it has,323.34,5.22 | |
task selection using I think Lang chain,326.1,4.8 | |
where it says okay given this array of,328.56,4.979 | |
tools that I have how do I which tool do,330.9,4.68 | |
I choose right and there's also papers,333.539,5.22 | |
out there about how um large language,335.58,5.58 | |
models can actually learn to use apis on,338.759,4.261 | |
the Fly which is really cool so they're,341.16,3.78 | |
learning on the Fly they can do task,343.02,4.14 | |
selection but then how do you how do you,344.94,4.8 | |
do task switching how do you know what,347.16,4.5 | |
to focus on and that is the concept of,349.74,5.94 | |
salience so I tried,351.66,6.9 | |
Visual Studio code and I hate it I keep,355.68,6.18 | |
telling y'all I hate Ides I also tried,358.56,5.16 | |
GitHub Code Pilot and I hate it too,361.86,4.02 | |
because it's really dumb it has no idea,363.72,3.6 | |
what I'm doing because the stuff that,365.88,3.72 | |
I'm working on is like so novel and so,367.32,3.719 | |
it keeps suggesting stuff that's not,369.6,3.06 | |
really relevant and it's not really,371.039,3.781 | |
picking up what I'm putting down so I'm,372.66,4.62 | |
going to switch off of visual studio and,374.82,3.54 | |
I'm just going to go back to notepad,377.28,2.46 | |
plus plus I know you guys think I'm,378.36,3.839 | |
completely crazy but you know what it,379.74,4.98 | |
works for me and anyways so here's what,382.199,4.44 | |
we've got this is a really simple script,384.72,4.62 | |
that will serve as a chat bot and will,386.639,5.221 | |
demonstrate the concept of salience so,389.34,5.16 | |
I'm also switching over to the chat GPT,391.86,5.52 | |
API so if you come over here here's the,394.5,5.46 | |
here's the documentation the endpoint,397.38,5.4 | |
you call it super simple there's only,399.96,5.28 | |
two things to know about it one is the,402.78,6.24 | |
model GPT 3.5 turbo and,405.24,5.16 | |
um they have this little note here that,409.02,4.019 | |
says the the turbo 0301 so that's the,410.4,4.739 | |
March 1st version doesn't pay much,413.039,4.861 | |
attention to system and it looks like,415.139,4.381 | |
they they are going to do that so open,417.9,3.78 | |
AI what you might consider doing is,419.52,4.86 | |
adding a lever here where we we get we,421.68,4.44 | |
put a weight so that we can call like,424.38,3.48 | |
the temperature or whatever I don't know,426.12,3.06 | |
if it's possible depending on how you're,427.86,3.839 | |
fine-tuning it but if you have like you,429.18,4.139 | |
know how how much do you want to pay,431.699,4.801 | |
attention to the system uh role you know,433.319,4.561 | |
anyways,436.5,3.78 | |
so there's a model which I'm going to,437.88,4.8 | |
stick with the GPT 3.5 turbo because I,440.28,4.02 | |
want it to really pay attention to the,442.68,4.2 | |
system and then then you have a messages,444.3,4.679 | |
payload which is a list of dictionaries,446.88,4.74 | |
and there's three kinds of roles there's,448.979,4.921 | |
the system role there's the user and,451.62,4.68 | |
then there's the assistant so it's nice,453.9,4.199 | |
and clean very straightforward so that's,456.3,3.179 | |
what we're working on,458.099,4.081 | |
and then the last thing I have to show,459.479,5.041 | |
you before we get started is the two,462.18,5.1 | |
prompts that one try and anticipate the,464.52,6.179 | |
user needs ahead of time and two assess,467.28,5.16 | |
the salience so they're pretty,470.699,3.301 | |
straightforward first is given the,472.44,2.759 | |
following chat log this is the,474.0,4.259 | |
anticipation prompt infer the user's,475.199,5.22 | |
actual information needs attempts to,478.259,3.66 | |
anticipate what the user truly needs,480.419,2.761 | |
even if the user does not fully,481.919,3.481 | |
understand it yet themselves and let's,483.18,5.4 | |
change this um or is asking,485.4,5.16 | |
um the wrong questions,488.58,5.04 | |
so a lot of people that I have talked to,490.56,7.74 | |
have observed particularly chat GPT is,493.62,6.9 | |
really good at taking just a few data,498.3,3.839 | |
points and inferring what you actually,500.52,5.16 | |
need and so what we can do is if we have,502.139,5.28 | |
the model if we actually explicitly tell,505.68,3.54 | |
the model figure out what the user needs,507.419,4.441 | |
there was another paper that showed that,509.22,5.46 | |
large language models like gpt3 already,511.86,6.119 | |
have theory of mind the paper said that,514.68,5.219 | |
the theory of mine seems to have been an,517.979,4.321 | |
emergent property given the number of,519.899,3.901 | |
parameters and the amount of training,522.3,5.4 | |
data so if we just tell it anticipate,523.8,5.099 | |
what the user needs figure out what's,527.7,3.42 | |
going on in the user's head it can do,528.899,2.94 | |
that,531.12,2.1 | |
um more often than not it's not always,531.839,3.901 | |
going to be 100 accurate but just wait,533.22,4.799 | |
and see you'll see how crazy um how,535.74,3.96 | |
crazy prescient it is,538.019,3.301 | |
and then finally,539.7,3.6 | |
um salience so given the following chat,541.32,3.959 | |
log Write a brief sailor brief summary,543.3,3.78 | |
of only the most Salient points of the,545.279,4.081 | |
conversation so rather than summarizing,547.08,4.5 | |
the entire thing we're going to allow,549.36,3.9 | |
the language model to use its,551.58,3.54 | |
intelligence to say this is this is the,553.26,4.259 | |
bit that we that we carry about,555.12,5.76 | |
um so we'll do this uh and and there you,557.519,5.76 | |
there you have it so the other the the,560.88,3.84 | |
chat script itself is super,563.279,3.06 | |
straightforward it just takes the user,564.72,3.6 | |
input then we'll feed the conversation,566.339,4.44 | |
into the anticipation and salience and,568.32,4.8 | |
then we'll update the system variable,570.779,4.081 | |
um and so then I've got all the logs,573.12,4.44 | |
saved out to here so I've already got a,574.86,5.099 | |
conversation going so,577.56,4.5 | |
um let me bring you up to speed and said,579.959,4.141 | |
hey I need your um,582.06,4.5 | |
I need your help planning out my day and,584.1,5.58 | |
so then uh behind the scenes it says the,586.56,4.38 | |
user likely needs help with time,589.68,4.2 | |
management and organization so they may,590.94,4.74 | |
need help with prioritizing tasks,593.88,3.72 | |
setting goals and creating a schedule so,595.68,4.2 | |
in this case you can see that just just,597.6,5.22 | |
by this input it anticipated okay this,599.88,4.8 | |
is what I think you need,602.82,4.38 | |
um and then it added the evaluation so I,604.68,4.64 | |
modified the prompt to get rid of that,607.2,4.62 | |
but it's really interesting the the,609.32,4.36 | |
user's actual information needs are not,611.82,4.26 | |
directly related to the ai's goals but,613.68,4.08 | |
the AI can still provide assistance the,616.08,3.42 | |
AI can provide resources and advice to,617.76,3.3 | |
help the user plan out their day so,619.5,3.899 | |
again super relevant I want to figure,621.06,3.839 | |
out some prompt engineering to get that,623.399,3.741 | |
or maybe break it down into parallel,624.899,4.681 | |
anyways salience the user is looking for,627.14,4.42 | |
help planning out their day and they are,629.58,3.78 | |
interacting with an AI named Raven which,631.56,3.06 | |
has three goals reduced suffering,633.36,2.46 | |
increased prosperity and increase,634.62,3.6 | |
understanding so again if you have a,635.82,4.38 | |
fully autonomous machine,638.22,4.679 | |
part of autonomy or agency is that you,640.2,4.98 | |
have your own goals now that being said,642.899,4.44 | |
we don't want the AI to be able to,645.18,4.14 | |
create all of its goals from scratch,647.339,4.74 | |
with in a total vacuum we want it to,649.32,4.98 | |
have some intrinsic goals and so these,652.079,4.081 | |
intrinsic goals are the core objective,654.3,3.539 | |
functions reduce suffering increase,656.16,3.179 | |
prosperity and increase understanding,657.839,4.62 | |
are the universal guard rails that will,659.339,5.761 | |
keep the chat Bots honest and benevolent,662.459,4.56 | |
so then finally the output hi there I'd,665.1,3.72 | |
be happy to help you plan your day what,667.019,4.141 | |
do you have planned so far so do you see,668.82,3.959 | |
how the tone of this is very different,671.16,4.38 | |
from normal chat GPT,672.779,4.68 | |
um it's very clear that it understands,675.54,3.78 | |
like oh hey I'm having a conversation,677.459,4.681 | |
and I said nothing I need your help and,679.32,5.579 | |
it says okay the uh I updated the prompt,682.14,4.139 | |
and it said the user likely needs help,684.899,2.761 | |
with time management they may need help,686.279,2.881 | |
prioritizing tasks setting goals,687.66,3.6 | |
creating a schedule breaking down tasks,689.16,3.6 | |
into smaller more manageable chunks,691.26,3.0 | |
creating a timeline additionally they,692.76,2.819 | |
may need to help identifying and,694.26,3.72 | |
utilizing resources salience the user is,695.579,3.601 | |
looking for out planning their day and,697.98,3.419 | |
interacting with Raven the AI can,699.18,4.02 | |
provide resources and so then finally,701.399,3.841 | |
Raven's output so I have this as debug,703.2,4.259 | |
right this would be hidden and what I,705.24,3.719 | |
wanted to do is show that I'm not the,707.459,3.06 | |
only one working on this this is what,708.959,3.661 | |
Bing does behind the scene so I ask,710.519,3.841 | |
being how does a chatbot work and it,712.62,3.48 | |
says how does a chat bot work and then,714.36,3.0 | |
there's a few other things it has like,716.1,3.479 | |
internal monologue I'm not going to try,717.36,4.44 | |
and jailbreak it because like if you,719.579,4.621 | |
want to see people jailbreaking chat GPT,721.8,4.62 | |
and Bing go for horrifying I'm telling,724.2,4.62 | |
you how to actually build it yourself,726.42,3.72 | |
um why because I wrote the book on it,728.82,3.3 | |
literally,730.14,3.42 | |
anyways,732.12,3.0 | |
um okay Raven sure we can start by,733.56,3.06 | |
breaking your down your day down into,735.12,3.54 | |
different tasks or activities first what,736.62,3.24 | |
are some tasks that you need to,738.66,4.14 | |
accomplish today so do you see how um,739.86,5.58 | |
all of these ideas are kind of,742.8,4.56 | |
transmuted into the into a very,745.44,4.32 | |
conversational output first what are,747.36,3.659 | |
some tasks are there any important,749.76,3.0 | |
deadlines or appointments you need to,751.019,4.621 | |
keep I'll say yes whoops,752.76,4.74 | |
um darn it,755.64,3.54 | |
hang on my keyboard's a little off,757.5,3.6 | |
center that's why I'm typing wonky there,759.18,3.719 | |
we go okay,761.1,2.88 | |
um yes,762.899,4.981 | |
um I have a meeting with a patreon,763.98,8.94 | |
supporter and that's it I'm also pretty,767.88,9.0 | |
tired because I've been working hard,772.92,7.979 | |
okay so rather than like you've probably,776.88,6.36 | |
seen me do other videos where,780.899,4.021 | |
interacting with Chad GPT you have to be,783.24,3.659 | |
really specific about what you want and,784.92,4.26 | |
give it guard rails but I'm asking it to,786.899,4.5 | |
do that for me,789.18,4.98 | |
um wow okay okay great let's prioritize,791.399,4.261 | |
the meeting with the patreon since that,794.16,2.94 | |
speed seems to be the most important,795.66,3.06 | |
task to ensure you are well rested for,797.1,3.479 | |
the meeting let's plan on some rest for,798.72,4.02 | |
your schedule okay wake up shower,800.579,3.841 | |
breakfast work on important project that,802.74,3.96 | |
requires Focus oh wow this is actually,804.42,3.96 | |
this literally I am in the middle of,806.7,4.92 | |
this look at this it is 9am and Raven,808.38,5.34 | |
says work on an important project that's,811.62,3.36 | |
what I'm doing,813.72,2.88 | |
um take a short break to recharge,814.98,3.72 | |
schedule a nap lunch break to,816.6,3.66 | |
re-energize take care of household,818.7,4.439 | |
chores prepare for the meeting so he,820.26,5.16 | |
made made some wrong assumptions,823.139,4.88 | |
um uh the meeting is actually around,825.42,5.039 | |
noon I think,828.019,3.781 | |
um,830.459,4.811 | |
but uh but this is really good,831.8,4.18 | |