cd /news/large-language-models/building-a-vertical-corpus-builder-c… Β· home β€Ί topics β€Ί large-language-models β€Ί article
[ARTICLE Β· art-102822] src=dev.to β†— pub= topic=large-language-models verified=true sentiment=Β· neutral

Building a Vertical Corpus Builder: Clean JSONL Datasets for LLM Fine-Tuning

A developer built a vertical corpus builder that crawls seed URLs, strips boilerplate, dedupes, and chunks content into token-aware JSONL datasets for LLM fine-tuning. The tool, published on Apify Store, defaults to Cornell LII for legal text because sources like CourtListener and Justia block datacenter IPs. Tests on three Supreme Court opinions produced 443 clean chunks with provenance metadata.

read1 min views3 publishedAug 19, 2026

Raw web pages are terrible training data. Nav bars, cookie banners, "related articles" and ads drown the signal, and near-identical syndicated text pollutes the corpus. If you're fine-tuning a domain model β€” legal reasoning, medical QA, financial analysis β€” you want clean vertical text with provenance, not a pile of HTML. I built an actor that goes from seed URLs to a token-aware JSONL dataset in one run.

seed URLs β†’ crawl (same-domain BFS) β†’ clean (boilerplate strip)
  β†’ dedupe (exact + near) β†’ token-aware chunk β†’ JSONL with provenance

Three steps matter most:

script

/style

/nav

/footer

/header

/aside

and utility blocks (breadcrumbs, shares, comments, menus). One detail that earned its keep: paragraphs where more than half the links are anchor text get dropped too β€” those are link farms, not content.Every record carries source

(hostname), url

, domain

(your vertical), title

, and chunk_index

β€” so you can filter, cite, or re-weight the corpus later.

Not every legal text source works from a datacenter IP. CourtListener sits behind an AWS WAF JavaScript challenge, and Justia 403s datacenter egress β€” both unusable as plain-HTTP seeds. Cornell LII (law.cornell.edu/supremecourt/text/…

) serves full opinions as clean HTML and works beautifully. The honest move was documenting that in the README and defaulting the examples to LII rather than pretending every source is reachable.

Three LII Supreme Court opinions (Dobbs, Bruen, WV v EPA):

domain=legal

, source law.cornell.edu

, 0 duplicate textsoutput.jsonl

β€” 443 lines / ~811 KB, plus a SUMMARY

record: 443 chunks, 2 pages, ~173,000 estimated tokens, no failed sourcesmaxChunksPerPage

.πŸ‘‰ Vertical Corpora Builder on Apify Store

While you're here, these might be worth a read:

── more in #large-language-models 4 stories Β· sorted by recency
── more on @apify 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/building-a-vertical-…] indexed:0 read:1min 2026-08-19 Β· β€”