Skip to content

RAG Chunking & Vector Embedding Benchmark Diagnostic

Interactive decision checklist and benchmarking guide for retrieval-augmented generation. Evaluates chunk size, overlap ratios, and re-ranking pipelines.

By Gordon Geraghty·MIT Licence·Updated: 21 August 2026·ADVANCED·GitHub Mirror ↗

GA4 & Server-Side Tagging Health Check Suite

Progress is saved locally in your browser. Complete each checkpoint to calculate your audit score and export a compliance report.

Audit Progress0%0 of 14 items completed
Passed Checks0100% compliance rate
Action Items / Fails0Requires remediation

1. Property Configuration & Governance

Core GA4 data stream setup, retention limits, and BigQuery export linkage.

Data Retention set to 14 monthsCRITICAL

Default is 2 months. Change to 14 months in Admin > Data Settings > Data Retention.

BigQuery Daily and Streaming Export configuredHIGH

Ensure raw unthresholded event tables stream to BigQuery GCP project.

Google Signals thresholding reviewedHIGH

Set Reporting Identity to Device-based or Blended to avoid 100% thresholding on low-volume custom dimensions.

Internal IP and Developer Traffic filtering activeMEDIUM

Traffic filters set to Active to exclude office and staging hits from production views.

Cross-Domain Measurement configured for all checkout subdomainsCRITICAL

Domains listed in Data Stream > More Tagging Settings > Configure your domains.

2. Data Layer & Event Architecture

Timing, casing and dataLayer structure verification.

dataLayer initialised before GTM container snippetCRITICAL

window.dataLayer = window.dataLayer || [] declared in head before gtm.js loads.

Snake_case naming convention strictly enforcedMEDIUM

All custom event names and parameters use lowercase snake_case (no camelCase or spaces).

No duplicate page_view events on SPA route changesHIGH

Single-page app route changes do not fire native and manual page_views simultaneously.

Ecommerce items[] array structure conforms to schemaCRITICAL

Items array contains item_id, item_name, price, quantity, and item_category as strings/numbers.

Transaction ID uniqueness and deduplicationCRITICAL

Purchase event deduplicated in sGTM and GA4 to prevent repeat counts on order confirmation refreshes.

3. Enhanced Conversions & Consent Mode v2

First-party data normalisation and DMA compliance signals.

Consent Mode v2 default state set before GTM snippetCRITICAL

gtag("consent", "default", { ad_storage: "denied", ... }) executes before container loads.

All 4 Consent Mode v2 parameters present (ad_user_data, ad_personalization)CRITICAL

Consent update push verified in Tag Assistant with correct gcd parameter.

Enhanced Conversions user_data strings normalisedHIGH

Email lowercased and trimmed, phone in E.164 (+61...) before hashing.

Server-Side GTM Event ID mapped across browser and server tagsCRITICAL

Meta CAPI and Google Ads match browser and server hits with identical event_id.

Built by Gordon Geraghty, Head of PerformanceLocal Storage State

Balancing Chunk Size against Retrieval Precision

Oversized chunks dilute vector specificity, while undersized chunks lose narrative context. Setting chunk sizes between 400 and 600 tokens with 10% overlap balances retrieval accuracy and context density.

Implementation Code & Script

Semantic Paragraph Splitter with Overlapchunker.tstypescript

Splits long documents on semantic paragraph boundaries while maintaining context overlap.

export function semanticChunkDocument(text: string, maxTokens: number = 500, overlap: number = 50): string[] {
  const paragraphs = text.split(/\n\n+/);
  const chunks: string[] = [];
  let currentChunk = '';

  for (const para of paragraphs) {
    if ((currentChunk + ' ' + para).length > maxTokens * 4) {
      if (currentChunk) chunks.push(currentChunk.trim());
      currentChunk = currentChunk.slice(-overlap * 4) + '\n\n' + para;
    } else {
      currentChunk = currentChunk ? currentChunk + '\n\n' + para : para;
    }
  }
  if (currentChunk.trim()) chunks.push(currentChunk.trim());
  return chunks;
}

How to cite and attribute this tool

MIT Licence

This resource is free, open and un-gated under the MIT Open Source Licence. You are encouraged to use, integrate and cite it with attribution:

Geraghty, G. (2026). RAG Chunking & Vector Embedding Benchmark Diagnostic. Gordon Geraghty Resources Hub. https://gordongeraghty.com/resources/ai-engineering/rag-chunking-embedding-benchmark
BibTeX Format
@misc{geraghty_rag_chunking_embedding_benchmark,
  author = {Geraghty, Gordon},
  title = {RAG Chunking & Vector Embedding Benchmark Diagnostic},
  year = {2026},
  url = {https://gordongeraghty.com/resources/ai-engineering/rag-chunking-embedding-benchmark},
  note = {Head of Performance, Empire Amplify}
}

Changelog & Version History

  • v1.0.0Initial release of interactive RAG benchmarking scorecard.