Table of Contents
Fetching ...

Empowering Large Language Models to Set up a Knowledge Retrieval Indexer via Self-Learning

Xun Liang, Simin Niu, Zhiyu li, Sensen Zhang, Shichao Song, Hanyu Wang, Jiawei Yang, Feiyu Xiong, Bo Tang, Chenyang Xi

TL;DR

This work tackles the cost and noise challenges of building knowledge repositories for retrieval-augmented generation by introducing PG-RAG, a pre-retrieval framework in which LLMs autonomously read raw material and construct a hierarchical pseudo-graph of topics, routes, and facts. The method formalizes a graph $\mathcal{PG}$ with mind maps $\mathcal{M}$ and cross-document links, and defines a retrieval objective to produce a sub-graph $\mathcal{Z} \subseteq \mathcal{PG}$ that supports generation via $p(\mathcal{Z}|q) \cdot p(o|q, \mathcal{Z})$. Key contributions include (i) a generalizable, knowledge-driven indexing paradigm that reduces preset constraints; (ii) cross-document knowledge construction by clustering mind maps into super-nodes and learning fact-path embeddings; and (iii) a structured evidence mechanism that transforms queries into Key Points (KPs) and uses a matrix-based recall pipeline (template, pathway, control, staining, and aggregate matrices) to localize evidence efficiently, with $Z$ determined by $Z = \text{topK}(\sum_v CM^{v^{seed}} \odot PM^{v^{seed}})$. Experimental results on the CRUD-RAG benchmark show substantial improvements in single- and multi-document QA metrics (e.g., BLEU and QE-F1), demonstrating stronger, more scalable knowledge grounding for LLMs in knowledge-intensive tasks. The approach offers practical impact for deploying accurate, fast RAG systems across domains where cross-document reasoning is essential.

Abstract

Retrieval-Augmented Generation (RAG) offers a cost-effective approach to injecting real-time knowledge into large language models (LLMs). Nevertheless, constructing and validating high-quality knowledge repositories require considerable effort. We propose a pre-retrieval framework named Pseudo-Graph Retrieval-Augmented Generation (PG-RAG), which conceptualizes LLMs as students by providing them with abundant raw reading materials and encouraging them to engage in autonomous reading to record factual information in their own words. The resulting concise, well-organized mental indices are interconnected through common topics or complementary facts to form a pseudo-graph database. During the retrieval phase, PG-RAG mimics the human behavior in flipping through notes, identifying fact paths and subsequently exploring the related contexts. Adhering to the principle of the path taken by many is the best, it integrates highly corroborated fact paths to provide a structured and refined sub-graph assisting LLMs. We validated PG-RAG on three specialized question-answering datasets. In single-document tasks, PG-RAG significantly outperformed the current best baseline, KGP-LLaMA, across all key evaluation metrics, with an average overall performance improvement of 11.6%. Specifically, its BLEU score increased by approximately 14.3%, and the QE-F1 metric improved by 23.7%. In multi-document scenarios, the average metrics of PG-RAG were at least 2.35% higher than the best baseline. Notably, the BLEU score and QE-F1 metric showed stable improvements of around 7.55% and 12.75%, respectively. Our code: https://github.com/IAAR-Shanghai/PGRAG.

Empowering Large Language Models to Set up a Knowledge Retrieval Indexer via Self-Learning

TL;DR

This work tackles the cost and noise challenges of building knowledge repositories for retrieval-augmented generation by introducing PG-RAG, a pre-retrieval framework in which LLMs autonomously read raw material and construct a hierarchical pseudo-graph of topics, routes, and facts. The method formalizes a graph with mind maps and cross-document links, and defines a retrieval objective to produce a sub-graph that supports generation via . Key contributions include (i) a generalizable, knowledge-driven indexing paradigm that reduces preset constraints; (ii) cross-document knowledge construction by clustering mind maps into super-nodes and learning fact-path embeddings; and (iii) a structured evidence mechanism that transforms queries into Key Points (KPs) and uses a matrix-based recall pipeline (template, pathway, control, staining, and aggregate matrices) to localize evidence efficiently, with determined by . Experimental results on the CRUD-RAG benchmark show substantial improvements in single- and multi-document QA metrics (e.g., BLEU and QE-F1), demonstrating stronger, more scalable knowledge grounding for LLMs in knowledge-intensive tasks. The approach offers practical impact for deploying accurate, fast RAG systems across domains where cross-document reasoning is essential.

Abstract

Retrieval-Augmented Generation (RAG) offers a cost-effective approach to injecting real-time knowledge into large language models (LLMs). Nevertheless, constructing and validating high-quality knowledge repositories require considerable effort. We propose a pre-retrieval framework named Pseudo-Graph Retrieval-Augmented Generation (PG-RAG), which conceptualizes LLMs as students by providing them with abundant raw reading materials and encouraging them to engage in autonomous reading to record factual information in their own words. The resulting concise, well-organized mental indices are interconnected through common topics or complementary facts to form a pseudo-graph database. During the retrieval phase, PG-RAG mimics the human behavior in flipping through notes, identifying fact paths and subsequently exploring the related contexts. Adhering to the principle of the path taken by many is the best, it integrates highly corroborated fact paths to provide a structured and refined sub-graph assisting LLMs. We validated PG-RAG on three specialized question-answering datasets. In single-document tasks, PG-RAG significantly outperformed the current best baseline, KGP-LLaMA, across all key evaluation metrics, with an average overall performance improvement of 11.6%. Specifically, its BLEU score increased by approximately 14.3%, and the QE-F1 metric improved by 23.7%. In multi-document scenarios, the average metrics of PG-RAG were at least 2.35% higher than the best baseline. Notably, the BLEU score and QE-F1 metric showed stable improvements of around 7.55% and 12.75%, respectively. Our code: https://github.com/IAAR-Shanghai/PGRAG.
Paper Structure (20 sections, 11 equations, 7 figures, 5 tables, 2 algorithms)

This paper contains 20 sections, 11 equations, 7 figures, 5 tables, 2 algorithms.

Figures (7)

  • Figure 1: Motivation. Existing RAG suffers from several issues: (1) limited retrieval granularity: Chain/Tree/Graph-RAG typically use a fixed granularity, such as sentences. KG-RAG employs type-preset structures, such as entities and triples; (2) restricted relationships: similarity is often utilized to generalize various logical relations, and the relations in KGs necessitate strict definitions.
  • Figure 2: Pseudo-Graph Construction Overview. (1) We first extract FCIs to convert a text into loosely structured evidence entries and perform consistency checks on FCIs. (2) We input the verified FCIs along with their MT into LLMs to generate a mind map. (3) We perform knowledge fusion at the topic and fact levels, constructing super nodes and cross-document links to form a pseudo-graph.
  • Figure 3: Pseudo-Graph Walking Overview. (1) Query the pseudo-graph database to locate seed topics. (2) Explore nodes linked to seed topics to form candidate nodes. (3) Load ids and vectors of the candidate nodes into template matrices (TMs). (4) Generate KPs to assist retrieval. (5) Get similarity matrices (SMs) based on KPs and $\mathcal{PG}_{vector}$. (6) Select top fact paths as seed nodes. (7) Create control matrices (CMs) to assess the contribution value of candidate nodes to seed nodes. (8) Select boundaries to determine the reachable area from seed nodes. (9) Set values within boundaries to 1, generate pathway matrices (PM) for seed nodes. (10) Multiply CMs by PMs to generate Staining Matrices (SMs), which indicate the contribution values of candidate nodes accessible from seed nodes. Sum all SMs to produce an Aggregate Matrix (AM), representing the overall contribution of candidate nodes to query. Integrate the top rows (fact paths) from AM into structured context $\mathcal{Z}$.
  • Figure 4: Comparison of the block and fact embedding distributions in 2D space.
  • Figure 5: Comparison of matching ability between raw query and KPs.
  • ...and 2 more figures