Agentic Knowledgeable Self-awareness
Introduces KnowSelf for LLMs' situational self-awareness, using two-stage training to enhance planning with minimal external knowledge.
Key Findings
Methodology
The approach constructs a heuristic situation judgment criterion to classify trajectories into fast, slow, and knowledge-dependent states, marking them with special tokens. These tokens serve as supervision signals for a two-stage training process: initial autoregressive fine-tuning and RPO-based reinforcement. During inference, the model generates these tokens to dynamically decide whether to reflect or query external knowledge, enabling autonomous resource regulation. This framework emphasizes self-assessment, reducing external knowledge reliance and improving planning efficiency.
Key Results
- On ALFWorld and WebShop, KnowSelf outperforms baselines, with Gemma-2B achieving 84.33% and Llama-8B 79.85% average reward. Minimal knowledge injection (~15-26%) yields optimal performance, while excessive knowledge degrades results, confirming the importance of self-awareness-based regulation.
- In out-of-distribution tasks like Heat and Cool, KnowSelf demonstrates superior generalization, significantly surpassing traditional pattern-fitting models. The results show that training with 40% or more self-awareness data markedly improves robustness across different task types and scales.
- Ablation studies reveal that removing reflection or overloading with knowledge hampers performance. The internal activation of knowledge and action tokens in the final layers indicates that the model internally determines when to invoke knowledge, validating the mechanism's effectiveness.
Significance
This work advances autonomous decision-making in language models by integrating human-like situational self-awareness, enabling models to adaptively regulate knowledge usage. It addresses the longstanding challenge of brittle planning and over-reliance on external data, offering a scalable, generalizable framework. The approach paves the way for more robust, resource-efficient AI systems capable of complex reasoning in dynamic environments, with broad implications for robotics, virtual assistants, and decision support systems.
Technical Contribution
The paper introduces the concept of agentic knowledgeable self-awareness, combining heuristic situation judgment with special token signaling. The two-stage training—supervised fine-tuning plus RPO-based reinforcement—enables models to autonomously assess and adapt their knowledge utilization. The internal activation analysis of the Transformer layers reveals that knowledge and action tokens emerge in the last layers, providing a theoretical basis for the mechanism. This framework differs from prior pattern-matching or blind knowledge injection methods, offering a principled way to improve generalization and efficiency.
Novelty
This is the first systematic integration of situational self-awareness into large language models for planning tasks, using special token marking and a two-stage training process. Unlike previous methods that blindly inject external knowledge, this approach enables models to autonomously judge when to reflect or query knowledge, significantly reducing unnecessary resource use and improving robustness across tasks. The internal activation analysis further uncovers the neural basis of this self-awareness, marking a new direction in AI cognition research.
Limitations
- The heuristic situation judgment may misclassify complex or ambiguous scenarios, potentially leading to suboptimal resource regulation.
- Special token design and marking require manual tuning, which could limit scalability or transferability to other tasks or architectures.
- The reliance on last-layer activations for knowledge inference might not generalize well across different model architectures or training regimes, necessitating further investigation.
Future Work
Future research will focus on automating the situation judgment process, possibly via reinforcement learning, to reduce manual tuning. Extending the knowledge system to support dynamic updates and multi-modal inputs will enhance adaptability. Additionally, exploring multi-task and multi-environment self-awareness mechanisms will push the boundaries of autonomous AI cognition, aiming for more flexible and resilient intelligent agents.
AI Executive Summary
The rapid development of large language models (LLMs) has significantly advanced autonomous planning capabilities, yet existing methods largely depend on indiscriminate external knowledge injection. This approach often leads to inefficiencies and brittleness, especially in complex or unforeseen environments. Inspired by human cognition, this research introduces 'agentic knowledgeable self-awareness,' a novel framework that enables models to autonomously assess their situational capabilities and regulate knowledge utilization accordingly.
Central to this framework is the construction of a heuristic situation judgment criterion, which classifies the model's exploration trajectories into three categories: fast thinking, slow thinking, and knowledge-dependent states. These categories are marked with special tokens during training, forming the basis for supervised learning. The training process involves two stages: first, a standard autoregressive fine-tuning to establish baseline planning patterns; second, an RPO-based reinforcement phase that enhances the model's ability to self-assess and adapt.
During inference, the model generates special tokens indicating its current situational state, guiding whether to reflect, query external knowledge, or proceed directly. Extensive experiments on ALFWorld and WebShop datasets demonstrate that KnowSelf surpasses baseline models, achieving up to 84.33% average reward with minimal external knowledge (~15%). It also exhibits strong out-of-distribution generalization, maintaining performance across unseen tasks. Ablation studies confirm that the mechanism of internal activation of knowledge and action tokens is critical for the model's self-awareness.
This work marks a significant step toward autonomous, resource-efficient AI systems capable of complex decision-making. By embedding human-like self-assessment into models, it reduces reliance on external data, enhances robustness, and broadens application prospects in robotics, virtual assistants, and beyond. Future directions include automating judgment criteria, supporting dynamic knowledge updates, and extending self-awareness to multi-modal, multi-task scenarios, promising a new era of intelligent, self-regulating AI agents.
Deep Analysis
Background
Recent advances in pre-trained language models such as GPT-4, BERT, and their derivatives have revolutionized NLP and AI planning. These models have demonstrated remarkable abilities in multi-task learning, reasoning, and decision-making. Notable works like ReAct, Reflexion, and ExpeL have integrated reasoning and reflection mechanisms to improve planning performance. However, these approaches often rely heavily on external knowledge bases or trajectory imitation, lacking intrinsic self-assessment capabilities. This leads to brittle behaviors in novel environments, overfitting to training trajectories, and high inference costs. The challenge remains to endow models with human-like situational awareness, enabling them to decide when to reflect, query, or act directly, thus improving robustness and efficiency.
Core Problem
Despite progress, current LLM-based agents lack dynamic self-awareness, which is crucial for flexible decision-making in complex environments. Existing methods do not enable models to autonomously judge their situational capabilities, resulting in inefficient planning, excessive reliance on external knowledge, and poor generalization to unseen tasks. This gap hampers the deployment of autonomous agents in real-world scenarios where adaptability and resource management are vital. Developing a mechanism for models to internally assess their situational state and regulate knowledge usage remains an open and pressing problem.
Innovation
The core innovation is the introduction of agentic knowledgeable self-awareness, achieved through: 1) a heuristic situation judgment criterion that classifies trajectories into three states; 2) special tokens that mark these states during data construction; 3) a two-stage training process combining supervised fine-tuning and RPO-based reinforcement learning to instill self-assessment capabilities. This approach enables models to generate situational tokens during inference, guiding resource allocation dynamically. Unlike prior methods that blindly inject external knowledge, this framework emphasizes autonomous judgment, reducing unnecessary knowledge invocation and improving planning robustness. The internal activation analysis further reveals that knowledge and action tokens emerge in the last layers, providing a neural basis for self-awareness.
Methodology
- ��Knowledge system construction: offline collection of trajectories to form a lightweight knowledge base (K) and selection module (R).•Situation judgment criterion: heuristic rules classify trajectories into fast, slow, and knowledge-dependent states based on predicted vs. gold actions and rethinking outcomes.•Data augmentation: insert special tokens into trajectories according to classification, creating supervised training data.•Two-stage training:• Stage 1: autoregressive fine-tuning with cross-entropy loss to learn initial planning patterns.• Stage 2: RPO loss (Pang et al., 2024) combined with normalized negative log-likelihood to enhance self-awareness.•Inference: model generates special tokens indicating current situation, guiding whether to reflect, query knowledge, or proceed directly, thus enabling autonomous resource regulation.
Experiments
Experiments conducted on ALFWorld and WebShop datasets evaluate models Gemma-2B and Llama-8B. Metrics include average reward, comparing with baselines like REACT, Reflexion, and ExpeL. The training involves hyperparameters such as learning rates (2e-5, 5e-7), batch sizes (8, 3), and loss weights (β=0.5). Ablation studies remove reflection or knowledge components to assess their impact. Generalization tests involve unseen tasks (Heat, Cool). Results show significant improvements with minimal knowledge (~15%), outperforming baselines, and demonstrating robustness across scales and tasks.
Results
KnowSelf achieves up to 84.33% average reward on ALFWorld, surpassing baselines like REACT and Reflexion, with only 15-26% knowledge usage. It maintains performance on out-of-distribution tasks, indicating strong generalization. Ablation results confirm that removing reflection or overloading with knowledge reduces performance, highlighting the importance of self-assessment. Internal activation analysis shows knowledge and action tokens emerge in the last layers, validating the neural basis of self-awareness. These findings demonstrate that autonomous judgment and resource regulation significantly enhance planning robustness and efficiency.
Applications
This framework can be applied to autonomous robots, virtual assistants, and decision-support systems requiring adaptive planning. It enables models to operate efficiently with limited external knowledge, reducing costs and improving robustness. Future applications may include multi-modal environments, dynamic knowledge updating, and multi-task coordination, broadening the scope of autonomous AI in real-world scenarios.
Limitations & Outlook
The heuristic judgment rules may misclassify complex situations, affecting accuracy. Special token design requires manual tuning, limiting scalability. The reliance on last-layer activations may not generalize across architectures, necessitating further research. Additionally, computational costs of training and inference remain significant, especially for larger models. Future work should focus on automating judgment criteria, improving generalization, and reducing resource requirements.
Plain Language Accessible to non-experts
想象你在厨房里做饭。你面对不同的菜谱和食材,有时候你知道怎么做,只需简单操作(快思考);有时候你需要仔细考虑每一步(慢思考);遇到不熟悉的菜谱,你可能要查资料(知识依赖)。这就像是让厨师学会自己判断:什么时候用手头的材料,什么时候需要去买新东西,甚至什么时候需要多试几次才能做好。这个研究就是在教AI像厨师一样自己判断,什么时候用已有的知识,什么时候需要查资料或反思。这样,它就能更聪明、更自主地应对各种厨房挑战,做出更好吃的菜。
ELI14 Explained like you're 14
想象你在玩一款游戏,遇到不同的关卡。有时候你一下就知道怎么过(快思考),有时候你要仔细想一想每一步(慢思考),还遇到不懂的地方就得查攻略(知识依赖)。这就像让你的游戏角色变得更聪明,知道什么时候用技能,什么时候查资料,甚至什么时候升级装备。这个研究就是在教AI学会自己判断:什么时候用已有的知识,什么时候需要帮忙。这样,它就能更聪明、更自主地应对各种挑战,不再总是依赖外部提示,变得更厉害!
Abstract
Large Language Models (LLMs) have achieved considerable performance across various agentic planning tasks. However, traditional agent planning approaches adopt a "flood irrigation" methodology that indiscriminately injects gold trajectories, external feedback, and domain knowledge into agent models. This practice overlooks the fundamental human cognitive principle of situational self-awareness during decision-making-the ability to dynamically assess situational demands and strategically employ resources during decision-making. We propose agentic knowledgeable self-awareness to address this gap, a novel paradigm enabling LLM-based agents to autonomously regulate knowledge utilization. Specifically, we propose KnowSelf, a data-centric approach that applies agents with knowledgeable self-awareness like humans. Concretely, we devise a heuristic situation judgement criterion to mark special tokens on the agent's self-explored trajectories for collecting training data. Through a two-stage training process, the agent model can switch between different situations by generating specific special tokens, achieving optimal planning effects with minimal costs. Our experiments demonstrate that KnowSelf can outperform various strong baselines on different tasks and models with minimal use of external knowledge. Code is available at https://github.com/zjunlp/KnowSelf.