1
2 Comments

If your AI pipeline is eating 70% of your tokens on navigation footers and ads, you're not scaling - you're leaking cash.

Most teams treat data cleaning as an afterthought. They just dump raw HTML into the context window and pray for good output.

I’ve been building custom pipelines that strip the "noise" at the source before the LLM even sees it.

The Result: 60%+ token efficiency and higher conversion rates.

The Workflow: I’m using a mix of structured extraction and rule-based filtering that keeps the signal-to-noise ratio high.

Building stable data-enrichment pipelines is a grind, especially when dealing with chaotic scraping environments.

Are you building a data-heavy AI product? Let’s talk about how you’re managing your context window costs. I’m looking to trade notes on cleaning stacks.

#indiehackers #buildinpublic #webscraping #saas #ai #datacollection #automation #techfounders

on June 3, 2026
  1. 1

    Context window cost is one of the most underestimated infrastructure decisions in early AI products. I ran into this directly building an AI chief-of-staff feature — the difference between dumping raw content versus pre-filtering before the API call was significant both in cost and output quality. The structured extraction approach makes sense but I’m curious how you’re handling dynamic content where the schema shifts between scrapes. Rule-based filtering breaks fast when the source HTML isn’t consistent. Are you building the cleaning layer as a standalone service or keeping it coupled to the pipeline?

    1. 1

      That is a great point. I’ve reached the same conclusion treating context window management as a secondary concern is a common bottleneck for early-stage AI products.

      Regarding dynamic content and shifting schemas, I’ve moved away from pure rule-based selectors because, as you mentioned, they are too fragile for real-world scraping. Instead, I’m leaning towards a hybrid approach:

      LLM-based Parser: I use a lightweight, inexpensive model to perform a 'structural pass' on the HTML. It identifies the core content blocks and turns them into a normalized JSON schema before the actual 'reasoning' API call. This acts as a 'schema-agnostic' layer that handles the variance in source HTML.

      Architecture: I’ve architected the cleaning layer as a standalone service. Decoupling it from the main pipeline has been a game-changer. It allows me to iterate on the scraping/cleaning logic (like handling new anti-bot measures or site layout updates) without redeploying the core AI orchestration pipeline. It also helps in caching 'cleaned' results, which further reduces costs for recurring scrapes.

      Are you finding that a specific framework for this schema-normalization works best, or are you building custom prompt-chains for the structural pass?