Two-Stage Retrieval and Cross-Segment Alignment for LLM Retrieval-Augmented Generation
Abstract
This paper proposes a retrieval-augmented generation algorithm that integrates two-stage retrieval reranking with cross-segment semantic alignment to address the challenges of insufficient coverage and semantic consistency in complex knowledge environments. In the retrieval stage, both sparse and dense channels are employed to ensure breadth and semantic depth through a dual-channel candidate pool, while a reranking mechanism balances relevance and contextual coherence. In the alignment stage, a cross-segment semantic aggregation module is constructed, which integrates multiple evidence fragments through attention weighting and redundancy suppression to form a logically consistent global representation that provides high-quality context for generation. A joint optimization strategy combining coverage control and alignment loss is further designed to ensure that retrieval and generation work collaboratively under a unified objective. Experiments conducted on hyperparameter sensitivity, environmental sensitivity, and data sensitivity, including factors such as candidate size, resource constraints, index freshness, redundancy suppression, and coverage control, demonstrate the robustness and stability of the proposed method across multiple dimensions. Results show that the framework significantly outperforms existing methods on key metrics, including retrieval precision, semantic consistency, entity recall, and generation quality, achieving efficient evidence aggregation and context modeling in complex semantic scenarios. Overall, the proposed two-stage retrieval and cross-segment alignment framework realizes closed-loop optimization from retrieval to generation and substantially improves the overall performance of retrieval-augmented generation systems.