WEBVTT

00:02.000 --> 00:04.560
So how do we get started building a new app?

00:04.920 --> 00:13.600
We could go directly into cursor and say something like build a flashcards app, and cursor will probably

00:13.600 --> 00:20.040
build something decent, but it is very unlikely it will match our expectations and we will need to

00:20.040 --> 00:21.880
have a long conversation.

00:21.920 --> 00:25.800
Practically a lot of back and forth to get all the details right.

00:26.080 --> 00:28.920
So this process is not really optimal.

00:29.280 --> 00:35.560
Instead, it is best to invest some time in the beginning and create a proper specification, or how

00:35.560 --> 00:40.400
it is sometimes referred to as a product requirements document PRD.

00:41.040 --> 00:48.320
And this is a key step in building a proper software, because the AI cannot know what is inside our

00:48.320 --> 00:48.840
head.

00:48.840 --> 00:55.000
So we may know already how the app should look like, but we're going to say that the AI doesn't know

00:55.000 --> 00:55.760
what we want.

00:55.800 --> 00:58.000
So we need to be really, really specific.

00:58.400 --> 01:01.750
So this is why this is a key step in building any software.

01:01.750 --> 01:04.470
Even if you think, oh, this is a relatively small app.

01:04.630 --> 01:06.870
It should be self-explanatory.

01:06.990 --> 01:08.750
Well, nothing really is.

01:09.390 --> 01:15.790
So for the process of creating this PRD, we can use cursor directory and have a conversation here,

01:15.790 --> 01:18.870
because in itself we have here the agent mode.

01:18.870 --> 01:24.510
But we can also have here the ask mode that pretty much the chat mode and say, hey, I'm trying to

01:24.510 --> 01:25.350
build this app.

01:25.350 --> 01:30.990
Can you come up with product requirements document and something like that?

01:31.350 --> 01:35.190
But ideally what I like to use is a regular LM.

01:35.670 --> 01:37.630
In this case I'm using ChatGPT.

01:37.670 --> 01:42.070
But you can use Gemini from Google or something from anthropic or anything else.

01:42.070 --> 01:43.990
Doesn't really matter so much.

01:44.510 --> 01:48.070
It's more important to have this conversation in the beginning.

01:48.670 --> 01:55.230
And if you don't know exactly what you're trying to build, just use ChatGPT to ask questions.

01:55.230 --> 02:01.460
Trying essentially to consult with a chatbot in terms of what are your options to building something

02:01.460 --> 02:06.460
like that and how this PRD document can definitely look like?

02:06.500 --> 02:10.660
And so if you don't know exactly which technology you should use or how exactly you should build something

02:10.660 --> 02:14.620
like that, do have this exploring conversation in the beginning.

02:14.660 --> 02:17.580
Don't try to do everything in one shot.

02:17.620 --> 02:21.940
That would be in a technical language, like a zero shot prompt.

02:22.460 --> 02:24.980
Just sending something and expecting it to work.

02:25.260 --> 02:27.260
It generally doesn't work like that.

02:27.380 --> 02:33.020
So for this flashcard application, I'm gonna attach an initial prompt as a resource to this lecture

02:33.020 --> 02:33.980
as a text file.

02:34.220 --> 02:41.220
This is exactly what I'm going to use next in order to get ChatGPT to write this PRD document, which

02:41.220 --> 02:44.340
is essentially a specification for our application.

02:44.900 --> 02:48.060
So we're going to go ahead and see exactly what's going on here.

02:48.100 --> 02:49.580
I'm going to submit it first.

02:49.980 --> 02:53.140
And we're going to take a look at exactly what it's saying.

02:53.140 --> 02:55.900
So I need to write a software specification.

02:56.220 --> 02:57.940
And I need your help writing it.

02:57.940 --> 03:03.570
I'm describing here what I'm trying to build, and I already know which technology I want to use.

03:04.050 --> 03:08.770
And also I'm listing here the features that I think the application should have.

03:09.090 --> 03:14.690
And the features can be essentially a brain dump, because we're going to use the LLM to try to organize

03:14.690 --> 03:15.410
everything.

03:15.770 --> 03:19.250
Apart from this, we're going to format this as markdown.

03:19.770 --> 03:27.130
And probably the last prompt here is the most important one, because I don't want ChatGPT to start

03:27.170 --> 03:29.930
outputting a specification instead.

03:30.050 --> 03:31.370
This is the consulting part.

03:31.410 --> 03:36.090
This is the part where is there something that's still unclear about my requirements?

03:36.290 --> 03:43.290
Let's clarify that before we generate anything, because that's again a much more efficient process.

03:43.330 --> 03:47.410
And we're going to see here we're going to get here clarification questions.

03:47.690 --> 03:50.930
It's going to ask us exactly how do you want to have this.

03:51.530 --> 03:53.970
Do we want to have text categories.

03:54.490 --> 03:56.930
How about user accounts and so on.

03:56.930 --> 04:00.000
So there can be a lot of things that go into this.

04:00.400 --> 04:07.280
And once we clarify all these questions, we're going to get back a software specification.

04:07.320 --> 04:12.120
And again, a software specification is something that I'm going to attach as a resource to this lecture.

04:12.480 --> 04:14.280
And you're going to take a look at it.

04:14.280 --> 04:16.720
And we're going to see in a second how it looks like.

04:16.760 --> 04:19.560
I'm not going to bore you with answering all these questions.

04:19.560 --> 04:24.480
It's self-explanatory, but I'm going to show you in the next step how the specification looks like.

04:25.320 --> 04:29.040
So as a next step, I answered all the questions to the best of my knowledge.

04:29.400 --> 04:34.880
And what came out of this is this flashcards web application specification.

04:35.120 --> 04:38.360
And it contains various let's say, categories.

04:38.640 --> 04:44.240
So what I would do next is I'm going to go ahead and copy this entire specification that is here.

04:44.880 --> 04:49.680
And for the next step I'm going to check it and make some changes to it.

04:49.680 --> 04:54.360
And once I'm done I'm also going to share this specification with you as a resource to this lecture.

04:54.640 --> 05:00.550
But generally keep in mind that even if you share the exact same prompt and put it into an LM using

05:00.550 --> 05:01.710
the exact same model.

05:02.470 --> 05:09.430
The output will always be slightly different because generally speaking, llms are non-deterministic,

05:09.430 --> 05:13.830
meaning for the same input you can get different outputs.

05:13.870 --> 05:19.590
But what I'm going to do with this specification and it's super important to review it inside here I

05:19.630 --> 05:22.550
created a new folder which is called flashcards.

05:22.630 --> 05:26.190
And inside this folder what I'm going to do here is create a new file.

05:26.190 --> 05:28.310
And I put it in the docs directory.

05:28.670 --> 05:30.790
And I'm going to call it specification dot.

05:31.870 --> 05:34.950
And this is the specification in the markdown format.

05:35.590 --> 05:42.190
Again it's super important that if you're building a product not just to rely on the LM, but to go

05:42.190 --> 05:45.270
over this specification, read absolutely every line.

05:45.790 --> 05:51.950
It does contain a few technical aspects, but most of the content is actually how the application is

05:51.950 --> 05:56.430
supposed to work, and this is important for building the application itself.
