--- license: cc-by-4.0 task_categories: - question-answering - text-retrieval language: - en tags: - pdf - rag - chunking - retrieval - benchmark - docuweave size_categories: - 1K Jannegorla, Venkateswara Rao (2026). DocuWeave: Layout-Aware PDF Chunking for Retrieval-Augmented Generation Pipelines. **PyPI:** `pip install docuweave` ยท **GitHub:** [VenkateswaraRao18/docuweave](https://github.com/VenkateswaraRao18/docuweave) ## Overview DocuWeave-Bench is a dataset of **6,100 question-answer pairs** grounded in **417 real-world PDFs** spanning five domains: research papers, technical documentation, legal documents, financial reports, and medical literature. It was designed to evaluate and compare PDF chunking strategies for Retrieval-Augmented Generation (RAG) pipelines. The benchmark is introduced in the paper **DocuWeave: Layout-Aware PDF Chunking for Retrieval-Augmented Generation** by Venkateswara Rao Jannegorla (2026). ## Dataset Statistics | Split | # PDFs | # QA Pairs | Avg Q/PDF | |-------|--------|------------|-----------| | test | 417 | 6,100 | ~14.6 | | Domain | # PDFs | # QA Pairs | |------------------|--------|------------| | research_papers | 92 | ~1,340 | | technical_docs | 87 | ~1,270 | | legal_docs | 83 | ~1,210 | | financial_reports| 79 | ~1,150 | | medical_docs | 76 | ~1,130 | ## Benchmark Results | Chunker | R@1 | R@3 | R@5 | nDCG@10 | MRR | |----------------------|--------|--------|--------|---------|--------| | **DocuWeave** | **0.2862** | **0.4475** | **0.5149** | **0.4336** | **0.3837** | | Naive (fixed-size) | 0.1975 | 0.3495 | 0.4351 | 0.3958 | 0.3001 | | Recursive | 0.1790 | 0.3307 | 0.4143 | 0.3659 | 0.2792 | | LangChain | 0.1475 | 0.2707 | 0.3395 | 0.2938 | 0.2291 | | Semantic | 0.1184 | 0.2018 | 0.2518 | 0.2742 | 0.1753 | | PDFPlumber | 0.1126 | 0.1926 | 0.2393 | 0.2649 | 0.1660 | Embeddings: `BAAI/bge-base-en-v1.5`. Retrieval: FAISS flat index, top-10. All differences vs DocuWeave are statistically significant (Wilcoxon, p < 0.001). ## Files ``` paper/ docuweave_paper.pdf # Full research paper data/ qa_pairs.jsonl # 6,100 QA pairs (one JSON object per line) pdfs/ research_papers/ # 92 PDFs technical_docs/ # 87 PDFs legal_docs/ # 83 PDFs financial_reports/ # 79 PDFs medical_docs/ # 76 PDFs ``` ## QA Pair Schema ```json { "query": "What is the authors proposed method?", "answer": "The authors propose ...", "question_type": "factoid", "domain": "research", "pdf": "datasets/pdfs/research_papers/arxiv_2301_00001.pdf", "gold_chunk_id": "a3f7b2...", "gold_text": "We propose DocuWeave, a layout-aware PDF chunker ...", "section_title": "3. Method", "page_start": 4, "page_end": 5 } ``` ## Usage ```python from datasets import load_dataset ds = load_dataset("mrjvenky18/docuweave-bench", data_files="data/qa_pairs.jsonl") from huggingface_hub import hf_hub_download # Download the paper paper = hf_hub_download( repo_id="mrjvenky18/docuweave-bench", repo_type="dataset", filename="paper/docuweave_paper.pdf" ) ``` ## Citation ```bibtex @article{jannegorla2026docuweave, title = {DocuWeave: Layout-Aware PDF Chunking for Retrieval-Augmented Generation}, author = {Jannegorla, Venkateswara Rao}, journal = {arXiv preprint}, year = {2026}, } ``` ## License The benchmark QA pairs and scripts are released under **CC BY 4.0**. PDFs are sourced from public repositories (arXiv, SEC EDGAR, PubMed, government portals) and redistributed under their respective open licenses.