Skip to content

Commit 9d8027f

Browse files
committed
kick off a stub of the AI course
1 parent 5e5f926 commit 9d8027f

7 files changed

Lines changed: 218 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Chatting to code
3+
description: TBD
4+
slug: /building-actors-with-ai/chatting
5+
unlisted: true
6+
---
7+
8+
<!--
9+
Copying from chat, pasting to local files. Running with uv (should be easy-ish?). Creating a basic scraper which does what we need.
10+
11+
The first lesson should use ChatGPT. It's mainstream. For chatting, it's free with limits, but many people might already pay for it, and for those it's gonna be without perceivable limits.
12+
13+
The implementation language can be JS or Python, it doesn't matter. However, the apify create template for Python is outdated, so I think (with a tear in my eye) that we should generate JavaScript – compared to outdated Python stack, I expect less issues to run it locally.
14+
15+
Start by explaining why running a scraper as an Actor makes sense (execution, storage, scheduling, history), and then install the CLI and use the template with those benefits in mind.
16+
17+
In lesson 1, students would work inside the template by copying/pasting from ChatGPT and focus on getting their first scraper working, without worrying too much about anything else.
18+
-->
19+
20+
:::note Course under construction
21+
22+
This page hasn't been written yet. Come later, please!
23+
24+
:::
25+
26+
27+
<!--
28+
#### Creating first scraper
29+
Prompt ChatGPT to get a simple JavaScript program which downloads https://warehouse-theme-metal.myshopify.com/collections/sales and lists the product names:
30+
31+
> Create a scraper in JavaScript which downloads https://warehouse-theme-metal.myshopify.com/collections/sales, extracts all the products in Sales and saves a CSV file, which contains:
32+
> - Product name
33+
> - Product detail page URL
34+
> - Price
35+
36+
#### Running code
37+
Save it as a scraper.js, setup Node/npm environment, run it, get results. If the student gets stuck setting up Node/npm, they ask ChatGPT. Roughly explaining what the program does, establishing basic terms.
38+
#### Scraping stock units
39+
Prompt ChatGPT to modify the program so that it scrapes stock units. Technically, modifying the program like this proves to be cumbersome, but doable. Run the program again, get better results.
40+
41+
Teaser: In the next lesson we'll get rid of copying and pasting and updating the files ourselves.
42+
-->
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Using a platform
3+
description: TBD
4+
slug: /building-actors-with-ai/using_platform
5+
unlisted: true
6+
---
7+
8+
<!--
9+
Deploying to Apify and reaping the benefits of the platform. Running the scraper periodically, adding support for proxies...
10+
11+
In lesson 2, students could already push the Actor to Apify and start seeing some of the platform benefits.
12+
-->
13+
14+
:::note Course under construction
15+
16+
This page hasn't been written yet. Come later, please!
17+
18+
:::
19+
20+
21+
<!--
22+
#### Creating an Actor
23+
Explain what is Actor. Use Apify CLI template - already provides AGENTS.md, README.md, all the basics. Get the Apify CLI and use it to start a new project. Explain that this is how a professional scraper should be started.
24+
#### Turning the Actor to a scraper
25+
Take contents of the old README to the template and tests and let the agent implement the same scraper again according to all of that. Explain that this is the shortest and most robust way from idea to result - use template, provide docs, tests, and let the agent do its job.
26+
#### Deploying
27+
Deploying to Apify and reaping the benefits of the platform. Running the scraper periodically, getting JSONs and CSVs, seeing history, monitoring, adding support for proxies...
28+
-->
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: Using an agent
3+
description: TBD
4+
slug: /building-actors-with-ai/using-agent
5+
unlisted: true
6+
---
7+
8+
<!--
9+
Explaining benefits (delegation and independent work, AGENTS.md). Getting environment ready, learning the ropes with a GUI/TUI. Using the `apify` CLI to start a project. Creating a basic scraper which does what we need.
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.
12+
13+
The lesson should use Cursor (or Google Antigravity). Only if it truly scales to zero as they claim and it is not required to have a paid account to try an agent. Minimal friction, just install – beats any other decision factors.
14+
15+
If the paragraph above turns out being a wrong direction, we should use VS Code and tell people to spend $10 to try Copilot. VS Code is mainstream. Paying for Copilot is the cheapest agent offering, and it's quite powerful.
16+
-->
17+
18+
:::note Course under construction
19+
20+
This page hasn't been written yet. Come later, please!
21+
22+
:::
23+
24+
<!--
25+
#### Installing development environment
26+
Explaining benefits (delegation and independent work, AGENTS.md). Getting environment ready. Use https://docs.apify.com/platform/actors/development/quick-start/build-with-ai
27+
#### Scraping vendor names
28+
Learning the ropes with a GUI/TUI, prompting the agent to update the code so that it scrapes vendor names. Run the program again, get better results.
29+
30+
Teaser: Explain why this is fragile. In the next lesson we'll learn how to develop features of the scraper in a robust way by first specifying them as documentation.
31+
-->
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Tests driven prompting
3+
description: TBD
4+
slug: /building-actors-with-ai/tests-driven-prompting
5+
unlisted: true
6+
---
7+
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.
12+
-->
13+
14+
:::note Course under construction
15+
16+
This page hasn't been written yet. Come later, please!
17+
18+
:::
19+
20+
<!--
21+
#### Creating README.md
22+
Create simple README.md where we document how the scraper behaves, what it produces as an output, etc. Primer to Markdown.
23+
#### Dealing with price intervals
24+
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.
25+
26+
Let the agent implement handling of variants based on the README. Run updated code, see results.
27+
28+
Teaser: Imagine the target website changes something (happens often!). In such case the README won't help. Let's deal with that.
29+
-->
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Docs driven prompting
3+
description: TBD
4+
slug: /building-actors-with-ai/tests-driven-prompting
5+
unlisted: true
6+
---
7+
8+
<!--
9+
Improving the README, e.g. input output. Pointing the agent to the README and turning the design to reality.
10+
-->
11+
12+
:::note Course under construction
13+
14+
This page hasn't been written yet. Come later, please!
15+
16+
:::
17+
18+
19+
<!--
20+
#### Creating tests
21+
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.
22+
#### Scrape product variants
23+
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.
24+
25+
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.
26+
-->
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: Publishing to Apify Store
3+
description: TBD
4+
slug: /building-actors-with-ai/publishing-to-store
5+
unlisted: true
6+
---
7+
8+
<!--
9+
The last lesson could focus more on quality, maintainability, and also touch on the Apify Store.
10+
11+
It won't include the publishing itself, but will cover most of any 'tidying up' needed before one actually goes to publish an Actor for others to use.
12+
-->
13+
14+
:::note Course under construction
15+
16+
This page hasn't been written yet. Come later, please!
17+
18+
:::
19+
20+
<!--
21+
TBD
22+
-->
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: Building Actors with AI
3+
description: Learn how to use AI to extract information from websites in this practical course, starting from the absolute basics.
4+
sidebar_position: 5
5+
sidebar_label: Building Actors with AI
6+
category: apify platform
7+
slug: /building-actors-with-ai
8+
unlisted: true
9+
---
10+
11+
import DocCardList from '@theme/DocCardList';
12+
13+
**Learn how to use AI to extract information from websites in this practical course, starting from the absolute basics.**
14+
15+
---
16+
17+
In this course we'll use AI assistants to create an application for watching prices. It'll be able to scrape all product pages of an e-commerce website and record prices. Data from several runs of such program would be useful for seeing trends in price changes, detecting discounts, etc.
18+
19+
The end product will, unlike programs vibe-coded carelessly, reach the level of quality allowing for further extensibility and comfortable maintenance, so that it can be published to [Apify Store](https://apify.com/store).
20+
21+
## What we'll do
22+
23+
- Use ChatGPT (AI chat) to create a program which extracts data from a web page.
24+
- Save extracted data in various formats, e.g. CSV which MS Excel or Google Sheets can open.
25+
- Use Cursor (AI agent) to improve the program so that it is robust and maintainable.
26+
- Save time and effort with Apify's scraping platform.
27+
28+
## Who this course is for
29+
30+
Anyone with basic knowledge of chatting with an AI assistant and affinity to building digital products who wants to start with web scraping can take this course. The course does not expect you to have any prior knowledge of web technologies or scraping.
31+
32+
## Requirements
33+
34+
- Prior experience chatting with AI assistants, such as OpenAI ChatGPT, Google Gemini, or Anthropic Claude.
35+
- A macOS, Linux, or Windows machine. If it's your work computer, make sure you have permissions to install new software.
36+
- Familiarity with running commands in Terminal (macOS/Linux) or Command Prompt (Windows). Just generally knowing what those are and how to use them is sufficient.
37+
38+
## Course content
39+
40+
<DocCardList />

0 commit comments

Comments
 (0)