KnowThyself: An Agentic Assistant for LLM Interpretability

Suraj Prasai, Mengnan Du, Ying Zhang, Fan YangarXiv 2025 · DOI

Abstract

Large Language Model (LLM) interpretability remains a significant challenge due to the fragmented nature of existing tools and the high technical barrier for non-experts. We present KnowThyself, a conversational multi-agent platform designed to democratize model inspection. By leveraging a multi-agent orchestration framework, KnowThyself wraps complex tools like BertViz and TransformerLens into a unified natural language interface. This allows users to probe "black-box" models through intuitive dialogue, receiving synthesized explanations grounded in quantitative data and established research.

Introduction

As LLMs become increasingly integrated into critical societal infrastructure, the ability to understand their internal decision-making processes—interpretability—is essential for ensuring trust, safety, and fairness. However, the current landscape of interpretability tools is highly fragmented. Practitioners often face significant hurdles, including complex setup requirements, conflicting software dependencies, and the need for deep domain expertise to interpret raw outputs like attention heatmaps or bias scores. KnowThyself addresses this "usability gap" by providing an abstraction layer that translates natural language queries into executable interpretability tasks.

System Architecture

The KnowThyself framework is built using LangGraph and follows a layered multi-agent architecture designed for modularity and scalability.

The KnowThyself system architecture, illustrating the flow from user queries through the Orchestrator and specialized agents to final natural language explanations.

The system consists of four primary layers:

  1. Conversational Interface: A user-facing chat front end for model uploading and query submission.
  2. Orchestrator LLM: Utilizing Gemma3-27B, the Orchestrator serves as the central reasoning engine. It decomposes user queries into subtasks, generates necessary test inputs, and synthesizes raw agent outputs into human-readable explanations.
  3. Embedding-Based Router: This component uses the nomic-embed-text model to perform similarity searches, routing user intent to the most appropriate specialized agent.
  4. Specialized Agents: These modular "plug-ins" encapsulate specific methods, including BertViz and TransformerLens for attention and activation analysis, and a BiasEval Agent for toxicity and social bias metrics.

The architecture is designed to run locally via Ollama, prioritizing data security and privacy during model auditing.

Evaluation and Use Cases

The utility of KnowThyself is demonstrated through two primary interpretability workflows:

Token Attribution and Attention Analysis

When a user queries how a model attends to specific tokens (e.g., "Show me how the model attends across tokens for the word 'she'"), the system automatically synthesizes a relevant test sentence. The TransformerLens agent then generates an attention map, which the Orchestrator interprets. For instance, it might explain that the model correctly identifies "Maria" as the subject by showing high attention weights between "she" and "Maria."

Bias and Safety Auditing

The system facilitates comprehensive bias evaluations using standard benchmarks such as BOLD (Bias in Open-ended Language Generation), Real Toxicity Prompts, and HONEST. Users can request a bias check (e.g., "Does my model show gender bias?"), and the BiasEval agent returns quantitative results. The Orchestrator then provides a summary, such as identifying a "35.4% difference" in positive sentiment between male-related and female-related text generations.

Discussion and Key Insights

The primary innovation of KnowThyself lies in its abstraction layer. By moving from code-heavy tool manipulation to natural language interaction, the platform significantly lowers the technical floor for model auditing. Furthermore, the use of an Orchestrator to provide contextualized explanations transforms raw data into actionable insights. The modular design also solves the common problem of conflicting dependencies in interpretability libraries by isolating each tool within its own agentic environment.

Limitations and Future Work

While KnowThyself represents a step forward in accessible interpretability, several challenges remain. The current toolset is limited, and the embedding-based router may occasionally misroute complex, overlapping tasks. Future work will focus on expanding tool coverage, supporting multimodal models, and refining the routing logic to handle more nuanced interpretability queries.

Summary updated

BibTeX
@misc{prasai2025knowthyself,
  author = {Suraj Prasai and Mengnan Du and Ying Zhang and Fan Yang},
  title = {{KnowThyself: An Agentic Assistant for LLM Interpretability}},
  year = {2025},
  eprint = {2511.03878},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.03878},
}
Figure