Large Language Models (LLMs) have demonstrated remarkable capabilities, yet frequently encounter issues with hallucinations. Retrieval-augmented generation (RAG) mitigates this problem by integrating external knowledge. However, current RAG approaches face significant limitations, such as redundant tokens that dilute semantic focus of LLMs and suboptimal prompt ordering. To address these challenges, this paper introduce a fine-grained framework called FG-RAG, with two key components: (1) Refined Prompt Generation. Standalone propositions are firstly extracted from raw documents and dynamically organized into a semantic graph to capture their interrelationships. After retrieving relevant subgraphs from this graph, a Directional Diffusion Model (DDM) is adapted to iteratively refine these graph representations, which are subsequently transformed into soft prompts compatible with LLMs; (2) Prompt Ordering. With these soft prompts, this work formulates prompt ordering as a Markov Decision Process (MDP) and optimize it through Reinforcement Learning (RL). By leveraging reward derived from prompts performance, the RL agent learns to order prompts to maximize the accuracy of the LLMs’ output, ensuring optimal utilization of the generated prompts. Extensive evaluations of question-answering benchmarks demonstrate that FG-RAG outperforms state-of-the-art RAG methods, with 1.3% EM and 1.5%F1 score improvements.
Xu et al. (Wed,) studied this question.