{"product_id":"benchmark-rag-chunking-strategies-with-gemini-drive-pdfs","title":"Benchmark RAG Chunking Strategies with Gemini, Drive PDFs","description":"\u003ch3\u003eBenchmark RAG Chunking Strategies on Your Own PDFs—Automatically\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow benchmarks three Retrieval-Augmented Generation (RAG) chunking approaches on your PDFs—fixed-size, semantic, and parent-document chunking—using free Gemini models, a strict LLM judge, and an emailed comparison report.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003e1) Diagnostics setup in Google Drive:\u003c\/strong\u003e Drop PDFs into a Google Drive folder, then run the workflow to start the benchmark.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003e2) Parallel chunking experiments:\u003c\/strong\u003e The workflow creates three chunking “arms” in parallel:\n    \u003cul\u003e\n      \u003cli\u003e\n\u003cstrong\u003eFixed-size recursive chunking with overlap\u003c\/strong\u003e (baseline)\u003c\/li\u003e\n      \u003cli\u003e\n\u003cstrong\u003eSemantic chunking\u003c\/strong\u003e that cuts based on meaning shifts using \u003cstrong\u003eGemini embeddings\u003c\/strong\u003e\n\u003c\/li\u003e\n      \u003cli\u003e\n\u003cstrong\u003eParent-document chunking\u003c\/strong\u003e that pairs small precise child chunks with their parent context\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003e3) Retrieval + answer generation:\u003c\/strong\u003e For each test question, the workflow embeds the question with Gemini (free embedding model), finds top matches using cosine similarity (implemented in plain \u003cstrong\u003eCode\u003c\/strong\u003e for transparency), and generates answers from retrieved context using Gemini.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003e4) Strict evaluation:\u003c\/strong\u003e An LLM judge scores each strategy for:\n    \u003cul\u003e\n      \u003cli\u003e\n\u003cstrong\u003eGroundedness\u003c\/strong\u003e (are claims supported by the context?)\u003c\/li\u003e\n      \u003cli\u003e\n\u003cstrong\u003eRecall\u003c\/strong\u003e (do expected keywords appear?)\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003e5) Results + emailed report:\u003c\/strong\u003e Scores are merged into a comparison sheet, the winning chunking strategy is crowned by combined score, and you receive an \u003cstrong\u003eemail with per-question detail\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eFind the best RAG chunking strategy for your document set before deploying to production.\u003c\/li\u003e\n  \u003cli\u003eEvaluate semantic vs fixed chunking for different question types on your own PDFs.\u003c\/li\u003e\n  \u003cli\u003eTune RAG retrieval quality for a SaaS knowledge base without guessing.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGemini API key setup:\u003c\/strong\u003e Use a free key from aistudio.google.com (free tier: 1,500 requests\/day; no credit card).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes used:\u003c\/strong\u003e \u003cem\u003eset\u003c\/em\u003e, \u003cem\u003ecode\u003c\/em\u003e, \u003cem\u003egmail\u003c\/em\u003e, \u003cem\u003emerge\u003c\/em\u003e, \u003cem\u003esticky note\u003c\/em\u003e, \u003cem\u003egoogle drive\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eConfiguration:\u003c\/strong\u003e Provide Google Drive folder ID, Gemini API key, and your email in the Workflow Configuration node; replace the sample questions in the Test Question Set node with your real user queries.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46244549722291,"sku":"N8N-21127","price":71.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/rqTNfO9gFCyI-mW5wfLfq_gOJrIShs.png?v=1792401517","url":"https:\/\/buyflowscripts.com\/products\/benchmark-rag-chunking-strategies-with-gemini-drive-pdfs","provider":"N8N Commerce","version":"1.0","type":"link"}