Adaptive Test-Time Inference for Text2Cypher with Trace Budgeting and Selective Refinement
Makbule Gulcin Ozsoy
Abstract
Large language models have enabled natural language interfaces for structured databases, but generated queries may still contain syntactic errors, violate database schemas, or fail during execution. Test-time inference strategies improve generation reliability without additional training, but existing approaches often use fixed inference budgets and uniform refinement strategies, leading to unnecessary computation across questions with different complexity levels. In this work, we investigate adaptive test-time inference for Text2Cypher and introduce two strategies: adaptive trace budgeting, which dynamically adjusts the candidate generation budget based on question difficulty, and selective execution-guided refinement, which applies correction only when additional inference is expected to be beneficial. Experiments on Gemma-2-9B and Qwen-2.5-7B show that adaptive trace budgeting reduces the average generation budget by 30.7% and wall-clock inference time by 21-25% while maintaining comparable generation quality. Selective refinement preserves nearly all execution success gains of full refinement, reducing execution success by only 0.2-0.5% while avoiding unnecessary refinement for simpler questions. Experiments show that a single correction model (Gemma-4) effectively refines outputs from a different model family, suggesting refinement transfers across families.
Create a lesson
Related papers
Incremental Pooled LLM Evaluation for Cost-Effective Retrieval Model Selection
Max Nelson, Hanoz Bhathena, Aviral Joshi et al.
Recommender System as Slow and Fast Thinkers
Zichen Yuan, Xiaoxuan Dong, Linkun Dai et al.
Training seeds and model-selection stability in recommender-system evaluation
Juan Manuel Rodriguez, Oleg Lesota, Antonela Tommasel
ViSAR: Training-Free Adaptive-k Retrieval for Visual Document Question Answering
Adrien Mialland, Marc Plantevit, Julien Gallois et al.
Counter-GEO-Bench: Evaluating Defenses Against Information-Distorting Generative Engine Optimization
Bing Zheng, Zongyao Zhao, Wenming Yang
Genuine Information Needs of Social Scientists Looking for Data
Andrea Papenmeier, Thomas Krämer, Tanja Friedrich et al.