WEBVTT

00:00:00.160 --> 00:00:04.140
Now, besides these different agent types,
there also are a couple

00:00:04.200 --> 00:00:07.460
of other things you can configure here
if you click on this gear

00:00:07.600 --> 00:00:11.460
icon. For example, there
is this prompt files feature,

00:00:11.500 --> 00:00:15.360
and the idea behind the prompt file
feature is that you might have certain

00:00:15.440 --> 00:00:18.320
prompts that you run over and over again.

00:00:18.380 --> 00:00:22.160
For example,
let's say we want to analyze our code

00:00:22.220 --> 00:00:26.120
use all common best practices.
So we could have a prompt like this,

00:00:26.160 --> 00:00:30.100
our code in a certain file and check
if we're using common Python best

00:00:30.160 --> 00:00:32.980
if we're violating any Python rules
or patterns.

00:00:32.990 --> 00:00:35.740
And of course,
this could also be a more complex prompt.

00:00:35.760 --> 00:00:39.440
Now, chances are that
if you're working in a more complex

00:00:39.480 --> 00:00:42.629
prompts like this over and over again,
which of course is annoying.

00:00:42.680 --> 00:00:44.470
That's the idea behind prompt files.

00:00:44.500 --> 00:00:48.220
You can take that prompt,
create a prompt file, and you can also

00:00:48.260 --> 00:00:51.960
simply do this through a command,
configure prompt files or

00:00:52.040 --> 00:00:55.720
new prompt file,
and then choose whether you want to store

00:00:55.780 --> 00:00:59.660
data so that it works across multiple
projects or in your local GitHub

00:00:59.780 --> 00:01:03.560
prompts folder in this project to have a
prompt file for this project.

00:01:03.580 --> 00:01:07.530
And I'll use that,
and I'll name it analyze

00:01:07.540 --> 00:01:11.100
code. If we now hit enter, we end up in a

00:01:11.140 --> 00:01:14.760
markdown file, and in here,
we put our prompt.

00:01:14.840 --> 00:01:18.560
Now, you can give this prompt file a name,

00:01:18.580 --> 00:01:21.480
metadata field here, and also description.

00:01:21.540 --> 00:01:25.500
You can choose for
which agent type it will apply,

00:01:25.560 --> 00:01:29.240
the agent mode, the ask mode,
the edit mode, or you can use your custom

00:01:29.320 --> 00:01:33.180
agents. Interestingly, plan
is listed as a custom agent here,

00:01:33.200 --> 00:01:37.070
but my research agent is also here,
and I want to use the ask agent

00:01:37.070 --> 00:01:41.060
indeed. And then of course,
I don't wanna hard code

00:01:41.560 --> 00:01:45.460
a reference like this in here,
but instead, you can use

00:01:45.560 --> 00:01:49.240
variables with curly braces and then,
for example, specify

00:01:49.320 --> 00:01:53.200
file as a variable.
The official documentation lists all the

00:01:53.300 --> 00:01:57.240
options you have for setting up such a
prompt file,

00:01:57.280 --> 00:02:01.140
can specify,
and you'll find a link to

00:02:01.180 --> 00:02:05.120
this lecture, of course. Now,
with such a prompt file defined,

00:02:05.180 --> 00:02:08.758
you can go to your agent chat
and then type a forward

00:02:08.840 --> 00:02:12.769
slash.
This brings up a list of commands you can

00:02:12.820 --> 00:02:16.390
to these commands later too. But here,
you'll also find this

00:02:16.390 --> 00:02:19.720
analyze code command, which
is this prompt file.

00:02:19.760 --> 00:02:23.520
Now,
I'll just also specify my main.py file

00:02:23.560 --> 00:02:27.540
input like this and switch to ask mode.

00:02:27.560 --> 00:02:31.420
If I now hit enter, this prompt, which
is defined in the prompt

00:02:31.500 --> 00:02:35.320
file, will be executed on this file here,
and

00:02:35.380 --> 00:02:38.609
that, of course,
is there for a very useful way of defining

00:02:38.780 --> 00:02:42.660
reusable prompts or instructions,
which you may need in different

00:02:42.680 --> 00:02:46.660
places or at different times in your
project.
