WEBVTT

1
00:00:01.799 --> 00:00:09.880
Now, if you're using GitHub Copilot Chat, you also should know at least some things

2
00:00:09.880 --> 00:00:16.600
about prompt engineering, because yes, it is a term that's sometimes used with a lot

3
00:00:16.600 --> 00:00:22.880
of hype attached to it, but being able to write good prompts is really important when

4
00:00:22.840 --> 00:00:31.600
using AI tools like GitHub Copilot Chat, because ultimately good prompts will yield better

5
00:00:31.600 --> 00:00:32.119
results.

6
00:00:32.299 --> 00:00:35.400
That's simply how these AI tools work.

7
00:00:35.700 --> 00:00:37.340
So you need to have some basics here.

8
00:00:39.019 --> 00:00:45.660
You can go through my entire AI course if you want to learn all about working with AI

9
00:00:45.660 --> 00:00:51.120
efficiently, but here are at least some basics you should be aware of when working with GitHub

10
00:00:51.160 --> 00:00:56.100
Copilot Chat or these coding focused AI tools in general.

11
00:00:58.040 --> 00:01:03.740
And the first important hint, which might sound obvious, but which many people get wrong,

12
00:01:04.180 --> 00:01:05.800
is that you should be specific.

13
00:01:07.880 --> 00:01:15.640
A good prompt contains the information and just the information the AI needs to fulfill

14
00:01:15.640 --> 00:01:16.620
your request.

15
00:01:17.880 --> 00:01:23.920
But that also means that you should clearly specify your intent and add any important

16
00:01:23.920 --> 00:01:29.620
context that's needed to generate a response, but nothing else.

17
00:01:30.320 --> 00:01:35.500
Don't add too much information because that can lead to worse results, but also don't

18
00:01:35.500 --> 00:01:37.460
add too little information.

19
00:01:40.000 --> 00:01:42.740
Also consider adding examples.

20
00:01:43.240 --> 00:01:49.460
Now that won't be needed all the time, but for certain tasks it can really get you better

21
00:01:49.460 --> 00:01:50.060
results.

22
00:01:51.000 --> 00:01:55.660
And I will show you some examples for these techniques and how to write good prompts in

23
00:01:55.660 --> 00:01:57.080
the next lecture, of course.

24
00:01:58.460 --> 00:02:00.100
So that's another important thing.

25
00:02:01.000 --> 00:02:08.880
Also if you're looking for a more complex task that should be done, consider splitting

26
00:02:08.880 --> 00:02:09.360
it up.

27
00:02:11.120 --> 00:02:19.580
If you want to get the AI to generate a lot of complex code all in one step, chances are

28
00:02:19.580 --> 00:02:23.420
higher that it'll mess up in one place or the other.

29
00:02:23.680 --> 00:02:29.440
Chances are high that it will hallucinate in parts of your code or all of your code.

30
00:02:30.800 --> 00:02:35.780
So split up complex tasks to minimize that danger.

31
00:02:36.080 --> 00:02:41.040
You won't be able to get rid of it entirely, that's just how these AIs work, but you can

32
00:02:41.000 --> 00:02:43.120
at least minimize the danger.

33
00:02:45.160 --> 00:02:52.140
And finally, also iterate over those results that are generated by the AI.

34
00:02:53.260 --> 00:02:58.880
Improve it over time by sending follow-up prompts, but, and that's really important

35
00:02:58.880 --> 00:03:05.580
because it's probably one of the biggest pitfalls that is out there, don't forget that you're

36
00:03:05.580 --> 00:03:06.280
a developer.

37
00:03:07.920 --> 00:03:12.020
You are a developer, you're not limited to just using the AI.

38
00:03:12.340 --> 00:03:19.060
So use it as a tool, iterate to improve the result, but also know when to stop and when

39
00:03:19.060 --> 00:03:21.540
to take over and write code on your own.

40
00:03:22.320 --> 00:03:27.560
And even if it's just to get the AI back on track, but don't forget that you're a developer.

41
00:03:27.740 --> 00:03:32.440
That's super important, you'll see it in the next lectures, I'll show you some examples

42
00:03:32.440 --> 00:03:35.800
and you'll see it later in the course when we build an entire project.

43
00:03:36.560 --> 00:03:42.500
It's too easy to get lost in the AI world and become less efficient, which is horrible.

44
00:03:43.240 --> 00:03:46.040
So these are the basics, now let's see some examples.

