Abstract
As question answering (QA) systems advance alongside the rapid evolution of foundation models, the need for robust, adaptable, and large-scale evaluation benchmarks becomes increasingly critical. Traditional QA benchmarks are often static and publicly available, making them susceptible to data contamination and memorization by large language models (LLMs). Consequently, static benchmarks may overestimate model generalization and hinder a reliable assessment of real-world performance. In this work, we introduce Dynamic-KGQA, a scalable framework for generating adaptive QA datasets from knowledge graphs (KGs), designed to mitigate memorization risks while maintaining statistical consistency across iterations. Unlike fixed benchmarks, Dynamic-KGQA generates a new dataset variant on every run while preserving the underlying distribution, enabling fair and reproducible evaluations. Furthermore, our framework provides fine-grained control over dataset characteristics, supporting domain-specific and topic-focused QA dataset generation. Additionally, Dynamic-KGQA produces compact, semantically coherent subgraphs that facilitate both training and evaluation of KGQA models, enhancing their ability to leverage structured knowledge effectively. To align with existing evaluation protocols, we also provide static large-scale train/test/validation splits, ensuring comparability with prior methods. By introducing a dynamic, customizable benchmarking paradigm, Dynamic-KGQA enables a more rigorous and adaptable evaluation of QA systems.
Introduction
Most AI researchers evaluate Question Answering (QA) systems using static, publicly available benchmarks like WebQuestions or ComplexWebQuestions (CWQ). However, these datasets face two major issues that compromise their utility in the era of Large Language Models (LLMs). First, data contamination is a significant risk; because these benchmarks are years old and publicly accessible, they have likely been included in the massive web-scale training sets of modern LLMs. This leads to "benchmark leakage," where a model appears to reason but is actually recalling a memorized answer. Second, many popular benchmarks rely on stale knowledge, specifically Freebase, a knowledge graph (KG) that has been defunct since 2015. This makes them poor tools for evaluating how models handle up-to-date, real-world information.
To address these challenges, we propose Dynamic-KGQA, a framework designed to move away from fixed tests toward a paradigm of adaptive, reproducible evaluation. By anchoring question generation to compact, thematic subgraphs extracted from modern knowledge bases, Dynamic-KGQA ensures that evaluations reflect genuine reasoning capabilities rather than data contamination.
The Dynamic-KGQA Framework
The framework follows a multi-step pipeline to transform raw text into structured, verifiable QA pairs:
1. Seed Subgraph Construction
The process begins with "seed texts" sourced from Wiki-40B. The system identifies entities in these texts that exist within YAGO 4.5, a modern and clean knowledge graph derived from Wikidata.
2. Steiner Tree Extraction
To ensure the context is relevant and compact, the framework avoids selecting random neighbors. Instead, it employs a Steiner Tree algorithm to find the smallest connected subgraph that spans all identified seed entities. This creates a "thematic" environment for the question, ensuring that the facts are semantically related.
3. Randomized Generation
An LLM (Claude 3.5 Sonnet) generates multi-hop questions based strictly on the facts in the extracted subgraph. To ensure variety and prevent the generation of identical questions, the framework randomizes the order of the graph's triples and adjusts the LLM's temperature. This ensures that the same subgraph can yield different questions across different runs, maintaining the "freshness" of the benchmark.
4. LLM-as-a-Judge
To maintain high quality without manual labeling, the framework uses a panel of three different LLMs (Command-R, Mistral Small, and Amazon Nova Lite). A QA pair is only accepted if all three models unanimously agree it is logically sound, non-redundant, and factually supported by the graph.
Dataset Characteristics
The resulting Dynamic-KGQA dataset is significantly larger and more diverse than its predecessors. It consists of 200,000 training, 40,000 validation, and 40,000 test samples. Unlike previous datasets, Dynamic-KGQA provides the specific localized subgraph for every question. This allows researchers to isolate whether a model's failure is due to poor information retrieval or a failure in logic.
Furthermore, Dynamic-KGQA achieves a balanced taxonomy across six broad domains (e.g., sports, science, politics), avoiding the heavy skew found in older datasets like Simple Questions, which is 65% entertainment-focused.
Key Insights and Results
The "Reasoning vs. Retrieval" Split
By providing the exact subgraph needed to answer a question, Dynamic-KGQA enables "closed-book" reasoning tests. If a model fails even when the answer is present in the provided subgraph, the bottleneck is clearly identified as reasoning rather than search or retrieval.
Statistical Consistency
A critical finding of this work is that while the specific questions change with every run, the statistical distribution of topics remains stable. This allows for "fair" dynamic testing—the test is always new, but the difficulty level and thematic coverage remain consistent across iterations.
Performance Benchmarking
Experimental results show that SOTA models, such as GPT-4o, consistently score lower on Dynamic-KGQA than on older benchmarks. For example, GPT-4o using "Think-on-Graph" (ToG) reasoning scored 27.80 on Dynamic-KGQA compared to 44.22 on CWQ. This suggests that Dynamic-KGQA is more resistant to memorization and provides a more honest assessment of a model's actual power. Additionally, fewer than 0.01% of generated QA pairs were identical across multiple runs, confirming the framework's ability to generate unique evaluation sets on the fly.
Limitations and Future Work
While Dynamic-KGQA offers a significant step forward, it is not without limitations. The framework's accuracy is inherently tied to the quality of the underlying Knowledge Graph (YAGO 4.5). Furthermore, while the LLM-as-a-Judge panel reduces bias, automated pipelines can still inherit subtle errors or hallucinations from the judge models. Finally, the computational cost of generating dynamic samples on the fly is higher than using static files, suggesting a need for future optimization in generation efficiency.
Conclusion
Dynamic-KGQA introduces a scalable, customizable benchmarking paradigm that addresses the critical issues of data contamination and stale knowledge in QA evaluation. By providing a framework for generating fresh, verifiable, and statistically consistent datasets, we enable a more rigorous and adaptable assessment of the next generation of AI systems.
Summary updated