SeaKR: Self-aware Knowledge Retrieval for Adaptive Retrieval Augmented Generation
Zijun Yao, Weijian Qi, Liangming Pan, Shulin Cao, Linmei Hu, Weichuan Liu, Lei Hou, Juanzi Li
TL;DR
SeaKR addresses the adaptive retrieval problem in Retrieval Augmented Generation by leveraging self-aware uncertainty derived from LLM internal states. It uses a three-component loop—self-aware retrieval, self-aware re-ranking, and self-aware reasoning—to dynamically decide when to fetch knowledge, which snippets to trust, and which reasoning path to adopt, all guided by an internal uncertainty estimator based on the Gram determinant of internal representations. Empirically, SeaKR outperforms existing adaptive RAG baselines on complex QA and shows competitive gains on simple QA, while remaining tuning-free and scalable with stronger LLMs. The approach offers a principled mechanism to fuse external knowledge with parametric knowledge, reducing hallucinations and improving factuality in knowledge-intensive tasks.
Abstract
This paper introduces Self-aware Knowledge Retrieval (SeaKR), a novel adaptive RAG model that extracts self-aware uncertainty of LLMs from their internal states. SeaKR activates retrieval when the LLMs present high self-aware uncertainty for generation. To effectively integrate retrieved knowledge snippets, SeaKR re-ranks them based on LLM's self-aware uncertainty to preserve the snippet that reduces their uncertainty to the utmost. To facilitate solving complex tasks that require multiple retrievals, SeaKR utilizes their self-aware uncertainty to choose among different reasoning strategies. Our experiments on both complex and simple Question Answering datasets show that SeaKR outperforms existing adaptive RAG methods. We release our code at https://github.com/THU-KEG/SeaKR.
