Agentic Knowledgeable Self-awareness

Shuofei Qiao, Zhisong Qiu, Baochang Ren, Xiaobin Wang, Xiangyuan Ru, Ningyu Zhang, Xiang Chen, Yong Jiang, Pengjun Xie, Fei Huang, Huajun Chen

Introduction

Current Large Language Model (LLM) agents often suffer from a "flood irrigation" approach to training, where gold trajectories, external feedback, and domain knowledge are indiscriminately injected. This strategy leads to high inference costs and fragile performance, as models function as "unconscious pattern-fitters" rather than strategic decision-makers. To address this, we introduce KnowSelf, a framework that endows agents with agentic knowledgeable self-awareness. This allows agents to autonomously decide when to act quickly, when to stop and reflect, and when to seek external knowledge.

The KnowSelf framework allows agents to dynamically assess task difficulty and choose between Fast Thinking, Slow Thinking (reflection), and Knowledgeable Thinking (external query).

The KnowSelf Framework

KnowSelf adopts a human-like cognitive principle: the ability to dynamically assess situational demands and strategically employ resources. The framework categorizes agent actions into three situational types:

  • Fast Thinking: The agent provides the correct action directly based on internal weights.
  • Slow Thinking: The agent recognizes an initial error and self-corrects through internal reflection.
  • Knowledgeable Thinking: The agent identifies a lack of internal capability and queries an external knowledge base.

Training Pipeline

The KnowSelf pipeline consists of three primary stages:

  1. Situation Labeling: Self-explored trajectories are heuristically marked with special tokens (Reflection and Knowledge) based on success, the need for a "rethink," or the requirement for external assistance.
  2. Two-Stage Learning:
    • Stage 1 (SFT): Supervised Fine-Tuning on curated self-awareness data to establish initial planning patterns.
  3. Stage 2 (RPO): Relative Preference Optimization (a variant of DPO) to sharpen the agent's ability to distinguish between situational demands using positive and negative samples.
  4. Inference: During execution, the agent generates these special tokens to trigger internal reflection or external knowledge retrieval only when necessary, avoiding the overhead of constant querying.

Experimental Results

The framework was evaluated on simulated planning benchmarks, including ALFWorld (household manipulation) and WebShop (online shopping), using Llama-3.1-8B-Instruct and Gemma-2-2B-it as backbones.

Performance analysis of KnowSelf, showing (a) ablation studies across different model sizes, (b) superior generalization in out-of-distribution tasks, and (c) the scaling law of knowledge injection.

Key Findings

  • Superior Performance: KnowSelf (Llama-8B) achieved an average reward of 84.33% on ALFWorld, outperforming GPT-4o using standard ReACT (76.12%) and Reflexion (85.07%) methods despite the significant difference in model scale.
  • The Knowledge Paradox: Injecting knowledge 100% of the time can actually degrade performance. KnowSelf outperformed "full knowledge" baselines while only querying external knowledge 15–26% of the time.
  • Robust Generalization: In out-of-distribution (OOD) tests, KnowSelf maintained high success rates on challenging tasks where traditional baselines dropped to near 0% success due to pattern overfitting.
  • Emergent Awareness: Probing internal states revealed that the decision to invoke knowledge or reflection emerges in the final few layers of the Transformer, suggesting the model internally determines its own uncertainty just before action generation.

Conclusion and Future Work

KnowSelf demonstrates that agentic self-awareness significantly improves efficiency and robustness in LLM agents. By avoiding unnecessary computational steps and database queries, it achieves state-of-the-art performance with lower overhead than "flood irrigation" methods. Future work will explore larger model scales (30B+), multimodal self-awareness (incorporating vision and audio), and testing on real-world software engineering or robotics tasks.

Summary updated

BibTeX
@inproceedings{qiao2025agentic,
  author = {Shuofei Qiao and Zhisong Qiu and Baochang Ren and Xiaobin Wang and Xiangyuan Ru and Ningyu Zhang and Xiang Chen and Yong Jiang and Pengjun Xie and Fei Huang and Huajun Chen},
  title = {{Agentic Knowledgeable Self-awareness}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure