The symptom is an invoice. A client adds AI search to a WooCommerce store, it looks fine on ten demo products, then production has 1,200 product pages and long supplier terms pages, and every content edit re-runs the whole corpus through a large model. Nothing errors, but your LLM ingestion costs scale with page count while what the model learns stays flat.
Partha Sarkar’s Proxy-Pointer article on Towards Data Science attacks this for knowledge graph ingestion, and the part worth borrowing is small. Decide from a document’s structure whether it’s worth sending to a model, before anything is metered.
Where WordPress already has the tree
Proxy-Pointer’s core move is treating a document as a tree of sections and predicting which carry relationships before extraction starts. WordPress already stores that tree. post_content is block markup, and parse_blocks() returns the hierarchy the article builds by hand from PDFs: blockName, attributes, innerBlocks. Structure extraction that costs him a whole pipeline is one function call for us. One caveat: parse_blocks() parses the whole document at once, which is expensive on very long posts, and the streaming parser in WordPress 6.9 exists for that reason.
Three ways to cut LLM ingestion costs
The default is to chunk and embed everything and re-scan on change. Most WordPress AI plugins do this, and cost scales with your corpus, most of it spent on boilerplate.
The second is a cheap pre-scan. Classic NER is fast but blind to your vocabulary, and entity density doesn’t predict relation density: the article’s Notices sections are full of names and dates and hold no relationships. A smaller router model reads each chunk before the big model does, but it still reads every word.
The third is structure routing. An index per document type maps section types to expected yield, and low-yield sections are skipped before any model sees them. Anything the index doesn’t recognize is scanned anyway, and that’s what makes skipping safe.
Which one you pick depends on the site. A few hundred mixed pages, embed everything. Docs libraries and repeating document families, route on structure. Router models only earn their keep on content with no stable structure.
What the credit agreement run showed
Sarkar tested the index on three public SEC credit agreements (Emerson, AT&T, and Texas Roadhouse) between roughly 228k and 434k characters. Predicted reductions in what a model would read were 16.1%, 33.9%, and 38% after enriching the index on the first document only. Alignment between predicted and actual ran 70%, 71.4%, and 79.4%. The unmatched sections still got scanned as unknowns. Two reservations: an LLM graded its own yield, so the benchmark is partly self-assessed, and three documents is a small sample. The code is on GitHub under MIT.
When a skip index stops paying for itself
Routing pays where volume is. Ingest five documents of a type and the enrichment pass eats the savings. The article’s numbers settle at 20 to 25% new sections per document, scanned every time, so the ceiling is real. The quieter risk is drift, where a page whose structure changed gets skipped forever once the index is trusted, so log every bypass with its block name.
function bbioon_blocks_for_llm( int $post_id ) : array {
$skip = array( 'core/table-of-contents', 'core/embed', 'core/spacer', 'core/separator' );
$send = array();
foreach ( parse_blocks( get_post_field( 'post_content', $post_id ) ) as $block ) {
if ( null === $block['blockName'] || in_array( $block['blockName'], $skip, true ) ) {
continue; // whitespace or rated low-yield: never sent to a model
}
$send[] = $block;
}
return $send;
}
The skip list is where graphability lands here: a table of contents block is noise, so skip it before anything is metered, while a paragraph under a Pricing heading is probably the point of the page.
What I’d ship
Small site, embed everything. For repeating document families, route on structure and let a human review the first mismatch batch the way the article does. It’s the same cost question behind LLM product recommendations on WooCommerce, but at indexing time instead of query time.
What I still can’t answer is how long a yield index stays honest once nobody re-checks it. A skipped section doesn’t error, it just never reaches an answer, and the first person to notice is usually the client. If a token bill is blocking an LLM feature on your WordPress or WooCommerce site, this routing layer is work I take on, so send me the corpus and I’ll point at the waste.