Large language models (LLMs) allow users to query databases using natural language by translating questions into executable queries. Despite strong progress on tasks such as Text2SQL, Text2SPARQL, and Text2Cypher, most existing methods focus on better prompting, fine-tuning, or iterative refinement. However, they often do not explicitly enforce structural constraints, such as syntactic validity and schema consistency. This can reduce reliability, since generated queries must satisfy both syntax rules and database schema constraints to be executable. In this work, we study how structured constraints can be used in test-time inference for Text2Cypher. We focus on post-generation validation to improve query correctness. We extend a confidence-based inference framework with a sequential filtering process that combines confidence scoring, grammar validation, and schema constraints before final aggregation. This lets us analyze how different constraint types affect generated queries. Our experiments with two instruction-tuned models show that grammar-based filtering improves syntactic validity. Schema-aware filtering further improves execution quality by enforcing consistency with the database structure. However, stronger filtering also increases the number of empty predictions and reduces execution coverage. Overall, we show that adding simple structural checks at test time improves the reliability of Text2Cypher generation, and we provide a clearer view of how syntax and schema constraints contribute differently.
Prompt4Vis: Prompting Large Language Models with Example Mining and Schema Filtering for Tabular Data Visualization
The Hong Kong Polytechnic University(香港理工大学);University of Chinese Academy of Sciences(中国科学院大学);The Hong Kong University of Science and Technology(香港科技大学);WeBank Co., Ltd(微众银行);University of Liverpool(利物浦大学)
针对自然语言转数据可视化查询性能不足的问题,提出基于大语言模型与上下文学习的 Prompt4Vis 框架,通过多目标示例挖掘和模式过滤模块显著提升了生成性能,在 NVBench 数据集上大幅超越现有 SOTA 方法。
arXiv2Table: Toward Realistic Benchmarking and Evaluation for LLM-Based Literature-Review Table Generation
Center for Speech and Language Processing, Johns Hopkins University(约翰霍普金斯大学语音与语言处理中心);Department of Computer Science and Engineering, HKUST(香港科技大学计算机科学与工程系)
LinkAlign: Scalable Schema Linking for Real-World Large-Scale Multi-Database Text-to-SQL
China Academy of Information and Communications Technology(中国信息通信技术研究院);Renmin University of China(中国人民大学);University of International Business and Economics(国际经济贸易大学)