Extending Confidence-Based Text2Cypher with Grammar and Schema Aware Filtering
- URL: http://arxiv.org/abs/2605.10318v1
- Date: Mon, 11 May 2026 10:18:13 GMT
- Title: Extending Confidence-Based Text2Cypher with Grammar and Schema Aware Filtering
- Abstract summary: We study how structured constraints can be used in test-time inference for Text2Cypher.<n>We show that adding simple structural checks at test time improves the reliability of Text2Cypher generation.
- Score: 0.20305676256390937
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: 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.
Related papers
- EGREFINE: An Execution-Grounded Optimization Framework for Text-to-SQL Schema Refinement [10.675982676332941]
Existing approaches treat schemas as fixed and address errors downstream.<n>We frame schema refinement as a constrained optimization problem.<n>We analyze the computational hardness of this problem, which motivates a column-wise greedy decomposition.
arXiv Detail & Related papers (2026-05-01T13:01:59Z) - Agent-Agnostic Evaluation of SQL Accuracy in Production Text-to-SQL Systems [2.051598597332424]
Text-to-native (T2native) evaluation in production environments poses fundamental challenges that existing benchmarks do not address.<n>We present STEF, a production- evaluation system that operates exclusively on natural language inputs.<n>STEF produces an interpretable 0 to 100 accuracy score via a composite metric that encompasses filter alignment, semantic verdict, and confidence of the evaluator.
arXiv Detail & Related papers (2026-04-30T15:59:28Z) - FABLE: Fine-grained Fact Anchoring for Unstructured Model Editing [28.870053452479443]
Unstructured model editing aims to update models with real-world text, yet existing methods often memorize text holistically without reliable fine-grained fact access.<n>We propose FABLE, a hierarchical framework that decouples fine-grained fact injection from holistic text generation.<n>Experiments show that FABLE substantially improves fine-grained question answering while maintaining state-of-the-art holistic editing performance.
arXiv Detail & Related papers (2026-04-14T10:41:36Z) - ASTRA: Adaptive Semantic Tree Reasoning Architecture for Complex Table Question Answering [55.55968342644846]
Table serialization remains a critical bottleneck for Large Language Models (LLMs) in complex table question answering.<n>Existing serialization methods fail to capture explicit hierarchies and lack schema flexibility.<n>We propose ASTRA (Adaptive Semantic Tree Reasoning Architecture) including two main modules, AdaSTR and DuTR.<n> Experiments on complex table benchmarks demonstrate that our method achieves state-of-the-art (SOTA) performance.
arXiv Detail & Related papers (2026-04-10T06:09:41Z) - Text-to-SQL as Dual-State Reasoning: Integrating Adaptive Context and Progressive Generation [54.53145282349042]
We introduce DSR-sourced, a textbfDual-textbfS textbfReasoning framework that models Text-to-context as an interaction between an adaptive context state and a progressive generation state.<n>Without any post-training or in-context examples, DSR-sourced achieves competitive performance, reaching 35.28% execution accuracy on Spider 2.0-Snow and 68.32% on BIRD development set.
arXiv Detail & Related papers (2025-11-26T13:52:50Z) - E3-Rewrite: Learning to Rewrite SQL for Executability, Equivalence,and Efficiency [35.2472369073336]
E3-Rewrite is a framework that produces executable, equivalent, and efficient queries.<n>It integrates two core components: a context construction module and a reinforcement learning framework.<n>E3-Rewrite can shorten query execution time by as much as 25.6% relative to leading baselines.
arXiv Detail & Related papers (2025-08-12T15:38:10Z) - Enhancing Text2Cypher with Schema Filtering [0.20305676256390937]
Cypher is a powerful query language for graph databases.<n>Recent advancements in large language models allow translation of natural language questions into Cypher queries - Text2Cypher.<n>This work explores various schema filtering methods for Text2Cypher task and analyzes their impact on token length, performance, and cost.
arXiv Detail & Related papers (2025-05-08T10:42:20Z) - Valid Text-to-SQL Generation with Unification-based DeepStochLog [13.798222228959132]
We propose a neurosymbolic framework that imposes syntax and schema constraints with unification-based definite clause grammars.<n>Our framework also builds a bi-directional interface to language models to leverage their natural language understanding abilities.<n>This work is the first step towards extending language models with unification-based grammars.
arXiv Detail & Related papers (2025-03-17T16:21:10Z) - Effective Instruction Parsing Plugin for Complex Logical Query Answering on Knowledge Graphs [51.33342412699939]
Knowledge Graph Query Embedding (KGQE) aims to embed First-Order Logic (FOL) queries in a low-dimensional KG space for complex reasoning over incomplete KGs.
Recent studies integrate various external information (such as entity types and relation context) to better capture the logical semantics of FOL queries.
We propose an effective Query Instruction Parsing (QIPP) that captures latent query patterns from code-like query instructions.
arXiv Detail & Related papers (2024-10-27T03:18:52Z) - DAC: Decomposed Automation Correction for Text-to-SQL [51.48239006107272]
We introduce De Automation Correction (DAC), which corrects text-to-composed by decomposing entity linking and skeleton parsing.
We show that our method improves performance by $3.7%$ on average of Spider, Bird, and KaggleDBQA compared with the baseline method.
arXiv Detail & Related papers (2024-08-16T14:43:15Z) - Improving Text-to-SQL Semantic Parsing with Fine-grained Query
Understanding [84.04706075621013]
We present a general-purpose, modular neural semantic parsing framework based on token-level fine-grained query understanding.
Our framework consists of three modules: named entity recognizer (NER), neural entity linker (NEL) and neural entity linker (NSP)
arXiv Detail & Related papers (2022-09-28T21:00:30Z) - Proton: Probing Schema Linking Information from Pre-trained Language
Models for Text-to-SQL Parsing [66.55478402233399]
We propose a framework to elicit relational structures via a probing procedure based on Poincar'e distance metric.
Compared with commonly-used rule-based methods for schema linking, we found that probing relations can robustly capture semantic correspondences.
Our framework sets new state-of-the-art performance on three benchmarks.
arXiv Detail & Related papers (2022-06-28T14:05:25Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.