Now, if you're using GitHub Copilot Chat, you also should know at least some things
about prompt engineering, because yes, it is a term that's sometimes used with a lot
of hype attached to it, but being able to write good prompts is really important when
using AI tools like GitHub Copilot Chat, because ultimately good prompts will yield better
results.
That's simply how these AI tools work.
So you need to have some basics here.
You can go through my entire AI course if you want to learn all about working with AI
efficiently, but here are at least some basics you should be aware of when working with GitHub
Copilot Chat or these coding focused AI tools in general.
And the first important hint, which might sound obvious, but which many people get wrong,
is that you should be specific.
A good prompt contains the information and just the information the AI needs to fulfill
your request.
But that also means that you should clearly specify your intent and add any important
context that's needed to generate a response, but nothing else.
Don't add too much information because that can lead to worse results, but also don't
add too little information.
Also consider adding examples.
Now that won't be needed all the time, but for certain tasks it can really get you better
results.
And I will show you some examples for these techniques and how to write good prompts in
the next lecture, of course.
So that's another important thing.
Also if you're looking for a more complex task that should be done, consider splitting
it up.
If you want to get the AI to generate a lot of complex code all in one step, chances are
higher that it'll mess up in one place or the other.
Chances are high that it will hallucinate in parts of your code or all of your code.
So split up complex tasks to minimize that danger.
You won't be able to get rid of it entirely, that's just how these AIs work, but you can
at least minimize the danger.
And finally, also iterate over those results that are generated by the AI.
Improve it over time by sending follow-up prompts, but, and that's really important
because it's probably one of the biggest pitfalls that is out there, don't forget that you're
a developer.
You are a developer, you're not limited to just using the AI.
So use it as a tool, iterate to improve the result, but also know when to stop and when
to take over and write code on your own.
And even if it's just to get the AI back on track, but don't forget that you're a developer.
That's super important, you'll see it in the next lectures, I'll show you some examples
and you'll see it later in the course when we build an entire project.
It's too easy to get lost in the AI world and become less efficient, which is horrible.
So these are the basics, now let's see some examples.