Optimizing Context Retrieval for RAG via Heading-Aware Chunking and Hierarchical Document Structure Integration

While LLMs perform well in general contexts, they often struggle with domain-specific or time-sensitive queries. Retrieval-augmented generation (RAG) offers a more robust approach by incorporating external knowledge. Yet, its effectiveness largely depends on how well the system understands the structure of the source documents. Current methods often overlook hierarchical features found in user guides-like directory structures and nested headings-leading to poor retrieval quality. This study proposes three preprocessing techniques: Overlap-based Heading-aware Chunking, Heading Path Augmentation, and Document Source Path Augmentation. These methods preserve document structure to enhance retrieval accuracy. Evaluated on the AWS Documentation Dataset using an LLM-as-a-Judge setup, our approach significantly improves RAG performance across two embedding models, showing the value of structured context in document-based QA.

Authors

Institutions

Publication Details

Published
2025-08-09
DOI
https://doi.org/10.1109/isci65687.2025.11167620
Primary Topic
Semantic Web and Ontologies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Optimizing Context Retrieval for RAG via Heading-Aware Chunking and Hierarchical Document Structure Integration

Pham Doan Tinh, L. Phuong
Semantic Web and Ontologies
article

Optimizing Context Retrieval for RAG via Heading-Aware Chunking and Hierarchical Document Structure Integration

Pham Doan Tinh, L. Phuong
article en

Abstract

While LLMs perform well in general contexts, they often struggle with domain-specific or time-sensitive queries. Retrieval-augmented generation (RAG) offers a more robust approach by incorporating external knowledge. Yet, its effectiveness largely depends on how well the system understands the structure of the source documents. Current methods often overlook hierarchical features found in user guides-like directory structures and nested headings-leading to poor retrieval quality. This study proposes three preprocessing techniques: Overlap-based Heading-aware Chunking, Heading Path Augmentation, and Document Source Path Augmentation. These methods preserve document structure to enhance retrieval accuracy. Evaluated on the AWS Documentation Dataset using an LLM-as-a-Judge setup, our approach significantly improves RAG performance across two embedding models, showing the value of structured context in document-based QA.

Hanoi University of Science and Technology (VN)
Openalex Percentile: Top 86%
Semantic Web and Ontologies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Optimizing Context Retrieval for RAG via Heading-Aware Chunking and Hierarchical Document Structure Integration — Pham Doan Tinh, L. Phuong · (2025) | TGRS Research Map | TGRS