Flow20

LLM passage retrieval: how long pages are split

LLM passage retrieval

An ingestion pipeline prepares passages and metadata before information retrieval and answer generation with large language models. It extracts useful text, splits it into coherent passages, attaches source metadata and indexes them, often as embeddings. A retriever selects passages, and a reranker may refine the selection before answer generation.

Your content needs to survive that process without losing its meaning. Start with self-contained evidence, then consider how the surrounding system finds and evaluates it.

Key Takeaways

  • Passage quality starts with accurate extraction and coherent boundaries. Keep qualifications, table labels and source metadata with each passage, and test chunk size and overlap rather than assuming one setting fits every page.
  • Query rewriting, retrieval, reranking and reading have separate jobs. Generated passages can help search but aren’t evidence, and reranking can’t recover passages the retriever missed.
  • Build a relevance dataset from results pooled across retrieval methods, and calibrate LLM judgments against human labels. Use Recall@k to assess candidate coverage and nDCG@k to assess ranking.
  • Write sections that answer buyer questions, keeping names, figures and qualifications together. Test retrieval with real questions, then compare coverage, ranking and citation support.

How long pages become passages

Extract the useful content first

Before splitting anything, a parser reads the page’s HTML or rendered content. It identifies headings, paragraphs, lists and tables, whilst removing repeated navigation, cookie notices and unrelated boilerplate.

Extraction quality matters. If a table’s prices become detached from its column headings, the resulting passages can be misleading before retrieval even begins.

In retrieval-augmented generation for marketing, this preparation happens before the model receives evidence. An ordinary text-processing pipeline can handle much of it without a generative model.

Keep each passage connected to its source

Store the page title, canonical URL, heading hierarchy, passage ID and source version alongside each passage. Where relevant, retain review dates, language, permissions and character offsets.

This metadata lets you filter outdated material, reconstruct neighbouring context and attach citations. A passage about eligibility needs a reliable connection to the product or service it describes.

Choose boundaries before choosing a passage size

An illustration with a top cyan bar reading Passage Splitting, showing a document dividing into three sections.

Compare the main chunking methods

A chunk is the unit stored for retrieval. Its boundaries should preserve a useful idea, although different methods make different compromises.

These are the main approaches you can compare.

MethodHow it splits contentMain trade-off
Fixed-sizeUses a token or character limitSimple, but can cut through explanations
RecursiveTries paragraphs, sentences, then smaller unitsPreserves structure where possible
Heading-basedFollows document sectionsClear topics, but uneven passage lengths
SemanticDetects changes in meaningMore processing and tuning

Heading-based splitting works best when headings describe their sections accurately. This is another reason to prioritise clear, search-friendly web content.

Test size and overlap together

A sensible experiment is 400-token passages with 50-token overlap, compared against smaller and larger settings. These are test settings, not a universal optimum.

Tokens are model-processing units, not words. Use the embedding model’s tokenizer and respect its input limit.

Overlap repeats neighbouring text to reduce boundary losses. Excessive overlap creates near-duplicates, increases storage and wastes answer context. Keep a price and its conditions together rather than expecting overlap to repair a poor split.

Where LLM passage retrieval fits in the pipeline

Query rewriting prepares the search input

Large language models can turn a vague request into clearer questions, keywords or an answer-like passage. HyDE generates a hypothetical document for embedding-based retrieval, while Query2Doc uses query expansion to add generated pseudo-documents to the search input.

These generated passages are search aids, not evidence. Retain the original query and constraints, including location, dates and exclusions. Pseudo relevance feedback uses top-ranked results for query expansion, adding terms from likely matches to the next search.

In conversational search, a search agent can resolve references across turns. “Would it work with a small budget?” needs the earlier subject before retrieval can make a useful match. The agent can also choose tools and repeat searches when evidence is missing.

Retrieval, reranking and reading have different jobs

The four core information retrieval modules are the query rewriter, retriever, reranker and reader.

The retriever gathers candidates. BM25 remains a strong, efficient lexical baseline in a search engine, often described as bag-of-words retrieval. Dense passage retrieval, a neural IR method, compares numerical representations of queries and passages. Our explanation of LLM embeddings covers that meaning-based matching.

Hybrid retrieval combines lexical and dense results. A reranker then scores shortlisted passages against the full question, as Google’s advanced RAG walkthrough demonstrates. The reader module uses selected evidence to answer.

Most LLM-enhanced retrieval approaches use in-context learning, supplying instructions or examples without changing model weights. LoRA and QLoRA are common parameter-efficient fine-tuning routes when training is appropriate. Parameter-efficient fine-tuning can adapt a model’s behaviour, but it doesn’t fix missing evidence or poor retrieval.

Follow one question through the system

Use our SEO service information as a concrete example. The input question is: “What does Flow20’s SEO service start at?”

During ingestion, the price passage needs to retain the business name, service name and monthly basis. Its metadata should identify the source page and section.

The question is embedded using the same model, or a compatible query encoder, as the passages. Dense retrieval finds meaning-based candidates; BM25 helps preserve the exact business and service names.

The reranker favours a passage directly answering the price question. The reader can then produce: “Flow20’s SEO services start at £550 per month”, with its source attached.

Keep service categories distinct elsewhere too. PPC is an umbrella term, whilst Google Ads and Facebook Ads identify particular advertising platforms. Preserve those names in passages so platform-specific questions don’t lose their context.

Build a relevance dataset before changing settings

An editorial illustration titled 'Relevance Testing' showing document cards flowing into a ranked list and scoring panel.

Pool candidates from several retrieval methods

A relevance assessor labels query-passage pairs with relevance judgments. A ground truth triplet contains a query, a passage and a human relevance judgment. A common scale is 0 for irrelevant, 1 for relevant and 2 for highly relevant.

Define those labels against the complete question. A passage mentioning a service without answering the buyer’s constraint may deserve only partial relevance.

Pooling combines top-k results from several retrieval methods into a test collection for judging. These labelled examples provide a basis for retrieval evaluation. Sampling only one technique biases results towards the material that technique already retrieves.

Freeze passage IDs and source versions during comparisons. Otherwise, a chunking change can silently alter the test collection and what your judgments refer to.

Use LLM judges with human calibration

Vespa’s LLM-as-a-judge study used 26 human-labelled queries and 90 triplets, about 3.5 judgments per query, to compare GPT-4 labels with human labels and calibrate its relevance judgments.

Its resulting dataset contained 386 unique queries, 10,372 query-passage pairs and 3,014 judged documents. Individual label agreement was fair, whilst rankings across nine retrieval methods correlated well using nDCG@10.

The results don’t show that GPT-4 will be reliable across applications, especially with only 26 calibration queries. Keep a human in the loop, review disagreements against human judgments, and ask an independent relevance assessor to check disputed labels. Parameter-efficient fine-tuning doesn’t remove the need for calibration.

Manual judging becomes expensive quickly. At five seconds per pair, judging 5,000 documents takes nearly seven hours for one query, before breaks.

Measure coverage, relevance and ordering separately

Information retrieval evaluation separates precision, recall and ranking quality, which answer different questions. For retrieval evaluation, choose the metric that matches the stage you’re improving. The table labels Precision at k as Precision@k.

MetricWhat it measuresUseful application
Precision@kRelevant results divided by kLimiting irrelevant context
Recall@kRelevant results retrieved divided by all relevant resultsChecking candidate coverage
nDCG@kGraded relevance discounted by rank, normalised against ideal orderingComparing ranked results

Seven relevant passages amongst ten results gives Precision@10 of 70%. If there are 14 relevant passages altogether, Recall@10 is 50%.

Recall doesn’t account for position or graded usefulness. nDCG does. It converts judgments into numeric gains, commonly using 2^grade minus 1, then discounts lower-ranked results.

Use recall to evaluate broad candidate retrieval in dense retrieval and neural IR systems. Compare Recall@10 before and after a retrieval change to check candidate coverage. Use nDCG when ordering affects which passages enter the prompt or appear as citations. Google’s RAG guidance separates these stages; Microsoft’s reranking guidance makes the same operational distinction.

Log latency, model calls, citation support and failed searches alongside relevance. A slower system needs to justify its extra work.

What your content team should change

Write sections that answer recognisable buyer questions. Name the product or service where necessary, and keep figures beside their qualifications.

Avoid rewriting every paragraph into an isolated mini-article. Readers still need a coherent page, and excessive repetition creates retrieval clutter.

For content optimisation for AI search, useful evidence matters more than guessing every generated query. A rewritten search cannot recover an answer your website never provides.

Public products can use different retrieval behaviours, and each search engine may handle sources differently. Microsoft’s Copilot Studio documentation describes its own knowledge-source handling, not a universal process shared by every answer engine.

Frequently asked questions

Does an LLM split every web page?

Usually, splitting is handled by ingestion software using structural rules, token limits or semantic boundaries. An LLM can help identify boundaries, but it adds processing cost. You don’t need one for every parsing or chunking decision.

Does a larger context window remove the need for chunking?

A larger window lets the reader accept more material, but it doesn’t identify which evidence deserves inclusion. Passage retrieval still helps select relevant, current sources. Extra context can also introduce duplication or unrelated detail.

Can reranking recover a passage the retriever missed?

A standard reranker only reorders the candidates it receives. It can’t score a missing passage. Improve candidate coverage first, then evaluate whether reranking selects the strongest evidence.

Start with one page and real buyer questions

Choose one important page and ten questions your buyers ask. Inspect whether each retrieved passage preserves the answer, its qualifications and its source.

Change one setting at a time, then compare coverage, ranking and citation support. Keep useful evidence as the priority.

For help connecting retrieval-ready content with qualified enquiries, explore our Digital marketing services.

Shirish Agarwal

Shirish Agarwal

Shirish Agarwal leads Flow20 and has been featured as one of the Top 30 Digital Marketing Influencers of 2019 alongside Neil Patel and Rand Fishkin. His new book Gen Z to Gen Zero, which discusses the impact of AI on the job marketplace, is now out and available on Amazon.

0Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Ad Rank in Google and AI Search