Episode Transcript
Available transcripts are automatically generated. Complete accuracy is not guaranteed.
Speaker 1 (00:00):
The more effort you
put into the first prompt, the
less iterations you will bedoing afterwards.
Prompt engineering I thinkthere are a few things.
How do I do you know horizontalaligning with CSS and that's it
(00:33):
.
And you expect it to producelike the magic right, which is
the equivalent of going toGoogle and asking cats, or why
do cats meow at night?
Right, which is it's a good,it's a good question, but it's
not really good.
Right, in google you cannotgive a lot of context.
But you know, in google thereare parameters.
(00:55):
Um, you can, you can search,like there are filters, you know
site and like site and stufflike that.
You can use the minus, likedash, to filter out stuff, say
like, oh, I want this, I wantfront-end development, minus
Angular, because I don't want tosee anything in Angular.
(01:15):
Right, the same happens withChatGPT, but not a lot of people
know what is prompt engineering, what is the context, what is
the role, what is like the fewparameters?
Because there's no clear guideson that.
Actually, openai they releasedthe OpenAI Academy last week and
not a lot of people knows aboutthat.
But if you Google or if yousearch for OpenAI Academy, there
(01:39):
are a few really good tutorialsthere.
I haven't read any of them.
Really good tutorials there, Ihaven't read any of them, but I
think it's a good start ifyou're really starting out Good.
So what I wanted to share hereis a little bit of prompt
engineering very basic, and thengo into questions.
Let me just share my screenbecause I have an example I've
(02:01):
done with ChatGipty.
So I have prepared an exampleof prompt engineering, about
prompt engineering, right, so itwill be a little bit meta.
I hope it's not too complex tounderstand.
But basically, one of thethings I have incorporated in
the last few months is actually,before doing a query on ChatGPT
(02:23):
is asking me sorry, help me torefine the query and write the
prompt for me, which is it'skind of like a middle step for
accomplishing something.
Let's see an example here.
Right, you can use this, youcan copy this.
Basically, we use this thread asa prompt refiner and that's
(02:44):
something that you can use rightaway.
I will input prompts and youwill guide me through questions
to get all the necessaryinformation.
You need to create the perfectprompt for each task, and this
is something that I've beenusing for months, and just by
creating this, your, your usageof chat gT will be much better,
right?
(03:04):
You will see it in a moment.
Once you have the information,you will rewrite the prompt and
explain it to me in terms ofevery item in Instructor so we
can fine tune and do flawlessprompt engineering.
This is a pretty good ask forChatGPT to help you with this
right.
For instance, an example Iprepared for today is somebody
(03:26):
asked me like how can I use AIfor financial planning and
tracking my investments?
Well, three months ago I wouldhave written this hey, help me
do my financial planning andtracking my investments.
It would be like a really shitprompt, right.
And basically, you know,chatgpt is like having an intern
that if you give really shitinstructions, you get shit
(03:46):
outputs.
If you give really goodinstructions and you take the
detail to refine and structureand give examples, stuff like
that, the output of ChatGPTbecomes really really good.
So let's see an example.
Okay, this is a shit prompt.
(04:10):
I want to start using AI forfinancial planning and tracking
my investments, because itdoesn't have context, it doesn't
set the tone, it doesn'tindicate any kind of examples.
What is the desired output?
There's nothing.
So AI will be like whatever,because this is a prediction
model we'll be like I'll try topredict something and it will
(04:30):
predict terrible stuff.
Okay, so if you use this and tohelp you to write better
prompts, you will see that ithelps.
Let's start.
You get this and then it comesback with a few questions.
Right, okay, clarificationquestions, objectives what is
the data source, like theformats, blah, blah, blah.
(04:52):
It will ask about investmenttypes.
What kind of investments are wetracking?
What is the frequency?
What is the know?
What tools do you want to use?
Do you want to integrate?
Do you want to build code?
What is your risk tolerance andprofile and terms of privacy?
You know it gives eightquestions that I answer here,
(05:14):
and once I answer this with moreor less detail, now it gives
you the prompt, and this promptis much better because if you
use this prompt, you will get amuch better outcome than you
would have gotten with the firstone, and you can test it If you
(05:36):
do testing on your own.
Create a thread, give the firstprompt the terrible one and
then create another thread, notin the same one and give this
one, and you will see that thequality is immensely better in
the second example.
So here we got the version one,which is good enough.
It helped me create anAI-assisted system.
(05:57):
Blah, blah, blah.
I want to.
You know it gives more.
It gives a little bit morecontext.
It gives exactly what you wantit gives.
It explains the outputdashboards with charts and
summaries, how you will enterthe data, what kind of data
should it expect and what moreinstructions about how to use.
(06:19):
And here, actually, this is moreverbatim, this.
Probably you don't need thislevel of detail, but it's good.
Why?
Because prompt engineering issomething that people have had
to reverse engineer.
Right, it's like oh, I've triedthese things, they work.
I've tried these other things,they don't work.
But, more importantly, if youfollow AI influencers on Twitter
(06:42):
and they are not scientiststhey're probably saying bullshit
.
For instance, I remember backin like a year ago, they would
be sharing like, oh, I createdthis image and they would be
putting like parameters, likethe style of the camera, the I
don't know the technicalities ofI'm not good at photography,
(07:04):
but I know like this, like thefocal point and the lightning,
blah, blah, blah and this kindof film.
And somebody from OpenAIactually came out and said, like
we don't process theseparameters, like this is
bullshit.
But a lot of people believethat, right, but actually, if
you the the entire model here oryou read the documentation,
(07:24):
there's something that is truehere.
So, for instance, you know, um,when you write your prompts,
it's good to sell.
Set the goal, right.
A lot of people don't set thegoal, like what's the purpose of
the question, right?
Uh, um, you know, um, forinstance, I wanted to I will see
some examples later right?
Or give me ideas for contentmarketing.
(07:45):
Yeah, what's the goal?
Is it the MarsBase blog?
Is it the MarsBase podcast?
Is my personal newsletter?
Is my social media accounts?
Do I have an account forsomething else?
Is it because my clients wantcontent?
What's the goal?
Right?
Context, more or less the same,right?
Why do you want to do it andwhat information can you give me
(08:08):
about that?
I spend like a good 10 minuteswriting that and I know that
sounds like a lot of effort, butthe more effort you put into
the first prompt, the lessiterations you will be doing
afterwards by answering thesequestions here.
It explains why this isimportant.
Right, the output format.
You know, most of the times weask for questions to an AI, but
(08:33):
we don't give examples of how dowe want the output.
Oh, give me fake names forsimulating user registrations in
this application and I was like, okay, fine, here's a list of
names and it gives you abulleted list, but said, oh, now
I need it in JSON format.
Well, why didn't you specify itin the first place?
(08:54):
You know what I mean.
Like, it's better to spend alittle bit more time thinking
through and providing like areally good uh prompt in the
first place to avoid iterations,right, um, you know, by
answering these questions, youknow?
Um, it gave me actually morestuff to refine it better.
(09:14):
So, more questions.
Then I answered these questionsand now refine prom final
version.
You, you know, use this one andprobably it's going to give you
better examples than the, thanthe um, than the first one.
So this is the example Iprepared.
Like, feel free to experimenton your own.
Um, I do have other stuff.
(09:35):
I've been playing with a voice.
I've been playing it with youknow the different models, not
so much.
There's the integration withthe Notes app.
I don't know.
Feel free to shoot questions.
I wanted to open it up for youguys.
But did you try this, likesending him, like a dummy, data
Excel and see what's going onwith the charts or with tables
(10:00):
or with something.
Yeah, I don't remember thespecifics, but I have my
financials.
I have on a Google Sheets,right.
I haven't given all of theinformation, not for privacy
issues, but because I reallydon't.
(10:23):
I really didn't know what towhat to ask.
I've gone for very specificthings, like sometimes I go like
I screenshot a part of it and Isay I don't know, I want to
accomplish this.
Like, for instance, oh, I'vegot these annual returns on my
financial investments and stufflike that and I want to
calculate these other metrics,but I don't know the formula.
(10:43):
Can you give me the formula?
Here's the data and here's theentire sheet so you can see the
cells right, and because it cansee the cells, it can provide
you with the exact formula.
Yeah, that works.
Like, for instance, that is areally good example is a really
good example For other stuffthat I do all the time with AI,
for instance, is transformingimages.
(11:07):
Like, for instance, you know Iwant a vectorial version of this
image.
You know here's the vectorialimage.
Or you know it gave me twoversions, like one with
auto-trace could simplify, Idon't even understand what that
is.
Give me this and then now giveme the other options, stylized,
(11:29):
pre-interpretation, optimized tobe used, so stuff like that,
right?
Or what is the other one?
Give me?
There's another one that is forthis one.
Give me the list of panels.
Like.
This is for a blog for MarsSpace.
I was like, oh fuck, I need thelist of people who spoke at the
Corporate Innovation Summit andI always have to type it
manually.
No, you know it's.
(11:50):
Hey, I've got this image.
I mean, you probably cannot seeit, but basically, this is the
panel and because theinformation of the speakers is
here name, role and company giveit to me in this format.
Now, great, I copy pasted thisinto the block.
Perfect, it saved me 10 minutesof doing this.
Really stupid test.
Yeah, but this, for instance,this is like the case that I
(12:12):
really like.
Like, using this to quickly getsomething.
The idea of spending one hourredefining the prompt and, in
the end, finally get the result.
It's like well, forget, forgetit, I'm going to do it myself.
Most likely, I'm not going tospend one hour.
No, I mean, depends on thecomplexity of the task.
(12:32):
Uh, there was another one thatI did, like this.
Uh, for instance, let me seeokay, here things here.
A client sent me this, right,it's like's like a potential
client.
It's like oh, this is the kindof box that we have in the
application.
It's like yeah, great, it's ascreenshot of an Excel and I'd
like to copy this into linear,but I cannot.
(12:54):
So give it the text of thisimage, fine, great.
And here I probably should havesaid give it to me markdown,
because I want to put it in alinear, but it was sufficiently
easy that here you copy paste itinto linear.
It works right.
But sometimes you want specificformats.
For instance, apple Notesdoesn't have like markdown from
(13:16):
the get-go.
Or you want Google Docs it's aspecific kind of markdown, so
stuff like that you can optimize.
For that.
Say like, hey, give me this,but the output has to be
something that I can copy pasteon Google Docs.
That looks great and boom, itworks right.
So it's a good example.
This one was more, you know, alonger one, right?
(13:37):
That's the thing that I'mtrying basically to say that the
value right now for me, it'sfor these kind of things not to
spend an hour really finding aproblem.
Okay, like, yeah, unless.
No, because.
Okay, because you're using theAI as like an intern for really
(13:57):
simple tasks, right, there'ssomething like but sometimes you
really want the other one, youreally want something more
specific.
It's amazing Like simple thingsthat you can process fast and
easy, just like these examples.
Or, for instance, in Cursor,where we have the tab and it's
like I don't know stronger ormuscular autocomplete.
(14:22):
All of these are like simpletasks.
Yeah, exactly, well, sometimesI have discussions, okay, yes,
because, well, I need to discusswith someone, I need to speak
with someone.
Let me speak with a robot.
This is sad, but anyway, thething is that sometimes I get
(14:44):
ideas with these kind ofconversations with him, that now
the thing is redefining prompts, spending time building prompts
.
It's a pain, like for me.
Like, doing the parallelismwith coding is like the way
we're using chat andconversational stuff is like
(15:08):
writing spaghetti code.
You're writing spaghetti codeLike, oh, I want this.
Like, for instance, let's seethe same example Help me track
my investments and financialdata.
Okay, yeah, step-by-step data.
Okay, yeah, step-by-step plan.
(15:28):
Okay, yeah, let's see if thisworks.
Maybe, maybe it works.
Maybe it has like some contextbehind blah, blah, blah.
But like, for instance, it willtalk about like crypto.
I don't do crypto or loans.
I don't have loans or creditsor deposits.
I don't have this right and sobecause I didn't give it enough
(15:49):
context, or maybe I wantsomething else, right, I want it
for.
Okay, now, it has contextbehind because if you look at
this, there's Wallapop sales andWallapop sales.
I'm sure that not a lot ofpeople track that.
I do track that and, because Iasked it on the other thread, it
does have this context.
Okay, right, um, otherwise itwouldn't be so sorry.
(16:13):
So what you are saying is thatredefining a prompt?
It's more or less like havingthis conversation when I'm
coding no, no, no.
For me it's like no, no.
Now, what I'm trying to say I'msorry, I'm not conveying the
right idea is like if you don'tthink your, your, your um, your
prompt correctly, it's likestarting a task, a development
(16:35):
task, that hasn't been definedby the, by the tech lead, right,
if, if the functional andtechnical definition is not good
, you will do something andmaybe the client doesn't want,
it, doesn't really integratewell, and blah, blah, blah, and
maybe it's spaghetti code orsomething.
And by spending time onengineering your prompt, right,
it's like doing a gooddefinition of a task.
(16:56):
Hey, here's like the controllerthat you got to use.
Like this is the use case, thisis expected output, like the
application should do this.
This is how you test it.
This is like you know.
It has to run under this numberof milliseconds per petition
and stuff like that.
So stop doing spaghettiprompting and start investing
(17:22):
time in providing this.
I think because I use it a lotand I've seen that most of the
times I'm like, oh fuck it, likeit didn't give me a good answer
.
No, it didn't give you a goodanswer because the question was
not right, it was a shitquestion.
Shit questions give shitanswers.
So, and that's why I'm now morethan ever like spending more
(17:42):
time on the initial prompt andyou know, as a result, I also do
it in the kind of requests I doto people that work with me.
It's way more defined now thanit used to be in the past
because of this.