DAVIS : Planning Agent with Knowledge Graph-Powered Inner Monologue (2025)

Abstract: Designing a generalist scientific agent capable of performing tasks in laboratory settings to assist researchers has become a key goal in recent Artificial Intelligence (AI) research. Unlike everyday tasks, scientific tasks are inherently more delicate and complex, requiring agents to possess a higher level of reasoning ability, structured and temporal understanding of their environment, and a strong emphasis on safety. Existing approaches often fail to address these multifaceted requirements. To tackle these challenges, we present DAVIS. Unlike traditional retrieval-augmented generation (RAG) approaches, DAVIS incorporates structured and temporal memory, which enables model-based planning. Additionally, DAVIS implements an agentic, multi-turn retrieval system, similar to a human’s inner monologue, allowing for a greater degree of reasoning over past experiences. DAVIS demonstrates substantially improved performance on the ScienceWorld benchmark comparing to previous approaches on 8 out of 9 elementary science subjects. In addition, DAVIS’s World Model demonstrates competitive performance on the famous HotpotQA and MusiqueQA dataset for multi-hop question answering. To the best of our knowledge, DAVIS is the first RAG agent to employ an interactive retrieval method in a RAG pipeline.

## introduction a core focus of current artificial intelligence (ai) research is the development of artificial agents capable of autonomously performing human tasks requiring high decision-making autonomy @xcite @xcite . while reinforcement learning (rl) has traditionally been used to create goaloriented agents in markovian environments (mnih et al., 2013; schrittwieser et al., 2020; hafner 1 all code and prompts are available on github figure 1 : visualization of davis's inner monologue during decision-making. this process involves iteratively querying its knowledge graph to fill knowledge gaps in order to plan its next action. et al., 2020), it often suffers from sample inefficiency, limited generalizability, and poor interpretability, making real-world deployment challenging @xcite . recently, large language models (llms) @xcite have revolutionized the creation of autonomous agents by leveraging natural language understanding to enhance interpretability and generalization. these llm-based agents have shown great promise in critical domains such as healthcare @xcite and scientific research @xcite by mimicking human decision-making processes and enabling more intuitive reasoning and actions. several approaches have enhanced agentic reasoning and decision-making. swiftsage @xcite emulates the fast and slow thinking of humans with fine-tuned language models for planning. saycan @xcite decomposes tasks figure 2 : overview of davis's decision-making process. the world model generates a feasible course of actions, which are translated by the actor and executed sequentially by the agent in the environment. the critic detects discrepancies between expected and actual outcomes, identify failures, and suggest replanning. 2 into subgoals, while react @xcite 3 integrates reasoning into execution. rag-based systems like reflexion @xcite and rap 4 @xcite retrieve past experiences via semantic search, but their unstructured memory limits multi-hop reasoning and causal understanding. these systems retrieve static information rather than engaging in agentic, multi-turn retrieval, preventing dynamic adaptation. humans do not retrieve past knowledge statically; instead, we actively reflect, question our understanding, and refine our knowledge through internal dialogues. inspired by this, we introduce davis, an agentic multi-turn retrieval system that mirrors human cognition by enabling iterative interactions between the agent and its memory during the planning stage, a process we call inner monologue. davis actively engages with its world model (wm), a temporal knowledge graph-based qa system, to refine its understanding before planning and execution. davis engages in conversation with its wm to retrieve past experiences, evaluate actions, identify gaps, and optimize strategies. davis proves to be effective for iterative reasoning within scientific domains. specifically, davis outperforms 4 other baselines @xcite @xcite on 8 out of 9 science subjects in the science3 swiftsage, reflexion, saycan, and react are used under mit license 4 rap is used under mit license world @xcite environment. foot_1 davis's wm achieves competitive performance on the hot-potqa @xcite and musiqueqa @xcite ) dataset foot_2 . our contributions can be summarized as follows: ## davis davis adopts a model-based planning approach @xcite , where the agent uses a world model (wm) as an internal representation of its surrounding environment. ## conclusion davis is an agent designed for scientific interactive reasoning tasks in complex environments. davis represents a novel approach that leverages a structured world model (wm) in the form of a temporal knowledge graph, enabling iterative retrieval and reasoning over past experiences. this structured representation allows davis to approximate both the transition dynamics and reward models of its environment, facilitating more informed decision-making. davis also uniquely uses an interactive retrieval process, which combines iterative querying with contextual reasoning to fill knowledge gaps and refine understanding. this is augmented by davis's ability to perform internal planning and validation before interacting with the environment. by engaging in pre-execution deliberation, davis enables clearer inspection of its planned actions, making it easier for human supervisors to review its decision-making process. this transparency facilitates stronger safeguards compared to reinforcement learning (rl) agents, whose policies are often opaque. davis is ideal for scientific tasks that demand precision, adaptability, and strict adherence to experimental protocols. evaluations in the scienceworld environment across several scientific domains, including thermodynamics, biology, and physics, demonstrate the efficacy of davis's structured knowledge representation and retrieval methods compared to baseline agents. davis combines robust planning with iterative reasoning capabilities, enabling it to generalize effectively from demonstrations to new tasks.