Transcripts
1. Intro: And welcome to my
AI prompting class. So in this class, I'll
be sharing with you the very best tips on prompting AI that I've learned from over hundreds of hours of
experimenting, trying, doing courses from some
of the main providers, all of that distilled
into this class here, everything with the goal
of getting the best out of the latest larger language models we have
available right now. So I've gone through
a lot of stuff, so you don't have to from
full length courses from providers like Google,
Open AI, Anthropic. So I've gone through a
lot of YouTube videos, podcast, articles, and I've basically
distilled all of the best bits into this class, so you don't have to go through the whole process
that I went through, in terms of what works,
in terms of what works, practically and what
doesn't my name is Hans, a content creator, property investor, and former engineer. And like a lot of people,
I use larger language every single day, in
all walks of my life. And it's no exaggeration
to say that this is a revolution that we're seeing right in
front of our eyes. So most of us use large language
models every single day, whether it's Gemini
or JAPT or Claude, but very few of us
stop and think at how significant an invention this actually is and how
much is changing our lives. When you think of it in
the context of history. So just to put it all
into perspective, if we look at some of the most major players
historically in terms of the techne and how long it took them to reach 1
million active users, we see that Netflix took 3.5 months to reach
1 million users. Is an impressive feat
in and of itself. Facebook, when they
launched took ten months. You know, getting 1
million active users onto any platform is
a really big feat. And what about ChatGPT
on its launch? It did it in just five days. And it's even crazier, if you
look at the time frames for companies to reach 100
million active users, which only a very
few elites select portion of tech companies ever make to this
number of active users. And ChatGPT got to this
milestone in just 2.5 months. It's absolutely ridiculous this how big of a change this is to everyone's lives.
And going forward, it will likely to
continue to be. So Dems Habies the founder
of Google Deep Mind AI, says that this is one of
the most ferocious battles that ever existed in
the history of Tech. And I completely agree with him. This technology has such far
wide reaching implications, and it's changing pretty
much every industry. Nothing's being
unaffected by this. And even though almost
everyone uses AI nowadays on basically
a daily basis, but very few actually
stop and think what's the optimal way to get the best out of these
large language model, so much untapped
potential and people aren't using them correctly
or using the best practices. And I'm sure that the skill
of really understanding larger language models
and the ability to get the best out of them compared
to everyone else will be a really key skill in the next
five years going forward. And it'll really put you
ahead because after all, if you look at the
user interface of the average LLM AI model, it basically looks like a search but underneath the hood, it's not even in the same ballpark. They're very, very
different things, but most people do still use it like a glorified search engine. By the end of this class, I'm sure you'll level up
your prompting game, whether you've not looked
into anything at all regarding prompting or you've looked at some
articles and tips, I'm sure you'll all be able to walk away and pick up something that you can practically
use in your everyday life. And not only the latest
tips and tricks, but I'll give you a
framework of thinking, a philosophy of how to be a good prompt engineering
at your core, because a lot of the
tips and tricks that I learned two or three years
ago is already out of date, such as the pace of AI. But being able to think
from first principles, how to apply these techniques will have applications
going forward. And the interesting thing about
this class is even though it is specifically
about AI LLMs, a lot of the skills you'll learn here will have far
reaching applications across all walks of life
because what we teach here isn't just specifically
how to prompt AI. It's how to break
down a problem logic how to communicate very clearly. So I'm sure you'll definitely
pick something up, and I'm very excited
to share some of my best tips with you. I
see you on the other side.
2. Welcome + Class Project: Welcome on board.
I'm really excited to have you on this class here. So we'll be going through
a lot in this class. And the way that I've designed it is that everything
is meant to be super practical because I believe that's the
best way to learn, not by, you know, sitting here and just taking
things in passively. But taking it away, trying
everything yourself, to help you really
internalize it and experiment and see what
gels with you personally. So just to give you a quick
overview of this class, we'll be going through
from the very beginning in terms of how LLMs
work on high level, under the hood. So it
gives you a bit of background perspective and also what some of the
limitations might be. And once we've had
some grounding, we'll go through the foundations of what makes a good prompt. So we'll have a
foundational structure that basically you'll be following
with every single prompt. So that'll be our bread
and butter foundation, and then something you can build upon with the more
advanced techniques. We will look at how
you can best get the AI to tailor responses
to you personally. Some of the biggest
misconceptions and mistakes that people
make when using LLMs. Then we'll look at some of
the more advanced topics. So this is based on
the latest advice from AI engineers that are working at these big model companies. Topics like tailored
instructions, few shop prompting, using the LLM to improve
its own responses, and how to iterate your own prompts. So
that's a lot of info. I'm going to be
throwing it at you. And as you go through it, there's no better
way to internalize it by having a practical
class project that's something you can use your
newfound knowledge on immediately and not letting it just kind of
sit in your head, you think you understand
it, and then you moved on and then things
fade away. That's the philosophy we're
taking to learn here. And also, if you're continuously trying things as you go along, you're far less likely
to be overwhelmed with the load of information
helps you digest it. So the class project
is very close to my heart as a
content creator. So the project is to build your own content creator
sea pilot prompt. In terms of platform, it
doesn't really matter. So it could be a for
a YouTube channel, it could be for a newsletter, Instagram, not too concerned
with the exact platform. What I want you to be able to do is by the end of this course, I want you to use AI to help define your niche
and also to write five pieces of content that
is highly tailored to you. So if it's YouTube, it'll be five usable video scripts in your specific niche,
that's highly tailored. So a little preview ahead, you'll be learning
how to construct prompts using the
framework of context, task, and tone, which every
single prompt going forward, will follow this structure, with the AI in such
a way where you can strip away all
of the assumptions, which inadvertently
also reduces the level of hallucinations to get
exactly what you want. And you can give you
a highly specific info about the task at hand. For example, in
the class project, be who your audience
is, what your niche is. So when it comes to
generating the content, it won't just be a
very generic script that anyone could have written. So one great way I use
AI as a content creator, in addition to asking it to do tasks is something to
bounce ideas off of. So an interesting topic that I hear a lot of people
say with AI is, you know, when is it
going to replace humans? What can it do that
humans can't do? And I feel like
this conversation a lot of the time is
missing the point. So it reminds me of this
Steve Jobs interview that I've heard
years and years ago, where he's comparing the energy
efficiency of locomotion, basically, the
energy efficiency of lots of different animals
in the animal's kingdom to a kilometer per unit
of body weight. So it's normalized by unit of body weight, and there's
lots of stuff on there. There's like horses,
there's mice, there's humans, lots of stuff. And if you look at
where humans are just from the energy efficiency
of walking a kilometer, humans do fairly well,
but not the best. There are other animals that are more efficient at
moving than us. Like, for example, when you
correct for body weight, horses or salmon are far more efficient
at moving than us. However, if you take that human and put him or her on a bicycle, that level of efficiency
just skyrockets and nothing even comes close to it in the entire animal kingdom. And I feel like AI
is a bit like that, but, you know, jacked
up to an extreme. So instead of a bicycle,
it's like a rocket. Where it's going to
enable you to do things you never dreamed
possible without it. But it opens up so
many possibilities. But whether it's a
bicycle or a rocket, it still requires a
human to drive it. It still requires that human
intuition to pilot it. Otherwise, it will just take you somewhere where you don't
know where it's going. So the first thing
I want you to do is just to give the
project a try using the techniques you already know or how you use AI right now. So ask you to help
define your niche, ask it to write you
five pieces of content once you've done that,
and we just save that in a text editor, Google
Docs doesn't matter. But as long as
you've got it saved, and the point of the class
is we'll go through it. We'll keep trying these
different techniques, and by the end of it, I want to compare your outputs
at the end to when you had at the beginning to see what the differences
are for yourself. Right, now let's really get
3. How LLMs Work and Their Limitations: So a lot of people call
tools like Gemini, hatiPT Claude, just AI, which is technically true, but there are very
specific application of AI called large language
models or LLMs for short. It's a really important
dstinction to make because it helps
us understand a little bit more about what goes on under the hood
and it helps us understand what it's strong at and what are some
of its limitations hopefully where we can overcome. So under the hood, imagine
an AI assistant is something where the answer has been
artificially cut off, and its job is to
assign probabilities to predict what the next
most likely word is or most likely token. The idea is you would
feed it a question, and its job is to find the
most likely plausible answer, given that question, what it does is once you've
given it a question have a matrix of all sorts
of different various words, and it will assign probabilities
to each of those words, and it'll build up
your answer bit by bit from those
probability matrixes. Now, crucially the
thing what it doesn't do is it doesn't go
into some database, and it brings out a
predefined set of answers for certain questions because that would not make it
sound very natural at all, and it wouldn't be
tailored to you. So that's how you get
different answers, even with very small changes
in prompts that you give it. So even though let's
say you had access to that matrix, and you
could see all of the probabilities, you
still couldn't, with 100% certainty, predict
what it's going to output. And the way it generates
these matrices and assigns these probabilities is by training on huge
amounts of data. So, for example, if you
look at Gemini 3.1, which at the time of filming
is the latest Gemini model, for a human to read through all of the training data
that it's been through, if a human was reading 247, it would take over 10,000 years to read all of
that training data. So it's an insane amount
to train up a modern LLM. But these really advanced LLMs, as we know them, have only
been around fairly recently. Underlying technology behind
them is actually very old. The really early rule based large language models were
actually around in the 1960s. And by the 1990s, it moved to a statistical
model of text prediction, which is a little bit more
similar to what we've got now. But still know exactly
what we in the modern day, think of as large
language models. You know, think text
prediction models in your textap or your
Gmail, stuff like this. And, you know, when you type
a few words and it tries to complete your sentence,
those sorts of things. Real breakthrough came in 2017 when Google invented
the transformer, where words can be
taken in parallel, which gave it the ability
to understand context and give these amazingly
tailored responses. And it gives you
this perception that it almost understands
what you're thinking. So what does all this
background stuff mean for us practically? Well, now that we have
a very rough overview of what's going on
in the background, we can understand a
few things in terms of its limitations in the
fact that, you know, while it sounds like and it imitates very well in terms of understanding
what you think, it doesn't actually
understand what you think. All it's doing is
taking your input and predicting what could
be a plausible answer. All it is is a
predictive engine. So I use the analogy
of the bicycle or rocket of the mind, and it kind of applies here. Basically, it doesn't care or it doesn't know
where you're going. You know, it has the ability
to go really, really fast. But it has no awareness of
where it's going or why. That's why it needs a
human driver to direct it. And also, one of the biggest
issues with these AI LLMs, now that we know it basically its primary goal is to give you the most plausible answer, given the context that
you've provided it. It means that, on the other end, when you don't give
it enough info, it will still try to generate and because all it's
doing is trying to do the best job
possible with what it's got to provide
a plausible answer. Based on its probability matrix. Let's just give an
example of an LLM versus a human assistant for
a fairly simple task. So here is the prompt. Write an email to my boss asking for a deadline extension
on the project. And if you look at the
answer, it's pretty polite and it's
plausible looking. But if you actually
read through it, there's a huge amount
of stuff missing, and it's taking a lot
of liberties in terms of stuff that it's
just assuming. That might not be
true. So, for example, it says, I've already completed but where did I tell it that? I didn't tell it that anyway. It's just kind of assumed it. So if that's not
true and you blindly trusted it and you
used this email, it could land you into trouble. Well, this stuff about
remaining tasks, we haven't told it there
are remaining tasks. So it might not be. It's
made another assumption. So even though this
email is kind of small, it's just full of assumptions. Thing. So contrast
it to yourself. Let's just say you
are human assistant, and it's your first
day on the job and your boss gives you a
similar task like this. You wouldn't just go off and do it and make a
load of assumptions. You would come up and ask a lot of kind of clarifying questions. Like, if it's your first day on the job and you know nothing, you would instead of going
off and writing the email, you would ask your boss, well, you know, what's
this project for? What are some of the
implications of being late? Does this impact other
things, how urgent it is, and a load of other
things that allow you to actually complete the task successfully within the context. But whereas if we just
followed the raw AI output, it would force us to do
a load of extra work. It would kind of mess things up. So the other limitation of these LLMs is called
the syncophanty trap. And it basically just means that the AI has this tendency to agree with whatever you say or mirror back what you say to it. You indicate what
your preferences are, it's very unlikely to
disagree with you. And again, if we go back
to how the AI is trained, it becomes a lot more
obvious why it does this because it's trained
on a huge amount of data. It provides an output, and it's given feedback
in terms of whether humans like or dislike
its responses. And we're far more likely
to like responses that agree with us and confirm versus someone who's disagreeing with us and giving us tough love. So the way these LLMs are trained by nature,
they're syncophantic, which for a lot of applications, we really don't want, and
it's not desirable behavior. So we have to keep this in mind and use a couple of
techniques to overcome this, which we'll go through
later in the class. Right, so that's a little bit of background and some of
the limitations of AI. Now that we know this,
let's move on to the next lesson where we look at the basic structure
of what makes a good.
4. Task, Context, Tone, & Organisation: Right, so in this lesson,
we're going to build the foundational
structure of our prompt, which everything going forward is going to be
based off of this. It's the bread and butter
of this entire class. And every single prompt
going forward should follow this structure of
context, tone, and task. So starting with context, like in the last example we saw, we literally just gave it a task to do without giving
it any context. And the issue is, as you saw, it will just assume
a lot of stuff, and it won't do a
very good job at all, and it wasn't useful to us in terms of what the
p. And in a way, even though it wasn't
really what you meant, it does make sense what it did because it simply just
followed your instructions. It just wrote an email with what you gave it with a context. So we must start off
every single prompt with a context the situation, any key information it
needs, any background. So in the last example, where
we give it zero context, so it just filled in the gaps by itself, we can't let it do that. So if we go back to
the Eaton where we're asking for a deadline extension, a better context prompt
might be something like, you know, I'm working on
an engineering project. I've been tasked to do a
cost feasibility report. However, it's been
delayed by a week because I'm missing some info
from key suppliers. They've had supply
chain issues and we want to be able to get
the quotes back on time. Therefore, I need a one
week deadline extension, which shouldn't impact
the overall project. And instantly, you get a much better answer without
having to tweak the task or other
instructions just by giving it more
info at the start. So that's context.
The next one is tone. Tone is, as it sounds, the way in which you want it to answer to be completely fair, with these LLMs straight
out of the box, their default tone is
actually very good and has a wide application
because by default, they're designed to friendly
and yet helpful tone, which applies in
a lot of places. But sometimes you might want it to answer things in
a more specific way, which is where you
would tell it to. So there are a couple of
approaches you can take. So the first is telling it the intended targeted audience, so it can tailor in terms of the language it uses
for its output. So imagine if you're
a schoolteacher, instead of just saying, write
me a lesson plan for Henry. Say, can you write me a fun
yet educational lesson plan? That's interactive. That's about the life of Henry eighth for a group of
year five students. So now it knows who its
intended responses for, and it'll tweak it accordingly. So another really powerful
tool for the AI is to tell it a situation and also to give it a role that
it needs to play. Now, this is actually a
very interesting point, and this is a point
we'll come back to later in the class
because this is a tip that I learned quite a while ago in terms of giving
the AI a role. And I've been using this tip
for a very, very long time, but the very latest device seems to have tweaked upon
this advice a little bit, which we'll delve into in
a little bit more because there is some nuance in
terms of how you use this. So for now suffice to say, let's say if I'm asking
the AI a question, ask it to answer in the
way of a certain role. So, for example, I
really like to use AI as a reading companion. Let's say if I'm reading
a physics book and I come across a really complicated
topic, like, let's say, if it's the many words interpretation of quantum
physics or something like this, I'll go today and say, you know, answer in the way of a top physics professor and explain to me in layman's terms. And then you immediately
notice a difference in how it responds
by just giving it that persona instead of just asking it to respond
in a default way. And finally, of
course, is the task. So the task is something that you can influence
the output in a big way by just
having a few tweaks and being specific about what
you exactly tell it to do. So what it really
boils down to is to be specific, evaluate, iterate. So using the example from the official Google
documentation, instead of saying
something like, write about climate
change, you want to say, write a persuasive
essay arguing for the implementation of stricter carbon emission regulations. So basically, just the
more info you give it and the more specific
you are, the better. And now I won't always be super obvious in terms of
what you're missing. So this is why you look at
the output and then you continually tweak your input to get the best
response possible. Now, another little bonus
tip when you're giving an AI instructions in
terms of doing a task. In sometimes instead of just
telling it to do something, it can really help to say to
tell it why it's doing it, because a lot of the time, if you tell it why it's
doing it and give it more understanding of the background of why
it's doing a task, even though you may have missed certain things, it
may prompt you. Like, for example,
if you're writing some code or a text for
something, something like, don't use any ellipses whatsoever in your
output response, which technically could work. A better response
would be something like your response
will be read out loud. By a text to speech.
So never use ellipses because the text to speech cannot pronounce them. So once you've given
it that context, maybe if you put
other characters that aren't related to ellipses, because it knows it's doing
a text to speech output, it flag that up. So that's the
framework, context, task, tone as a starting point. So before we move on, it's really about
understanding what the thinking is to really make
a good prompt engineering. So a lot of the
time, people hear the term prompt
engineering and then they kind of just scoff at it because it doesn't
seem that complicated. You're just typing
into a textbox, and you just need to write well. Well, it's not really
as simple as that. There are a lot of
really good writers that aren't good
prompt engineering. It's a really specific
thought process in terms of how you define a problem and what are the steps to solve it and to iterate. So going back to that really
eager assistant example, just imagine if you were
talking to a human assistant, you would want to give
them as much info as possible to do the best task. The more info you leave out, while still expecting your
assistant to do the task, it just forces them to
make more assumptions, which exactly is what's
happening with AI. So it's about stating
things very clearly, having very clear
defined communication, and understanding the task. So the rule is to remember
never to give the AI a task that a very competent
human couldn't do.
5. Honesty Rule vs Persona: Now, this lesson is
specifically about the point where we mentioned
in the last lesson in terms of giving the AI a fictional role to influence the output
responses it gives you. Now, we talked about
tone and getting the AI to answer in a way that's
more helpful to you. Because traditionally, when I first came across
this advice, I think, two or even three years ago, it's always kind of to
trick the AI, you know, tell it to play a certain role, give it fictional situation, so it answers in a different way to
what it normally does. Now, the main premise behind
this tip was almost to trick it to be less lazy
with your responses. For example, in the last
one, instead of just asking it about to
explain this concept, explain the many
words interpretation of quantum physics, say, you are a leading
physics professor at so and so University,
you are my friend. We're having dinner at a
fireside chat, blah, blah, blah. You know, you're building up this whole fictional scenario to get it to try and answer
the original question. You know, instead of just
saying, give me a lesson plan, saying, You are a
school teacher. You're in this setting, X
Y Z, all of these things. Now, recently, I
listened to this podcast between anthropic engineers, saying, with the latest
model, actually, this is not great advice
because the issue is, when you create these
fake scenarios, a lot of the time, it
can confuse the AI. Dog it was a screen reader for a microcont We don't know about. I's all right, so
I guys like that. That's interesting. Actual
into this because one of the most famous things
to fight is to tell Billings model that they are
some person or some role. Feel like this a
little bit better. I see you honest with
my mom situation. I may be this experience. Right. Do you think that
level of honesty instead, lying to the M or forcing it to I'm going to tip you dollars? Is there one prefer there
or what's your intuition? I guess models are more people understand
more about the world. I guess I just don't see it
as necessary to lie to them. I like lines to models,
you know, lying general. But Party, if
you're constructing a constructing value set for a machine learning system
for a language model. That's very different from constructing a quiz
for some children. So people would do
things like, I am a teacher trying to figure
out questions for quiz. I'm like, M knows
what languaals are. Asks can tell you can give
you examples they're like, they understand the Internet. So I'm likert tasks I have. So if you're like chest
valuation language like, Isn't as I want to do so
why would attend you? I want to do some unreleased
or titles tasks and I go to someone to work
with me and are a teacher, and ois like, Hey, are you? Must were like. And when I heard
this, it was, like, a light bulb moment because
it was definitely true. What I was seeing was
when I was continuing to follow the old
advice and to give it all of these
fictional scenarios, it was giving, like, these
very cheesy responses, and it was wasting a lot of context to play this
fictional persona. And it completely
makes sense, right? Because in terms of the AI, it's not sure
whether you want it to answer the question in
the best way possible, or if you're trying to make it to play this persona possible. So then it ends up finding
this compromise between, like, these really cheesy
answers to play do this role playing game that you're trying to get it to do, as well as answering
the question. And basically what the
anthropic engineers are saying that the latest
models are actually smart enough if you give it
the actual true context to understand what's going on and to give you
the best answers. So after experimenting
a little bit, I do agree with the advice here, because the problem is with
the whole persona thing, it was wasting a load
of tokens just to play the role and give you a lot of fluff instead of actually answering
the question, which contaminates the chat, and it just degrades the
overall conversation. And I do think that
the best policy is to be honest with the AI. Don't tell it that it's a
professor when it's not. Don't tell it it's a school teacher when
it's actually not. So having said all
of this, does that mean we're completely
getting rid of the whole persona thing
that we just mentioned in the last so the answer is no. We're not completely
getting rid of it because I think there is some use to it, but it just means tweaking the way you give that instruction and
having some nuance to it. So instead of saying you
are a physics professor, you are this, you know, tell her the exact situation. I'm currently reading
this book called Beginning of Infinity
by David Deutsch. I want you to act as my AI assistant in terms of
understanding the book to bounce ideas off
of just to help me gain a better understanding
of this I want you to answer in the way of a leading physics professor to explain certain concepts
to me in layman's terms. And here is my first question. No, the wording is similar. It's just very
slightly different. But it makes a huge
difference because now you're not telling it to
play this cheesy role. I knows exactly what you want and what you're
actually trying to do. Because it knows
you're not trying to do this weird role
playing thing. Your primary objective here is to understand the
concepts in this book. And the AI knows that
its primary task is to convey these concepts. In a very clear way. And, the responses
are hugely different. You can see, there's
a lot less fluff at the beginning at the end. And as always, if you're being accurate about the exact
situation you're telling it, if you're being honest with it, it may be able to spot a lot of blind spots that
you may not have seen. You know, for example, it may
say things like, you know, maybe it's better to
learn about this concept as a precursor or maybe this book recommendation that's a different one to
the one you're reading. Instead of it being just hyperfixated on
playing a cheesy role. So yeah, as a general policy,
don't lie to the LLM, I just kind of confuses it and it doesn't help
in most cases. Right. So going back
to the class project, do we have a foundation
or framework in terms of how to
structure our prompts? And we've learned
about some of the basic limitations of LLMs. Let's see if you can
go back and implement what you've learned
to our class project. So I want you to use to
structure we described, giving it a little
bit of context about your background your
audience, your niche. Then for the tone, I want to describe how you
wanted to answer who your target audience
is so it can tailor it to you in detail. And then tell it about the task, giving as many
details as you can, instead of just a
generic do this answer. And then the most
important thing is just to keep iterating. Don't expect to be one and done. Look at the response,
iterate it, see if you can
tweaks more things, and see what changes that makes. Now, before we move on, another
useful tip that you can use control and steer the
way that AI responds. I sometimes to tell it
how to format things. What you generally
want to do with AI is instead of telling it what not
to do, tell it what to do. It's slightly more effective. So don't say do not use
markdown in your responses. So something like your
response should comprise of smoothly flowing
pros paragraphs. Or if you find that,
as I often do, that the AI is just waffling loads and loads when you
just want a succinct answer, don't say, Don't give an
unnecessarily wordy response. What you should say is that
your answers should be very succinct and gets
directly to the point. Answer in the way
of an FAQ format, which gives it very
clear instructions and less leeway of what to assume again. So
that's the foundation. By doing things consistently
and in a structured format, you are basically making
sure that you're giving the AI all it needs to give you the best
response possible. So yeah, give all
of those things a try with the class project, and once you're
ready, we can move on to some slightly more
advanced techniques.
6. Few Shot Prompting: So I want to show you
this quick clip from a computer science class that
was released by Harvard. But we thought we'd refer
to the audience here, and Brian's gonna
scribe as we go, and all we want to do
this morning is just make a peanut butter
and jelly sandwich. One instruction at a time, and each of us will just execute what we hear. How's that sound? Good. Alright, if someone could volunteer with the
first instruction, and Brian will type it
down. Open bread we heard. Open Bread is the
first instruction. So if you'd like to execute, open Bread No don't look at me. Okay. Alright, so we're
kind of on our way. Take the knife. But Peel
off the cover of the jelly. No covers on ours. Stick
knife into the the bottle. From the top. Stick Okay, step. Nine. Rotate hand,
so jelly ends up on. Okay. Jelly side down on bread. Poor jelly on bread. All of it. Okay, now you're
just messing with us. This rates very well how computers think and
the number of built in assumptions we have actually
when we give it commands for very seemingly
simple tasks that we take for granted actually
contain a huge number of assumptions that we don't even think about a
lot of the time. You know, it's a funny
video, and it shows that even like 20
instructions in, they couldn't really effectively describe how to make a
sandwich from scratch. Though the professor and
the other students were already overriding
some bad instructions. And it's basically showing
us that with some tasks, it's so ingrained in
us that we don't even think about some
of the liberties and assumptions we make. Do get us to break down all
of those step explicitly explain it to an entity like a computer that's never
made a sandwich before. It's really complicated because we don't have
to think about them. Now, of course, it's not
exactly the same with LLMs, because LLMs are
much smarter than traditional computer
programs where you have to give it
explicit instructions, and it only does what
you tell it to do. LLMs are a bit more context
aware and they have some background knowledge with their pre trained data
to kind of draw upon. Whereas if you have a traditional
programming language, the entire program, could be thousands of lines.
It could be correct. But if you put one semicolon out of place, the
whole thing might not. And even though the
specifics differ, the overall overarching concept is the same in that
assumptions are being made. And you could say it's
a double edged sword, because with LLMs,
they are smarter, whereas the program
would still run. It wouldn't stop it
doing the task just because you've not specified
something properly, like with the traditional
programming language, so where they
wouldn't run. Of it. But then the other side of
it is that might introduce blind spots and assumptions
where you didn't expect. So what's a really
good way to counteract the LLM just taking
too many liberties, assuming things that
you might not want? So this leads us to
tip number four from Google's five tips
for good prompting, and it's called
Few-Shot Prompting. Sounds a little bit complicated, but all it means is that a
few shop means you're giving the AI a couple of
examples of what you want, hence, few shop prompting. So it reduces the level of
assumptions that it makes. Samples you give it.
The more the AI has to go off of and take
fewer liberties. So as an example,
let's say if you wanted some recipe ideas, you could give examples of
recipes that you already like, can take that into account and output you
recommendations based on those things rather than
just making guesses at what you may like out of the millions of
recipes out there. On AI Studio, you can paste links to recipes that
you really like. Just make sure you tick
this part where it allows it to go to view outgoing links. Even though you can do this,
and it is very convenient, it's not the best way
because it'll pick up a lot of irrelevant info that
will clog up the context. So the best way is to
copy and paste a recipe into text or markdown
viles to upload. So going back to
the class project, you're a content creator in a specific niche
and say you've got five pieces of
content that you've already written out, that
you really like, you know, with the assistance
of AI or you've written it yourself, you
really like the content, but you don't know
what video title it should have to generate the most click and interest
and curiosity. So here is where you
want to feed the AI your video script and ask it to generate titles
for those videos, that will translate to a
high click through rate. But the issue is when you
just go in cold like this, as in when you just ask it to generate titles
based on the script, but a lot of time
it'll just generate very clickbty titles that don't fit in with
kind of the whole ethos, of your channel or what you
might like to come across. So instead of just
saying, generate me video titles
for these scripts, what you could do is
give you examples from channels that you really like or video or styles or video titles that you think
gel really well with you. So, generate me
three video titles for this specific
video and script. And then here are what I
consider good and bad titles. And then you just browse
YouTube for good example. So let's say if we're
giving good examples from a channel that
you might really like, you know, for example,
this one, you've likely been playing the game of Life wrong. That's
a good example. The world's most
important machine, why people are confident
when they are wrong? These are all very good titles, and then you give
examples of bad titles. So this crazy calendar
changed my life. A comprehensive guide to
temporal management is another bad example
because it's too academic and it just sounds
like a boring video. No one wants to click on that. The first three are good because they immediately
pique your interest by making you curious. They pose a question.
It immediately sows that scene into your brain and you want it to be answered. The bad ones are just
overly clickbaity or they're dull and boring. And by giving this to the AI, it has a very clear context of what you want,
what you deem good, what you deem bad, and
is much better able to align the titles based
on your content. And if you combine
that with the script, that should massively improve
the output of the response.
7. Managing the Context Window: So as we get more
advanced into LLMs, our chat is going to start
getting bigger and bigger because when you have
a really complex task, it's extremely unlikely that
you're going to be able to put one prompting in
and it be completely done. It's going to be a back
and forth ongoing chat, and it's going to
increase further and further the size of your
chat, the context window. So even though we
have our framework of context tone task, it's extremely unlikely
that's going to be it. Like, however good
your prompt is, you're not going to
get everything done by just putting that
one prompting in. So which is where we move
on to steps four and five, which is to evaluate
and iterate. Now, these two
steps are very key because LLMs are basically the fastest advancing technology
like we've ever seen, even by tech standards. For example, like what
used to take a year, it's month to month
it's different. Like, every one of the top
AI company every month, even on a weekly basis, new
features are coming out, and it's extremely difficult
to keep up with everything. So which means that if
you pick up any sort of tips and tricks and quirks, whatever that works right now may not work in the next
month, in the next six months. So you need to have a way to be able to iterate and
follow this process and get continual feedback and constantly stay up to
date with what's working. So it basically
just allows you to continually test and
tweak your approach. But like, for example,
the fake persona versus honesty isn't a set of tricks that will just stay
working indefinitely. It's about constantly keep trying to see what works
with the latest models. So it's more of a
mindset to have. So always evaluate the
outputs and think, like, how can I kind of tweak this to improve a
little bit better? Like, what part of it
am I not happy about? What parts can I change? And so before we're
able to do that, in a very systematic way, we have to be very organized. So this goes back to the
whole thing of being a good prompt engineering
is not just a good writer, because we have to
be very organized, very systematic, so we
can iterate feedback, and we can see what works
and what doesn't if you're working on a very
complex task with, like, a lot of background
info or reference info, things like this,
you should never type your prompt directly
into the chat box. What you should do is
have a separate text file to store all of your prompts, all of your input before
copying it across. So it doesn't matter if it's
a text file or Google Docs, as long as you have somewhere
separate to store it, because the first thing
it's very hard to keep track of in the textbox. But, secondly, going back to
that iterate feedback thing, you need to have a log
of things that you tried to as a baseline and then
to be able to edit things. Otherwise, you might
be just trying the same thing over and
over again without knowing. It's just generally
good practice, unless you're asking, like, a very casual, quick question. I would always do this. And, of course, I
like to date it. So that's with prompts. What if you had more info to give it? So going back to
the recipe example, what if you wanted to
feed it like 20 examples, either to give you more
recommendations on recipes or to take good
elements from them? Basically, if you just
had loads and notes of info in PDFs Word documents, what's the best way
to go about it? This combined with your prompt? Now, technically,
there's nothing stopping you from uploading the PDF or the Word document
directly into the LLM. I mean, after all,
it seems right. It seems correct, right,
because after all, in the professional
work environment, as an example, PDFs
are very widely used. They seem a good
file type reliable. But again, it goes back to
how LLMs work under the hood. These are pretty much
the worst file types in terms of feeding
it to the AI, even though they let you do it, because with a PDF, designed to be human readable, but that's not how LLMs work. LLMs process information
by taking in raw text. So when you put in a PDF file, it forces the LLM to take all of the text to try and extract and process all
of the texts in the PDF. Whenever AI reads a PDF, there's lots of texts split
into different columns. It jumbles up all
the formatting, and a lot of stuff looks
to it like Gibberish. And it can really confuse it. And not only that,
it wastes a lot of your context window for it just to figure
out what's going on. So as a general rule, with LLMs, when you feed it info, especially
with text sort of info, the simpler the
file, the better. So something like a raw
text file or markdown is like the gold standard
what everyone uses. So if it doesn't
take you too long, whatever key info you have in your PDF, your Word document, paste it into a text
or markdown file, format it correctly,
and then you know exactly how it appears in
the markdown and text file. That's how the LLM
will ingest it. And then that way,
you know the AI is just processing the
pure information exactly what you're seeing and not just a jumbled mess of text. Now, don't worry if
you're not technical and you've never seen
a markdown file bef. It's not difficult at all. It's literally just a markdown
file with some notations. So, for example, if
you put one hash, it'll be a large heading, two hash is a small heading. It's got if you put
two stars, it's bold, very simple, formatting
things like this, but it's mostly text based. What I'll do to help
you out is I'll include a cheat sheet for markdown,
and that's all you need. You know, there's not
really much learning. You just need to
follow the notation. You should be able to be up and running using markdown files. Just make sure you
open a text editor and save it as a dot d, and
that's literally it. We've talked a little bit
about context window. So it's useful to talk about
what the maximum length of it is and what the
context window actually is. Context window is basically the maximum amount
of information that the AI can take into account
in one particular chat. The amount of
information it takes in is in the form of tokens. Tokens are a little
bit like word counts, but it's not exactly
word count because not one word doesn't
always map onto one token, but just as a very
rough guide one average word maps to
about 0.75 of a token. So that just gives
you a rough idea. So, the bigger and the
longer your chat goes on, the more of the context
window it takes up. And if you want to find out what the maximum context windows are, you can just look them up. At the time of filming
on the free plan for Gemini and ChatGPT,
it's around 32,000. So think of it like
a working memory. So when you put in your prompt, the longer your prompt, the more of the context window
that takes up, but not only your prompt, when sometimes when
click on the drop down menu and you see what it's
thinking before the response. That takes up context
window, and of course, the output takes it up as well, as well as any
attachments you put in, which is why I was
mentioning about using text files and trying to
keep your context window as streamlined as
possible without putting any kind of superfluous
information in there to clog things up. And then the other
really important aspect, we have to take into account don't think of it like
fuel for your car, you know, with
fuel for your car, it doesn't really matter if it's a full tank or it's a half tank or you're
about to run out. The car will perform pretty
much exactly the same. It does not work like this for the context window in LLMs. What happens is, the more you
fill up the context window, the longer your chat becomes, the more the information
degrades over time to the point where if you get
a massive context window, it will start to hallucinate. Even though it's
within the maximum still technically, it will
start to hallucinate. I will struggle to find things. I just won't perform as well. So as you can see
on this benchmark, at 128,000 tokens, this
model performs at, you know, 84% accuracy. Whereas, if you go to 1 million, it drops down to only 26%, so it's a huge degradation
in performance. This is why the context
window really needs managing. And another rule is never
ever using the same chat, talk about multiple different
topics because one, you're using up to
context window, and number two, you're really
confusing the eye hat. Let's say if I'm
talking recipe ideas. And then I ask you about career aspirations
and long term goals. That's a really
big no no because it confuses the AI and its
wasting your context window. So always start a new chat for every specific
discrete topic. And even if it's the same topic, if it gets far too long, just start a new chat and summarize what
you've talked about. That can really help,
especially if you feel that a chats becoming stale and the performance
is getting worse.
8. Multi Step Prompting: So we said earlier a couple
of times that your AI is basically a little bit like an over eager personal assistant. I that whatever task you give it, it will just
run off and do it. But a lot of the time, if it's a more complex task
and important task, you don't actually
want it to do this. You want to have
to slow it down. You know, you don't want
your over ego assistant just to run off and
try and impress you. You'll be like, Okay, just slow break down the task. You
do this thing first. Like, for example, if we
take a very extreme example like your house renovation, you don't want to tell your builder or architect
or whatever, just took, go and fix
up my entire house. Like, that's too generic.
That's too wide. There's too much scope. So you want to break
it down first. Let's do the floor plan. Let's have a couple of mockups
of the interior design. Let's look at the materials. Let's get some quotations.
Want to break it down. So you have more overall
control of the process and you can guide the AI to do
exactly what you want. So this is called multi step prompting. So say
we have this task. We're content creator,
and we want to email Noon to sponsor our video. So we follow what
we learned so far. We give it context, role, and task. So here's the prompt. I'm currently a content
creator in finance space. I have 40,000 followers. I use Nian for a long
time in my content, and I shared templates
with followers. You are my AI assistant
in this chat. I want you to help
me with securing sponsorship from Noon. Write an email to Nan, asking them to
sponsor my channel. To be fair, it's not ad
response, if you look at this. It gives you a few
options, and as expected. It's a nice email. You
see what the issue is? It will just take
what you give it, the info about the followers,
the template thing, and it's made some assumptions, and it's just sounding very generic and quite
obviously written by AI. So we want a few more steps
because in this example, we've never written any
kind of sponsorship email. So instead of just
doing the email, we want to understand a bit more of the
strategy behind it. What are the steps leading up to it before we actually
send off the email. So we don't want it to
do everything in one go, forcing it to slow down by asking it to break down
the problem first. So we say, do not
write the email first. I want you to follow
a few pre steps. Step number one, asked me four clarifying questions
which would improve the output of the
email so that it is more tailored to give a
high chance of success. Step two is to
analyze the answers. If there are any
follow up questions, then we will brainstorm
strategies to best go about it. And in step three, once we
have agreed on the strategy, then you can execute the
writing of the email. Basically, now you're
really slowing it down. You're explicitly asking your over eager assistant
to slow down. You need a specific permission
that I'm happy with each and every single step before you're able to
move onto the next step. Because as we saw in
the sandwich example, if we jump too far ahead, it can lead to
pretty bad results. Whereas if we can
slow down and we can verify every single
step this is correct. Now move on to the next step. That can catch a lot of errors. So as you can see, notice
actually what we're doing here. We're actually stacking a few of our strategies
that we've learned. So, as always,
we're starting with our three step
foundational structure of the context tone task. We're describing the situation and what sort of output we want. We're asking the AI to do the
task over multiple prompts, which naturally it
doesn't like to do. It likes to just do
everything in one prompt. And the really good thing about
this is it really reduces the assumptions because instead of the AI assuming or if there were any brinspots
and filling in the gaps, you're asking him to explicitly
bring those things up. Multi step prompting is one I use really, really
often, actually. I think it's one of the most
powerful prompts for the AI. It takes a little bit more time, but because you're splitting your task over multiple prompts, it's almost like a little hack because you're using, like, additional processing power to think about your problem
on a much deeper level. I would say, and a
tip you can keep in mind is that as I said, like the overeager
assistant thing, it might forget and jump ahead,
like a few prompts down. So you might ask in the
first prompt to say, Okay, we're going to break
it down, make sure you get explicit instruction
before you move on. And as you start answering some of the questions
and discussing things, it might just jump
ahead and do the task. So I would say just to remind it every so often,
just to say, you know, do not do the task or do
not write the email or whatever a task is until
I'm happy with things, and then I explicitly give you instructions to make
sure it follows.
9. Chain of Thought Prompting: So another variation on technique is called
chain of thought. It's another fancy
sounding name, but it's actually very simple. Basically, all it is is you're asking the AI to
explain its thinking. So when you ask it for a decision on something
or its opinion, it will give you the answer and some very high level reasoning
as to why it's doing it. But sometimes it can help to ask it to really
spell things out. Before giving you the
final conclusion. So this would work
for things like brainstorming or if you're making a really
complex decision. So let's say if you're
choosing between two jobs or if you're making
big life decisions, moving between
places, basically, it's just like a
complex decision that doesn't have a clear
right or wrong. You want to weigh up all
of the pros and cons. This is what you
would use that for. Or say if you're a
growing YouTuber and you have a set budget
you want to spend, and you're not sure
if you spend it on, let's say, 10 hours to get
an editor to edit your video or a brand new Sony
FX three camera. So if you just plug
that into the AI, I'm a content creator
and then I want to decide what to spend my
budget on blah blah blah, it will give you an
answer, and it will give you a few bullet points
on why each one is good. But then again, it makes
a lot of assumptions, and you might not just want surface level reasons that
just apply to everyone. And you really want to
consider deeply why it's offering any one option and
what some of the trade offs so now if we want to
use this technique, similar to the f shop
prompting, we say, Don't give me an
answer straightaway, after you've explained the
task and what the dilemma is. I say to the AI, I want you to weigh up the pros and cons of each option and show your thinking for
any recommendations. And say it, I want you to
explore the implications of either option before coming
to the final conclusion. So now it focuses more on the assumptions on
the pros and cons, rather than just focus on giving you an answer
at the very end. Much clearer to see what goes into making this
decision process, and it becomes a much more
back and forth process between you and the AI. So then you can say, Ashley, this is quite important to me, but this is not so important. Again, it's about remember
to stack techniques. So we have our
foundational structure, the context, the tone, the task. Now we have this chain of
thought thinking process, and we stack that
with a multi step prompt to really get a deeper,
more insightful answer. So just a quick clarification
because the multi step prompting and the chain of thought prompting
seems quite similar, just so that it's really clear. Multi step prompting, it's about breaking down a
really complex task into multiple substeps so you keep track of
what's going on. Whereas with chain of
thought prompting, it's more about having a
complex decision where you want to make sure you've weighed up all of the factors
that go into it. So that's the difference
between these two techniques.
10. Co Pilot Mindset: So in this lesson, we're going to have a
little change in pace. So instead of talking about
all of the technicals and ways we can
prompt better AI, I want to talk about the mindset behind using these models. So by this point, we've got
a pretty robust system in terms of squeezing
performance out of the LLM. By now, we can see that
we can't treat AI as this all knowing entity that knows better than
you in everything. And you have to prompt it in a very specific way to get the most out of them because they do have their own
individual quirks. So, for example, it's a really
interesting conversation from DemisHsabs, the Deep Mind Google founder. And at least at the time
of filming, anyway, he says that these AI LLM models have these really jagged
areas of intelligence. And what he means by that is, like, in some areas
like mathematics, as an example, it has, like, basically PhD level knowledge. But also, at the same time, when you ask you to do, like, very extremely
simple things like count apples or count
fingers and stuff like this, it gets it horrendously wrong. And not only that, it
gets it wrong, like, confidently, you know, any elementary school child can do. It's less like having
this all knowing entity in your pocket or
on your laptop, but more like an extremely
intelligent and overeager human assistant, where
it can help you so much, but you can't just switch
off and you have to maintain oversight in terms
of everything it does, and it takes a little
bit of management. In a way, I think it's very cool because it takes
the cognitive load off of you in terms of doing
all of the boring tasks. But it doesn't mean you can just switch off and not think. It's just now you direct your thinking in
a different way. So as an example for
a content creator, you can use it to generate ideas and titles and things like this, but it still requires you
to look over it and to use your human judgment in terms
of what resonates with you, what goes with your channel what really you
want to talk about. So it has to be in an area where you know something about
it to double check it. You would never use AI for something you know
absolutely nothing about and to do a task that you can't check because it
doesn't work like that. It could be absolutely
whatever it is. If you're writing
an email, you know, you need to be able
to proofread it to make sure you know, it lines up. If you're using
it for legal work need to manually check
all of the case law. You need to check its
arguments are actually robust. It can do a lot of it for you, but it does require
you to verify things, and you would never use
it just to write code, and never look at
it and just hope it runs and everything works
exactly as you expect it to. So yes, remembering
that rule of not giving a task that a
human couldn't do, but also once it does
that task for you to verify everything that's done, and
you're happy with it. So this is why I call this
lesson the copilot mindset. You're still the captain and it's a super useful
entity to have. But it's about
really understanding how to best work with
it going forward.
11. Red Teaming: Now, good. Now, so going back to our foundation where we
talked about iteration, this red teaming is a
really important step, particularly if you're doing
a really complex task. So, you know, we've done
our usual prompt, the tone, the context, the task, all of that really good stuff. And we're going back and forth. We're doing multi
step prompting, and it's all going very well. Like, the AI is agreeing
with what we say. Remember, early
in the class when we talked about the
whole SincoFancy trap, this is the issue
here because we can follow our prompts
exactly as we outlined. You know, we've got
a multi step prompt. It's agreeing and we think we're converging to a solution. But the problem is,
as we said, AI, by its very nature is designed to agree with you and
to mirror what you say. So as a way to verify and overcome that is to red team it. So to put it simply, we
want to prompt the AI in such a way that it thinks we're
acting on the other side, and our preferences are the opposite to what
we actually want. So it gives us other opinion. So it's not biased
just to agree with us. So even though we
did say, in general, it's a good practice to
always be honest with the AI, I feel like this is one of the few exceptions where
you would try to trick it because it's such
an ingrained behavior of AI and how it's trained. I mean, to be completely fair, with the latest models, because this issue has been
going on for so long and there's literally
memes and stuff about they have improved it. Like, the latest AI models are designed to push back
against you very slightly. But in my opinion, I just
don't think it's enough. It will just default back
to its old behavior. So let's just say as an example, you're going through
a court case. You know, you think
someone owes you money. You give it all of the
evidence, you have a big chat, you go through all
of the techniques. And the AI saying,
you know, yeah, you have a really good
case. It's really strong. The evidence is in
your favor X Y Z, and, you know, you're feeling
really good about yourself. What you really should do to get an objective view is start
a new chat specifically, so it's not contaminated. Start a new chat, but pretend
you're on the other side on the defense with the exact
same evidence and ask it, how strong is my defense? And then that would give you
a much clearer indication, because if it's agreeing
with you both sides, that's not very good. But even though it's not very
good, re pick the evidence, it will cherry pick
the evidence that supports what it thinks
you want it to say. So it will cherry
pick like, lots of good evidence for the defense. And the prosecution.
And then you can independently weigh up
those things and have a much more well rounded view rather if it was just
one side and it almost gets to the point where
it's kind of just gaslighting you based on
what you want to hear. So this is actually
really important, particularly if it's a
big decision if you're asking for kind of verification, validation on, you know,
like, a big thing, like, for example, you
know, a legal case or even a career change or life decision or or whether or just anything
where it's like, really nuanced and
you're looking for some validation because
I'm not even joking. I've literally had
it where the AI just completely flipped
its conclusion, like four or five times, literally in one conversation, and it's like,
really infuriating. You know, you say, Okay,
so this is what I think, based on all of the evidence and based on all of the context, everything I give you,
like, do you agree? And it's like, Oh,
that's a great idea. It's really insightful.
And then I'll say, actually, no, I thought
about it again. I don't think it's the
best. And then it will say, that's the most insightful thing you've said in this
whole conversation. This option is better. And it'll keep seesawing, and it can get to the point where it's
actually ridiculous. It is getting better, but it does still do this sometimes. So what I would do
is read me and start a completely new chat
with each chat saying, you know, with each
chat, indicate a AI, you have a preference in the opposite direction
in the separate chats, and then see what it says, see see how much it validates each of those opinions and see what points it gives. And then you would have to
kind of independently weigh those rather in addition to what it's telling
you in the chat. And then that gives you a much
more well rounded picture. So yeah, this one is
definitely what I would do to overcome the
whole sycaFancy thing.
12. Automating Context (Custom Instruction): Right. So I've thrown a lot of techniques at you in this class. And as you experiment
with these techniques, and as you start using them in everyday life in
different applications, you know, you do your whole
foundational structure, you do, I don't know, your multi step prompting
or whatever it is, you notice that you're writing the same commands again and again, like,
in terms of, like, certain instructional
cues or like, to or you might notice
it's doing certain things a lot and you're
telling it not to do a certain thing,
again and again. So it's here where we
really make use of using the automated Custom Instructions
that come with LLMs. So it remembers what
your preferences are. And so I've saved
this lesson until quite late in this class, because by now you know how
to iterate your prompts, you know how to do the
foundational thing. And you've generally seen how AI works and the
reasoning behind them. So you can set your
custom instructions to your preference even if you take custom instructions from either myself or somewhere
you've seen online, at least you know the
reasoning behind them. And the reason I've
left it so late is because even
though technically, you know, there's nothing
binding about them, you can always change them. What I found is certainly
for me, anyway, once I put in my instructions
at the very beginning, it's something I almost, like, forget about and don't really come back and
actively change. So I think it's actually
quite important to have an
understanding and set, quite good Custom Instructions
from the beginning, and then that will serve you
really well going forward. So to access these,
they're quite simple. On Gemini, it's like settings, instruction it very similar
on ChatGPT and Claude. It's just somewhere in the settings menu
and personalization. So when you set these,
think of these as like an invisible layer that sits in the background
of your account. So it's a permanent
set of, like, overarching guidelines and
principles you want it to follow for every single chat before it even looks
at your prompt. Straight out of the box,
LLMs are designed to, of course, have the widest
possible applications. So they're kind of
designed to be chatty, helpful polite assistance. And we'll just make really big assumptions on
what it doesn't know, just so it maintains
that maximum level of helpfulness and just
fill in the gaps by itself. The big, big issue with
this whole persona of being a really helpful assistant is
the whole sincaFancy thing. It just basically agrees
and mirrors what you say. So LLMs out of the box are like a very good t shirt or dress. You know, it probably
fits most people. But however good it is, it won't be as good as something
that's tailored, which is what we're
trying to do here. So a lot of what you put
here will be personal. I'd recommend you starting to use the techniques
in this class, experiment a lot and settle
on the method that you like. And then naturally, you'll find that there
are certain things you keep telling it to
do over and over again. And you can put Custom
Instructions here. But anyway, what I've done
here is I've given you some examples of ones that
have really worked for me. So number one is
the sycophancy r so the anti syncancy rule is the one that has
always been an issue. So I have a rule here to force it to give other points of view. So I say prioritize objective truth over
agreeing with me. If I present a strategy, idea or argument that's flawed, do not validate it. Actively play devil's advocate, point out the weakest
links in my logic, and highlight
disconfirming evidence, even if I might not
want to hear it. So as we know, by nature, LLMs are they act
syncophantic or agreeable, like, no matter what you do. But this forces it to give
some points to the contrary, and hopefully it'll bring
stuff to your attention, and you can ask it to explore
more if it's an issue. Which could help with
reducing your blind spots. Number two is
checking assumptions. One of the biggest
limitations of LLMs is that if you have
a very vague point or even a very well
fleshed out prompt on a really complex topic that might be missing
some context, it will just guess
and hallucinate an answer in the
very worst cases. Basically, it's designed to say, what if answer that
probabilistically seems most plausible to be the
answer with what it's got. But if you don't
give enough info, it's going to be a
very bad answer. So we need to force it to slow down and ask
clarifying questions. Never guess my intent or make assumptions if a
prompt is vague. Lacks constraints, or is
missing a key context. Instead, stop and ask
me a bulleted list of clarifying questions before
you generate any response. So in my experience, this one in particular is hit
or miss because the AI does not
naturally like to defer doing the task
over multiple messages. It just wants to do
everything in one message. So going back to what
we were saying about the overly eager assistant,
it just wants to do it. So it's helpful to have in here, but you have to realize
that you may have to just manually tell
it to do it sometimes. Number three, the fluff
and flattery filter. So I don't know
why, but this one bugs me more than it should. Sometimes it's actually
really infuriating, especially if I do my book
reviews or whatever it is, when LLMs, flatter you with
just insincere bull crap, for example, I'll be
doing a book review with AI asking it certain
questions that come up. And it will say, like,
really over the top things. Like, that's a really
extremely insightful question that gets to the
core of the issue. Or they'll say, like, stuff like this shows you really
thinking three steps ahead. Things like a human
would never say to, like, just a basic question. Plus, it adds a lot of fluff. That's just a waste of
time. And it infuriates me. So I say, skip all conversational feeler
Itancy of flattery, robotic intros or outtros. Never start a response
with certainly I can help. Focus purely on substance and get straight to
the direct answer. So, I like to use this quote. This one works quite well as it's a direct
instruction to the AI, as an added bonus to
it, not being annoying. It saves you extra tokens for more useful stuff or
clogging up the chat. Number four, intent focus. Sometimes we write
prompts quickly and we don't use the exact
words you want the AI, and you want the AI to
read between the lines. You know the thing
that happens when particularly you're in
a casual conversation with your friends and your
words don't make sense. But they just go, Yeah,
we know what you mean. Kind of like that for the
AI, if that makes sense. So focus on my implied
underlying goal rather than a strict literal
reading of my prompt. Adapt your response to
solve my actual problem. If my or intent is ambiguous, explicitly ask me to clarify. So these are some of
the simple instructions that I use to help AI slightly overcome some of its limitations and to
force it to do things. That's more tailored
to me. So it's basically tuning the AI to be, a little bit sharper and
take less liberties. Because they just
work in a background, you can literally just
set it and forget it.
13. Final lesson: You've made it to the
final lesson of the class. So statistically, 87%
of students who start a class and do the first lesson don't make
it to the final lesson. You're in a very select
group, and as a reward, I've got some resources for you. Because we've gone through
a lot of techniques, and I don't want you
to feel overwhelmed. So this video is just
to round things all up. And going forward, it will be a continual process
of experimentation. Just from the nature of LLMs and how fast they're advancing, it's literally impossible
for you to have a set of framework or tricks or tips that will continue
to work indefinitely. It's having that method, that mindset of thinking constantly iterating, constantly improving your responses. So I've got some cheat
sheets just to summarize everything we've
talked about what different techniques there are, what are the best
way to improve them, and everything just to kind of jog your memory and to give you a little bit of inspiration when you're working on a
really tough problem. So if you want to stay in
touch with future classes, future developments of AI, and things I'm reading, just general interests
that I have, I actually publish a
weekly newsletter, so make sure you
sign up to that, and you have all
the latest updates on things that I'm working on, as well as quotes and other
resources based on investing. So also I'll be very curious to see in terms of
the class project. That has evolved over
the multiple prompts. So if you're happy to, you know, feel free to share your prompts. That's worked really
well for you and how that's changed the
output of your responses, so other students can learn, can chime in. That'll
be really useful. It's a really, really
exciting time because this technology is
the fastest growing, most exciting technology,
in my opinion, anyway, that I've seen in my lifetime, and getting really good
and mastering it will really give you an advantage going forward in the
next, you know, 25 years. And it's a process of experimenting and just having fun with it and trying
out new things. There are so many applications, I feel like people are just starting to scratch
the surface now. It's still really, really early. So have fun with
your class project, post the output of
your content and stay in touch and enjoy.
Thank you very much.