Open source · MIT · CPU-only
RAG-ready Markdown, without the site chrome.
ChromeRAG turns scraped HTML into clean Markdown for retrieval-augmented generation. It strips navigation, cookie banners, calls to action and footers, keeps Schema.org metadata as front matter and tables as Markdown tables, writes heading-aware chunks, and warns you when a page is an unrendered JavaScript shell.
WCXB test F1, 511 pages
Human raters, 75 new pages
CRAG answers, 500 questions
Quick start
HTML in, Markdown out. ChromeRAG never fetches pages or runs JavaScript: your crawler or headless browser stores the HTML, and ChromeRAG cleans it before chunking and embedding.
# one page → Markdown (front matter, Markdown tables; --json-meta prints diagnostics) chromerag extract page.html -o page.md --priority balanced # optional: learn a site's repeated blocks from ≥ 3 pages, then convert the whole folder chromerag learn pages/ -o site.json --min-pages 3 chromerag batch pages/ -o out/ --chrome-model site.json # exit code 3 on JavaScript shells, so a pipeline can render them first chromerag extract page.html -o page.md --fail-on-thin
from chromerag import ChromeRAG, ContentPriority, PipelineConfig extractor = ChromeRAG(config=PipelineConfig.from_priority(ContentPriority.BALANCED)) result = extractor.extract(html, url="https://docs.example.com/docs/pricing") result.markdown # clean Markdown result.front_matter # title, type, lastUpdated, breadcrumb from JSON-LD / Microdata result.warnings # e.g. the input looks like a JavaScript-rendered shell result.diagnostics # rules and detectors that fired, confidence estimate
How it works
Six stages, each a small module. Everything is deterministic and runs on CPU; the learned block filter ships as a small NumPy bundle with nothing to download.
enable_lbc=False to fall back to the older density filter.Version 0.1.5 results
The numbers on this page below this section are from version 0.1.4 and are superseded. They came from a model trained with test-split domains present and from pages and judge rounds used while the code was still changing; they are kept for the record only. The 0.1.5 results, with protocol, page lists, held-out ledger and supplementary tables S1–S9, are in evaluations/2026-11-final (SUPPLEMENT.md).
| WCXB test split, 511 pages | Word F1 | Chrome left in ↓ |
|---|---|---|
| ChromeRAG 0.1.5 balanced (front matter removed) | 0.884 | 0.070 |
| ChromeRAG 0.1.5 balanced, raw default output | 0.853 | 0.092 |
| Trafilatura 2.2.0 (no metadata) | 0.860 | 0.083 |
| rs-trafilatura 0.1.1 | 0.891 | 0.111 |
| Readability | 0.763 | 0.089 |
| BoilerPy3 1.0.7 Default | 0.753 | 0.150 |
| jusText 3.0.2 | 0.713 | 0.058 |
| MarkItDown 0.1.7 | 0.540 | 0.967 |
The model is trained on 1,238 WCXB development pages with no test page and no known test-split domain. ChromeRAG minus Trafilatura: +0.024 [+0.008, +0.042] (site bootstrap); the gain comes from forums (+0.149); Trafilatura leads on articles by 0.012. The WCXB test split was consulted during earlier development and is not clean held-out evidence. Human raters (75 new pages, mostly three per page) preferred ChromeRAG to Trafilatura, net +0.23 [+0.01, +0.42]; without forums +0.14 [−0.09, +0.35]. CRAG split 1 (500 questions): +0.008 [−0.040, +0.054]. Median time per page on the 511 test pages, one process on a loaded machine: 39.6 ms for ChromeRAG, 14.2 ms for Trafilatura.
Human-reviewed benchmark (WCXB) v0.1.4, superseded
Version 0.1.4 result, superseded; not used for claims. See 0.1.5 results.
Word-level F1 against human-reviewed main content on WCXB, seven page types. Test (clean): 372 test pages with no byte-identical copy in development (the test split was consulted during development). Test (all): all 511 test pages. Development: five-fold cross-validation grouped by site.
Public benchmark v0.1.4, superseded
Version 0.1.4 result, superseded; not used for claims. See 0.1.5 results.
Every tool runs on the same stored HTML. Recall is the share of main-content 5-grams kept, noise retention the share of navigation, header and footer 5-grams kept, and Fbal their harmonic balance. The scored pages are chosen from the input HTML only, never from any tool's output.
| Method | Recall ↑ | Noise ret. ↓ | Fbal ↑ | Avg tokens |
|---|
Is the difference real? Paired bootstrap, 95% CI
Mean per-page difference, ChromeRAG coverage minus the baseline, 2,000 resamples. An interval that does not cross the zero line is a significant difference.
Does it help retrieval? v0.1.4, superseded
Version 0.1.4 result, superseded; not used for claims. See 0.1.5 results.
Each tool's output is split into ~200-word chunks and indexed with BM25, as a RAG ingest step would. Queries are page titles, section headings and content passages taken from the input HTML; each has exactly one correct page.
Hit@5 higher is better
Chrome in top-5 context lower is better
Blinded judging v0.1.4, superseded
Version 0.1.4 result, superseded; not used for claims. See 0.1.5 results.
Three judge families score blinded pairwise comparisons (tool names hidden, order randomised). Net score is wins minus losses over pages, from −1 to +1; whiskers are 95% bootstrap intervals. Rival is Trafilatura except where noted.
Fresh pages 328 pages
WCXB clean 367 pages
vs Readability on fresh pages GPT judge only
Learning a site's template v0.1.4, superseded
Version 0.1.4 result, superseded; not used for claims. See 0.1.5 results.
Site-template chrome elimination (STCE) learns blocks that repeat across pages of one site section. It is evaluated on the benchmark's sites with at least three pages and on a separate crawl of up to 15 pages per documentation site.
| Page set | Sites | Scored pages | Recall without → with | Pages changed | Site-repeated text |
|---|---|---|---|---|---|
| loading… | |||||
Page explorer v0.1.4, superseded
Version 0.1.4 result, superseded; not used for claims. See 0.1.5 results.
Every benchmark page with every tool's score, so you can check individual cases instead of trusting the averages.
Reproduce, limits and tests
Reproduce the v0.1.4 numbers on this page (0.1.5: see the README)
pip install -e ".[dev,baselines]" python scripts/revalidate_corpus.py # offline: recompute every mean from the published per-page scores python -m poc.run_corpus_comparison # fetch the public URLs and score every tool (network) python -m poc.run_retrieval_eval # BM25 retrieval over each tool's chunks python -m poc.crawl_site_groups --fetch # multi-page crawl for the site-template study (network) python -m poc.run_stce_eval --raw data/stce_crawl
Live pages change, so a fresh fetch will not match the published numbers exactly. The published per-page scores are in data/corpus_comparison_report.json.
Limitations
- ChromeRAG does not run JavaScript. It warns about shell pages but cannot recover their content.
- Training data are one mostly English benchmark (WCXB), and features include English stop words.
- The WCXB test split was consulted during earlier development; product and collection results rest on 28 and 34 pages.
- ChromeRAG is about three times slower than Trafilatura on the WCXB test pages.
- The site-template model is learned from site groups of at least five pages in
batch(three withchromerag learn --min-pages 3) and was last measured with version 0.1.4. - Only HTML is handled. Use other converters for PDF and Office files.
Test suite
Cite
@software{peddapudi_chromerag,
author = {Peddapudi, Bhargava Chary},
title = {ChromeRAG: A Learned Boilerplate Filter for Web RAG Ingestion},
url = {https://github.com/pedapudibhargav/ChromeRAG},
license = {MIT},
doi = {10.5281/zenodo.24411402},
version = {0.1.5},
year = {2026}
}