KBQA-o1: Agentic Knowledge Base Question Answering with Monte Carlo Tree Search

Haoran Luo, Haihong E, Yikai Guo, Qika Lin, Xiaobao Wu, Xinyu Mu, Wenhao Liu, Meina Song, Yifan Zhu, Anh Tuan Luu

Introduction

Answering natural language questions using massive, structured Knowledge Bases (KBs) like Freebase or Wikidata remains a significant challenge in artificial intelligence. Current Large Language Model (LLM) approaches typically struggle with two main issues: hallucination of non-existent relations in end-to-end generation and getting trapped in local optima during step-by-step reasoning. Furthermore, the high cost of human-annotated logical forms creates a data scarcity bottleneck.

KBQA-o1 addresses these challenges by introducing an agentic framework that treats the knowledge base as an interactive environment. By combining Monte Carlo Tree Search (MCTS) with a ReAct-based reasoning process, the system enables "thinking time" for complex queries, leading to substantial performance improvements in low-resource settings.

Methodology

The KBQA-o1 architecture is built upon three primary pillars designed to enhance reasoning depth and accuracy.

ReAct-based Agentic Process

The system employs a set of eight atomic query tools, such as Extract_entity, Find_relation, and Merge, to construct logical forms incrementally. Unlike static methods, this agentic approach receives real-time feedback from the KB environment, ensuring that every step in the reasoning chain is grounded in the actual database schema.

Overview of the KBQA-o1 agentic process, illustrating the step-by-step construction of a logical query using atomic tools.

MCTS for Heuristic Exploration

To navigate the vast search space of the KB graph, KBQA-o1 utilizes Monte Carlo Tree Search (MCTS). This allows the model to explore multiple potential reasoning paths simultaneously. A Policy Model suggests promising next actions, while a Reward Model evaluates the final query's validity. The Upper Confidence Bound (UCT) algorithm is used to balance the exploration of new paths with the exploitation of known high-reward trajectories, effectively avoiding the local optima that plague traditional step-by-step methods.

Incremental Fine-Tuning

To mitigate data scarcity, the framework uses MCTS to "self-label" unlabeled questions. By exploring the KB and identifying paths that yield valid answers, the system generates high-quality synthetic training data. The model then undergoes incremental fine-tuning on these self-generated trajectories, continuously improving its performance without additional human intervention.

Experimental Evaluation

The researchers evaluated KBQA-o1 on three standard benchmarks, specifically focusing on low-resource scenarios where labeled data is minimal:

  • GrailQA: Tests generalization across I.I.D., compositional, and zero-shot settings.
  • WebQSP: Focuses on semantic parsing with enriched question sets.
  • GraphQ: Targets complex reasoning over graph-structured data.

Results and Analysis

KBQA-o1 demonstrates state-of-the-art performance, often surpassing fully supervised models despite being trained in low-resource environments.

Performance comparison of KBQA-o1 against baseline methods across three benchmarks: GrailQA, WebQSP, and GraphQ.

On the GrailQA benchmark, using a Llama-3.1-8B base, KBQA-o1 achieved an overall F1 score of 78.5%, a massive leap from the 48.5% achieved by previous methods like ARG-KBQA. Notably, the system showed exceptional zero-shot generalization, scoring 76.1% F1 on questions involving entirely unseen relations. The results highlight a clear "o1-style" benefit: providing the model with more "thinking time" through MCTS rollouts directly correlates with higher accuracy.

Conclusion

KBQA-o1 represents a significant advancement in agentic KBQA. By treating the knowledge base as a dynamic environment and employing heuristic search, it overcomes the limitations of both end-to-end and simple step-by-step reasoning. While MCTS introduces additional computational overhead, the trade-off for accuracy and generalization—especially in low-resource domains—is substantial. Future work will focus on expanding the toolset for more complex logical operators and scaling the framework to specialized domains like medicine and law.

Summary updated

BibTeX
@inproceedings{luo2025kbqa,
  author = {Haoran Luo and Haihong E and Yikai Guo and Qika Lin and Xiaobao Wu and Xinyu Mu and Wenhao Liu and Meina Song and Yifan Zhu and Anh Tuan Luu},
  title = {{KBQA-o1: Agentic Knowledge Base Question Answering with Monte Carlo Tree Search}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=QuecSemZIy},
}
Figure