|
1 | 1 | --- |
2 | | -title: Tests driven prompting |
| 2 | +title: Docs driven prompting |
3 | 3 | description: TBD |
4 | | -slug: /scraping-with-apify-and-ai/tests-driven-prompting |
| 4 | +slug: /scraping-with-apify-and-ai/docs-driven-prompting |
5 | 5 | unlisted: true |
6 | 6 | --- |
7 | 7 |
|
8 | 8 | <!-- |
9 | | -Adding fixtures, expectations. Setting up tests and teaching the agent to run tests. Dealing with corner cases by pointing the agent to the fixtures. |
10 | | -
|
11 | | -In lesson 3, students would try to make changes via ChatGPT and see that it gets tedious, which leads to introducing an agent-based IDE to work inside the template more comfortably. |
| 9 | +Improving the README, e.g. input output. Pointing the agent to the README and turning the design to reality. |
12 | 10 | --> |
13 | 11 |
|
14 | 12 | :::note Course under construction |
15 | 13 | This page hasn't been written yet. Come later, please! |
16 | 14 | ::: |
17 | 15 |
|
18 | | -<!-- |
19 | | -#### Creating README.md |
20 | | -Create simple README.md where we document how the scraper behaves, what it produces as an output, etc. Primer to Markdown. |
21 | | -#### Dealing with price intervals |
22 | | -Explain focus on product and domain knowledge. In the README explain how the scraper should handle prices like "From $1,398.00", introduce minPrice, keep prices as numbers, etc. |
23 | 16 |
|
24 | | -Let the agent implement handling of variants based on the README. Run updated code, see results. |
| 17 | +<!-- |
| 18 | +#### Creating tests |
| 19 | +Explain tests, expectations. Create test folder, drop downloaded HTML of the listing there, let the agent set up tests around it. Let the agent run tests. |
| 20 | +#### Scrape product variants |
| 21 | +Change README so that it describes how the product variants should be handled. Drop HTML of the product detail page to the tests folder. Prompt the agent to implement scraping product variants. Run the program, get results. |
25 | 22 |
|
26 | | -Teaser: Imagine the target website changes something (happens often!). In such case the README won't help. Let's deal with that. |
| 23 | +Teaser: In the next lesson we'll learn how to deploy a similar scraper to a platform, schedule it to run regularly, automatically produce various formats, have a history of data, etc. |
27 | 24 | --> |
0 commit comments