Skip to main content
use-apify.com

Machine learning: guides & tutorials

Machine learning needs current data. See how web scraping and Apify actors feed datasets, features, and evaluation signals for production ML.

4 articles

View all tags

Machine learning needs current, representative data, and the web is the largest source of it. These guides cover how scraping and Apify actors feed datasets, features, and evaluation signals for production ML.

Models drift when their data goes stale, so repeatable collection pipelines are part of the ML lifecycle. Apify keeps feature and training inputs refreshed on a schedule. Below you will find tutorials on sourcing and maintaining ML datasets.

Related topics

AI7 min read

Best Udemy Courses for AI and Machine Learning in 2026

· 7 min read
Yassine El Haddad
Software Developer & Automation Specialist

The best Udemy courses for AI and machine learning in 2026 combine Python code, Jupyter notebooks, and recent updates (2024–2026). From foundational ML to deep learning, LangChain, and production LLM apps, this guide ranks seven top courses with mini-reviews, a comparison table, learning paths, and how to pair them with Apify for real-world data pipelines. Browse AI and ML courses on Udemy.

AI5 min read

Data Pipelines for RAG: Extracting Web Data for LLMs

· 5 min read
Yassine El Haddad
Software Developer & Automation Specialist

Feeding live web pages into an LLM or a RAG index sounds simple until you look at the token math. Raw HTML for a typical docs or product page can blow past 100,000 tokens once you count inline CSS, SVG, trackers, and nested <div>s—while the sentences you actually care about might sit closer to 3,000.

Shipping that HTML straight into inference burns latency and context budget, and it tends to bury the important lines—the familiar “lost in the middle” problem.

This guide compares the old playbook (sanitize HTML yourself) with API-first Markdown extraction aimed at chunking and embeddings, without changing the underlying tradeoffs.

AI4 min read

Architecting RAG Ingestion Pipelines: DOM-to-Vector (2026)

· 4 min read
Yassine El Haddad
Software Developer & Automation Specialist

Large language models (the latest GPT and Claude Sonnet 4.6 models) have two practical limits you hit in production:

  1. Stale knowledge: Weights reflect the world only up to their training cutoff.
  2. No access to your data: They do not know your internal wikis, repos, or live systems unless you give them a path in.

Retrieval-Augmented Generation (RAG) is the usual fix. Instead of retraining or fine-tuning the model for every document change, RAG takes the user question, looks up relevant passages in an external store of facts (typically a vector database), and asks the LLM to answer using that retrieved text as ground context.

This guide focuses on the part that breaks most often: ingestion—getting web pages into a shape embeddings can use.

AI5 min read

AI Training Data from the Web: Types, Collection & Quality (2026)

· 5 min read
Yassine El Haddad
Software Developer & Automation Specialist

Most production AI systems still depend on large, diverse corpora. For many teams, web scraping—automated, structured extraction from public pages and feeds—is the primary way to collect training and evaluation data at scale, especially when no tidy vendor dataset exists. The hard part is not “download HTML”; it is quality, legal alignment, and repeatable pipelines.

This guide covers types of training data, how teams collect it, Apify Store Actors that map to common needs, and quality controls before you label, embed, or train.

Guides on this site

Frequently asked questions

Frequently Asked Questions

ML models train on scraped text for classification, NER, and sentiment analysis; on scraped images for vision models; and on scraped tabular data for price prediction or demand forecasting. Web data provides scale and diversity that enterprise databases lack, though it requires cleaning, deduplication, and legal review before use.

Product category classification, review sentiment analysis, job posting skill extraction, real estate price estimation, and news topic labeling all work well with scraped training sets. Avoid using scraped personal data for sensitive predictions—model bias and privacy risks compound for biometric, health, or financial predictions.

Define the label schema, sample diverse URL patterns to avoid source bias, extract clean text, label a seed set manually, then optionally use active learning to prioritize the most informative unlabeled examples. Track provenance on every record. Hold out 10-20% of domains for evaluation to test generalization beyond training sites.

Apify collects and stores raw HTML and extracted text in datasets. A preprocessing step cleans and segments text into training examples. A labeling pipeline (Label Studio, Prodigy, or LLM-assisted labeling) adds annotations. Training runs on GPU infrastructure. Evaluation uses a held-out URL set not seen during scraping design.