Monday, November 2

Feeding AI Agents the Web: Why Clean Data Is the Hard Part

A developer reviewing structured, clean web data on a monitor in an office
Image: Maaria Barros / Wikimedia Commons, CC BY-SA 4.0

Ask an AI agent to find the cheapest flight, compare three suppliers or summarise what customers say about a competitor, and you are really asking it to read the web. The web, unfortunately, was built for human eyes. It is full of pop-ups, duplicated text, half-updated prices and pages that look fine but hide the interesting part behind a script. Agents need clean web data, and the web rarely supplies it.

That mismatch explains why a whole class of companies has sprung up around one unglamorous job: turning messy web content into clean web data a machine can rely on.

Clean web data - A developer reviewing structured, clean web data on a monitor in an office
Image: Shail251298 / Wikimedia Commons, CC0

What goes wrong when agents read raw pages

Hand a model the raw HTML of a shopping page and several things can happen. It may drown in navigation menus and cookie banners. It may mistake a sale price for a list price. It may latch onto a review that is actually an advertisement. Much of the content loads only after the page runs scripts, so a simple download shows an empty shell.

Even clean web data may be outdated, since pages change faster than most caches. An agent acting on yesterday’s stock level or last month’s terms can do real damage, particularly if it takes actions such as placing orders, not just answering questions.

The stages of making data usable

Teams that build reliable pipelines usually work through the same sequence.

  • Collection. Fetching pages at scale, respecting site rules, handling logins, rate limits and rendering of dynamic content.
  • Extraction. Pulling out the meaningful pieces: product name, price, availability, author, date, rating.
  • Normalisation. Making values consistent, so currencies, units and date formats line up and the same entity is not counted twice under different names.
  • Validation. Checking for impossible values, sudden jumps and missing fields, and flagging pages whose layout changed, much as fraud systems check transactions in real time.
  • Freshness management. Deciding how often to re-collect each source, and recording when each fact was last confirmed.

Skip any one step and the failure shows up later, usually as a confident but wrong answer.

Why clean web data beats sheer volume

It is tempting to think more data is always better. For agents, structure matters more. A well-labelled table with provenance, meaning where each value came from and when, lets a model reason precisely and lets humans audit its work. A heap of unlabelled text forces the model to guess.

This is also where hallucination risk falls. When an agent can look up a fact in a verified record, it has less need to invent. Linking each claim to a source lets the system cite, and lets users check.

A small example shows the stakes. An agent is asked to track the price of a component across ten suppliers. One supplier shows prices in a different currency, another lists the price per box rather than per unit, and a third displays a banner price that only applies with a coupon. Without cleaning, the agent compares unlike numbers and confidently names the wrong cheapest option. With clean web data, each price is converted, labelled with its unit and timestamped, and the comparison means something.

Cleaning also deals with duplicates. The same product often appears under slightly different names on several pages, and a naive pipeline counts it as separate items. Entity matching, which links records that refer to the same thing, is dull work and a large part of what makes clean web data valuable.

Finally, humans still matter. Even good pipelines flag odd values for review, and teams that sample outputs regularly catch problems before an agent acts on them. Treat the process as a loop, not a one-time import.

The ethical and legal side

Collecting web data raises questions that responsible teams take seriously. Many sites state in their terms whether automated access is permitted. Some use signals that tell crawlers what they may and may not fetch. Personal data is regulated in many regions, and scraping it without a lawful basis can create trouble. Copyright is also unsettled in some uses.

If you are buying data from a provider, ask how it is collected, whether it contains personal information and what happens when a site owner objects. If you are building your own, involve legal advice early, not after launch.

How to judge a source of clean web data

A few questions will separate solid offerings from shaky ones.

  • How fresh is the data, and is the timestamp visible?
  • What coverage is there, and where are the gaps?
  • How are errors measured and fixed?
  • Does the output have a stable schema, so your agent code does not break every time a source redesigns?
  • Can you trace any value back to its origin?

Test with questions whose answers you already know. Run a sample of fifty records and check them by hand. Errors tend to cluster, and a small audit reveals them quickly.

Model quality gets the headlines, yet in practice the difference between a demo and a dependable agent often lies in the plumbing. A smart model reading bad data produces fluent nonsense; a modest one reading good data can be genuinely useful. If you are planning agent projects, budget for clean web data first. Compute is the other large bill, and why AI teams overpay for GPUs explains one way to trim it. It is the part that does not improve by waiting for the next model release, and it is the part your competitors will find most tedious to copy.

Image: Maaria Barros / Wikimedia Commons, CC BY-SA 4.0.