Well, this is good news.
You've you've decided to come back for more.
You weren't put off thoroughly by what we did yesterday.
You're back for more.
Welcome.
Welcome to week one.
Day two.
Now, look, I am a a learning by doing type.
The way that that I like to teach is the way that I like to learn myself, which is by going in there
into a product and using it.
But today is a little bit of an odd one out.
Today it's going to be more talking than usual.
I'm going to be giving you some foundational, some some basis for everything that is to come.
We're going to be talking about Agentic, AI and also some of the constructs around ten, but there'll
be a bit of doing as well, never fear.
Let's get started.
Let me tell you more about Agentic AI.
Okay, so diving right in the first topic is AI agents.
Before we go back to Na ten again.
And this is a quick recap of what we already said yesterday.
There are so many ways to define an AI agent.
It's almost become a joke, but some of the the ways that are most common.
Originally, companies like OpenAI described it as systems that can work for you independently, like
the operator agent now GPT ChatGPT agent.
And then there came this this emerging definition, which was about AI systems, where an LLM decides
what to do next.
It generates content and that content describes, hey, let's do A and then B, and then C, or maybe
we should do A and then C and then b, and that, that, that is the output that comes from calling
an LLM.
And we interpret that output and say okay that's what we'll do.
So that idea, that concept where an LLM decides the order of activities, orchestrates the workflow
that became the working definition.
But more recently it has become this idea that that an agent is where you have an LLM running tools
in a loop to achieve a goal.
Okay, let's let's go deeper into agent K.
There's a lot about Agentic AI that feels kind of magical.
But sitting behind all of that, the reality of Agentic AI is actually something that's quite pedestrian.
Most of the magical stuff in AI just comes down to writing good prompts to llms.
The prompt, of course, is just what we call the input.
The text that's sent to an LLM and LLM, a large language model.
As we said, it's this this data science piece of of this algorithm, this bit of statistics that takes
an input and it generates an output.
And the way that it, that it does that is by trying to figure out what's the most likely thing to come
next after this input and this input, we call the prompt.
And when you actually call one of these llms, every call is stateless.
It takes that input, it generates the output.
It doesn't know how it was called before.
It's been called by all sorts of people around the world all the time.
If it's like GPT, it gets an input sequence and it generates an output sequence based on it.
And what we can do with two things that we can do.
We can decide what input to send it, and we can decide what we're going to do with the output.
And most of our genetic AI is about those two activities getting the right input and interpreting the
output.
And that's really it.
Now, I imagine many of you know this already, but typically this input sequence, this input text
that goes to an LLM consists of a number of different parts.
It often starts with something called the system prompt.
And the system prompt is a bit of text that gives the overall context.
It sets the scene.
It tells the LLM what role it's playing, any background information, any style that it should respond
in.
That's that's in the part that's called the system prompt.
And then often after that comes a user prompt.
And that is the specific message which the LLM should respond to in the content it generates.
And you can also have in there the whole conversation so far.
The original user prompt that was like hi there.
The llms response to that, the next user prompt, another response, and finally the user prompt that
it's now responding to.
All of that can go in this one input sequence.
And this works well because when we trained this LLM, when it was given tons of data to analyze so
that it can match patterns in the future, that data was given to train was organized this way.
Typically with this system prompt at the start and then user and an assistant response, another user
message.
And because it's seen lots of data in that format, it's good at generating coherent outputs that sort
of adheres to this structure.
And that's why it works so well, because the training data was organized that way.
And I mentioned this before, but the the key is that we get to decide how to organize that input data,
and we can do all sorts of tricks to it to make it most likely that what the LLM generates, the outputs
that it's pattern matching decides are the right outputs.
It's going to be consistent with our business objective, so we can come up with clever techniques that
we will go through to make it more and more likely that we'll be able to get the right kind of output.
And when I say the right kind of output, we can choose how we interpret that output, and we can interpret
it in different ways at our whim so that it can achieve something, something cool that we want to do.
As I say, I gave the example before that the input could say something like please respond with what
order I should do things.
And then the output might be you should do things in this order, and we can interpret that and use
that to then execute other steps in a process.
In other words, we're treating this text output as if it's controlling a workflow.
So this idea of deciding how we will use this input and how we will interpret the output, this this
is really the sort of secret sauce that makes up a genetic AI.
It all comes down to clever prompting.
And sometimes people have have changed the language a bit.
In the old days we used to talk about prompt engineering, which is a bit old hat.
Now, the idea of figuring out the best way to prompt an LLM.
The new term is context engineering, which is about how best to set up this context in what gets sent
to the LLM to really position it to achieve our business objective.
That's what it's all about.
So most of the magic behind the sky can be explained with five tricks.
Five conjuring tricks that we use.
That's all built around how we prompt and a little bit of how we train LMS.
And then I also want to mention a trap, which is a common pitfall, a common mistake that people can
make with their genetic AI.
And so the five tricks that we will cover there is something called the illusion of memory, which is
a fairly simple one that probably many of you know already.
There's the thinking and reasoning idea and reasoning budgets.
There's chaining LMS together, there's the use of tools, what it is and what it's not.
And then there is the famous agent loop and then the trap.
The trap is what I call the human trap.
And you may not know what on earth I'm talking about, but we will get to it.
Let's let's now cover the five tricks and the one trap of a genetic AI.