LumberChunker: Long-Form Narrative Document Segmentation

André V. Duarte, João Marques, Miguel Graça, Miguel Freire, Lei Li +1 more
6/25/2024
69 citations
cs.CLcs.IR

Official code: joaodsmarques/LumberChunker (120 stars, Jupyter Notebook, last commit 2026-02-09).

Abstract

Modern NLP tasks increasingly rely on dense retrieval methods to access up-to-date and relevant contextual information. We are motivated by the premise that retrieval benefits from segments that can vary in size such that a content's semantic independence is better captured.

Show full abstract

We propose LumberChunker, a method leveraging an LLM to dynamically segment documents, which iteratively prompts the LLM to identify the point within a group of sequential passages where the content begins to shift. To evaluate our method, we introduce GutenQA, a benchmark with 3000 "needle in a haystack" type of question-answer pairs derived from 100 public domain narrative books available on Project Gutenberg. Our experiments show that LumberChunker not only outperforms the most competitive baseline by 7.37% in retrieval performance (DCG@20) but also that, when integrated into a RAG pipeline, LumberChunker proves to be more effective than other chunking methods and competitive baselines, such as the Gemini 1.5M Pro. Our Code and Data are available at https://github.com/joaodsmarques/LumberChunker

View on arXivView PDF

Code Implementations(1)

This repository presents the original implementation of LumberChunker: Long-Form Narrative Document Segmentation by André V. Duarte, João Marques, Miguel Graça, Miguel Freire, Lei Li and Arlindo L. Oliveira (accepted at EMNLP 2024 Findings)

12013Jupyter Notebook, PythonJun 12, 20249 months ago

Similar Papers

Cite this paper

@article{duarte2024lumberchunker,
  title  = {LumberChunker: Long-Form Narrative Document Segmentation},
  author = {André V. Duarte and João Marques and Miguel Graça and Miguel Freire and Lei Li and Arlindo L. Oliveira},
  year   = {2024},
  eprint = {2406.17526},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.17526v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.17526.svg)](https://codeofpaper.com/paper/2406.17526)

Discussion