[Paper Review] Late Chunking: Contextual Chunk Embeddings Using Long-Context Embedding Models
This paper introduces late chunking, a method that applies chunking after long-context embedding to preserve full document context, significantly improving retrieval performance. By leveraging long-context models before splitting text into chunks, the approach enhances semantic representation without additional training, outperforming naive chunking across multiple benchmarks.
Many use cases require retrieving smaller portions of text, and dense vector-based retrieval systems often perform better with shorter text segments, as the semantics are less likely to be over-compressed in the embeddings. Consequently, practitioners often split text documents into smaller chunks and encode them separately. However, chunk embeddings created in this way can lose contextual information from surrounding chunks, resulting in sub-optimal representations. In this paper, we introduce a novel method called late chunking, which leverages long context embedding models to first embed all tokens of the long text, with chunking applied after the transformer model and just before mean pooling - hence the term late in its naming. The resulting chunk embeddings capture the full contextual information, leading to superior results across various retrieval tasks. The method is generic enough to be applied to a wide range of long-context embedding models and works without additional training. To further increase the effectiveness of late chunking, we propose a dedicated fine-tuning approach for embedding models.
Motivation & Objective
- To address the loss of long-range contextual dependencies in traditional text chunking for dense retrieval.
- To improve semantic representation of text chunks by preserving inter-chunk context during embedding generation.
- To develop a generic, training-free method applicable to various long-context embedding models.
- To explore fine-tuning strategies that further enhance retrieval performance with late chunking.
- To empirically validate late chunking across diverse retrieval benchmarks and compare it with existing approaches.
Proposed method
- Apply a long-context embedding model to the entire document first, generating full-context token embeddings before any chunking.
- Perform chunking on the full sequence of token embeddings, then apply mean pooling to generate contextual chunk embeddings.
- Use the resulting embeddings for retrieval tasks, ensuring each chunk inherits semantic context from surrounding text.
- Propose a long late chunking approach for documents exceeding model context length by processing them in overlapping or segmented sequences.
- Introduce a dedicated contrastive fine-tuning method using span-annotated datasets to improve retrieval accuracy with late chunking.
- Leverage existing long-context models like jina-embeddings-v2-small without architectural modifications or retraining.
Experimental results
Research questions
- RQ1Can late chunking improve retrieval performance by preserving inter-chunk semantic dependencies?
- RQ2How does late chunking compare to naive chunking in terms of cosine similarity for contextually relevant chunks?
- RQ3Does the late chunking approach remain effective when the input document exceeds the model's maximum context length?
- RQ4Can fine-tuning further enhance retrieval accuracy when using late chunking?
- RQ5How does late chunking compare to LLM-augmented contextual embedding methods in terms of performance and inference cost?
Key findings
- Late chunking improved cosine similarity scores for contextually relevant chunks by up to 0.1165 compared to naive chunking, e.g., from 0.7084 to 0.8249 for a sentence referencing 'Berlin'.
- In the FEVER and TriviaQA datasets, span pooling during fine-tuning showed a small but consistent improvement over mean pooling.
- Late chunking achieved similarity scores comparable to LLM-augmented contextual embedding methods (e.g., 0.8516 vs. 0.8590) but without requiring an additional LLM inference step.
- The method outperformed naive chunking across all evaluated retrieval benchmarks, including financial, Wikipedia, and QA-style documents.
- Fine-tuning with span-annotated data led to measurable gains over standard contrastive training, especially in zero-shot and few-shot settings.
- The long late chunking approach effectively handled documents longer than the model’s context window, maintaining high-quality embeddings through overlapping or segmented processing.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.