mlsanityData to 7 Oct 2026

Extending Confidence-Based Text2Cypher with Grammar and Schema Aware Filtering

arXiv 2605.10318 ↗First posted 11 May 2026cs.CLcited by 1

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 22 of its 32 references that are in the map. First posted on arXiv 11 May 2026.

Builds on

22 of 32 references.

References · 22

  1. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  2. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
  3. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
  4. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
  5. 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 420
  6. 2025Deep Think with Confidencecited by 199
  7. 2025Scalable Best-of-N Selection for Large Language Models via Self-Certaintycited by 182
  8. 2024Guiding LLMs The Right Way: Fast, Non-Invasive Constrained Generationcited by 99
  9. 2018TypeSQL: Knowledge-based Type-Aware Neural Text-to-SQL Generationcited by 81
  10. 2024Grammar-Aligned Decodingcited by 54
  11. 2022A Survey on Text-to-SQL Parsing: Concepts, Methods, and Future Directionscited by 51
  12. 2024RSL-SQL: Robust Schema Linking in Text-to-SQL Generationcited by 51
10 more
  1. 2024E-SQL: Direct Schema Linking via Question Enrichment in Text-to-SQLcited by 35
  2. 2024Text2Cypher: Bridging Natural Language and Graph Databasescited by 30
  3. 2025Is Long Context All You Need? Leveraging LLM's Extended Context for NL2SQLcited by 30
  4. 2021SeaD: End-to-end Text-to-SQL Generation with Schema-aware Denoisingcited by 27
  5. 2021Improving Text-to-SQL with Schema Dependency Learningcited by 25
  6. 2025Batched Self-Consistency Improves LLM Relevance Assessment and Rankingcited by 8
  7. 2026Prune as You Generate: Online Rollout Pruning for Faster and Better RLVRcited by 8
  8. 2025Enhancing Text2Cypher with Schema Filteringcited by 6
  9. 2025Conversational Lexicography: Querying Lexicographic Data on Knowledge Graphs with SPARQL through Natural Languagecited by 3
  10. 2026Grounding Large Language Models in Reaction Knowledge Graphs for Synthesis Retrievalcited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.