Free · WaitlistJoin the waitlist for the free 2-day Vibecoding & AI Agents Intensive (autonomous Hermes + DeepSeek agent · led by Jemal Hamidun, Head of AI at Alpina Digital & MIPT)Join the waitlist →
ReleaseInsight · On RadarHabr AI→ original

Positive Technologies classifies hundreds of millions of pages without an LLM, on a few CPU cores

Positive Technologies categorizes websites for its PT NGFW firewalls with a small transformer running on a few CPU cores, not with a large language model. The issue is data: curl downloaded the mail.ru homepage without JavaScript, where the main content was a horoscope, so the mail service was classified as "Alternative Beliefs." The team is therefore building a crawler with browser rendering and feedback from the categorizer. Their conclusion: fix content acquisition first, then choose the model.

AI-processed from Habr AI; edited by Hamidun News
Positive Technologies classifies hundreds of millions of pages without an LLM, on a few CPU cores
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1The second-largest source of traffic for one partner was queuev4.vk.ru, with 67K requests
Key metric #2A storefront made entirely of images is captured by the crawler as a screenshot on request
Key metric #3Hacked sites hide links in zero-size blocks

"Load all the content into an LLM and it will give you everything" is a line ML engineer Stepan Kulchitsky at Positive Technologies heard from a colleague. He explained on Habr why the company's URL categorization service is built differently: pages are classified not by a large language model but by a small transformer that needs only a few CPU cores and a modest amount of RAM. The service's results are used by PT NGFW, PT Fusion, PT Sandbox and other company products.

Why build your own database when you can buy one

URL filtering in a firewall works like this: a user opens a site, the NGFW extracts the address from the request, finds its category in a database, applies the security rule for that category, and either allows or blocks the request. Positive Technologies first used a ready-made database from a third-party vendor but quickly hit a ceiling. What is inside the database is unknown, and any partner complaint about a false positive turns into forwarding a letter to the vendor and waiting. Moreover, such a database contains addresses of malicious resources, and the company wants to be responsible for their coverage and accuracy itself.

The first MVP version relied on frequency analysis and was meant to validate the architecture. The second version already used an ML engine and outperformed the vendor's solution on the reference sample (Golden dataset). For now the database ships to devices as a local file, but it has three drawbacks: it cannot be inflated to hundreds of millions of records, updates depend on the administrator (a partner may go half a year without fresh records about malicious hosts), and telemetry is limited. That is why the team is moving the service to the cloud.

Why "just download the page" does not work

The main argument against the idea of "handing everything to an LLM" is simple: the content has to be fetched first. A revealing story happened in an early experiment, when a test sample of sites was downloaded with plain curl. Among the top domains, mail.ru received the category "Alternative Beliefs." The reason was that, without executing JavaScript and loading third-party resources, the main place on the homepage was taken up by a horoscope. The categorizer honestly read what it was given.

This led to a set of engineering challenges:

  • Browser-like rendering. Scripts must be executed and resources loaded, for several dozen pages across several tens of millions of sites, and without months of waiting.
  • Abuse. Site owners complain to operators about scanning, so the crawler respects robots.txt and reduces its load on resources.
  • Geoblocking. The crawler handles a 403 response itself and retries the request from another geozone. It is harder when a site returns 200 OK but shows a "not available in your country" stub: at the HTTP level this is a normal page. Only the categorizer can notice the substitution, and it can ask the crawler via the metadata channel to fetch from another geozone. The same applies when a Russian site shows a different page because it suspects a VPN.
  • CAPTCHA and anti-bot protection. The crawler must behave like an ordinary browser while spending as few resources as possible.
  • Pages without text. A storefront for prohibited substances may consist entirely of images. The categorizer asks the crawler to take a screenshot. Capturing everything is expensive: there are hundreds of millions of pages, so screenshots are taken only when necessary.

Hacked sites and addresses meant for machines

Another case surfaced in telemetry. Two sites, an air conditioner store and a boat manufacturer, were categorized as "Adult Sites." Their source code contained zero-size blocks with search phrases and links to porn sites. Users never see them, but search bots and the crawler do. This is "black hat" SEO on compromised resources. Formally the categorizer was not wrong, but for the partner what matters more is that the site has been compromised and tomorrow a malicious link or exploit may appear there.

A large share of addresses contains no text for people at all: APIs, CDNs, trackers, ads. In the traffic of one partner, the second-largest source was queuev4.vk.ru with 67K requests, followed by api.github.com, safebrowsing.googleapis.com and clientservices.googleapis.com. People do not visit these; applications do. For such addresses there is an Insufficient content category, but the team did not want to leave it in the logs as is, so it wrote a separate engine that determines the category of such resources.

Takeaways

The lesson reaches beyond one product. In large-scale classification, quality often hinges not on model size but on what the model is fed: correct rendering, bypassing geoblocks, cleaning markup, screenshots, and feedback between the classifier and the crawler. If this part is not sorted out, even the largest model will confidently file a mail service under horoscopes. A small transformer that needs only a few CPU cores is also simpler to scale and to keep in one's own infrastructure. A caveat: the quality assessments and comparisons with the vendor are published by Positive Technologies itself, with no independent verification.

Story

Key Questions Answered

Why build your own database when you can buy one?

URL filtering in a firewall works like this: a user opens a site, the NGFW extracts the address from the request, finds its category in a database, applies the security rule for that category, and either allows or blocks the request. Positive Technologies first used a ready-made database from a third-party vendor but quickly hit a ceiling. What is inside the database is unknown, and any partner complaint about a false positive turns into forwarding a letter to the vendor and waiting.

Why "just download the page" does not work?

The main argument against the idea of "handing everything to an LLM" is simple: the content has to be fetched first. A revealing story happened in an early experiment, when a test sample of sites was downloaded with plain curl. Among the top domains, mail.ru received the category "Alternative Beliefs." The reason was that, without executing JavaScript and loading third-party resources, the main place on the homepage was taken up by a horoscope. The categorizer honestly read what it was given.

What are the key details on Hacked sites and addresses meant for machines?

Another case surfaced in telemetry. Two sites, an air conditioner store and a boat manufacturer, were categorized as "Adult Sites." Their source code contained zero-size blocks with search phrases and links to porn sites. Users never see them, but search bots and the crawler do. This is "black hat" SEO on compromised resources. Formally the categorizer was not wrong, but for the partner what matters more is that the site has been compromised and tomorrow a malicious link or exploit may appear there.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
What do you think?
Loading comments…