Now, when working with AI agents, a key part of your entire
work is writing good prompts and providing the right
context. Now, in simple projects like this,
file, the AI, as you saw, will typically do a good job
at finding the relevant files and gathering the relevant
context. And, in general, over time, AI models and these tools
get better, so they tend to get the context they
need. But context is a key word here
because when working with these agents, you should
try to craft good prompts. Prompt engineering is important
because good prompts yield better results.
And that starts with being specific, just as you would try to
be specific if you gave a coworker a
task. It's also about providing useful context,
though, to steer the AI in the right direction.
And that's even useful if you think the AI
will do a good job at finding the right context because explicitly
giving the AI the context you know it needs is, of course, better
than hoping that it will discover it.
It's also potentially about providing useful examples depending on the
task, and an example could be an example you put
But it could also be a pointer at some other file where you already have an
example. And you wanna split complex
tasks. You don't wanna have one prompt for
your entire super complex project.
Instead, you wanna build it feature by feature with
sessions where every session is about one feature or one
part of a feature because you will get better results if you focus
on specific tasks instead of asking for everything in one
go. And it's also about iterating, iterating to
improve the result because it's a chat.
You can ask follow-up questions or ask for follow-up
edits. But don't get lost in iteration
hell. If you see that you're going nowhere and it fails
consistently to fix a certain problem, fix it yourself,
start a new session. Don't keep on iterating forever.
You'll just burn tokens, which you, of course, are
paying.