Skip to content
Open access

Multi-Granular Demonstration Retrieval via Syntax-Derived Representations for Few-Shot NL2GQL

Aug 2026 · Machine Learning and Knowledge Extraction · 0 citations · 45 references

TL;DR

MGDR-SDR is proposed, a training-free approach that applies constituency parsing to derive three complementary representations of the utterance that drive a multi-granular retrieval procedure that aggregates evidence across dense and sparse channels, yielding broader and more precise demonstration coverage.

Abstract

Translating natural language into graph query languages (NL2GQL) enables non-expert users to access graph databases, but supervised parsers depend on large annotated corpora and costly retraining whenever the schema evolves. Few-shot in-context learning offers a training-free alternative, yet its effectiveness hinges on demonstration selection, and conventional retrieval based on sentence-level matching and a single similarity signal often overlooks beneficial exemplars. We propose MGDR-SDR, a training-free approach that applies constituency parsing to derive three complementary representations of the utterance: a shallow abstraction preserving fine-grained lexical and syntactic detail, a deep abstraction exposing the intent-level syntactic skeleton, and a noun phrase list capturing concrete graph elements. These representations drive a multi-granular retrieval procedure that aggregates evidence across dense and sparse channels, yielding broader and more precise demonstration coverage. We evaluate MGDR-SDR on SPARQL generation over KQA Pro and Cypher generation over ZOGRASCOPE. Without any training, it reaches 86.58% Hits@1 on KQA Pro, surpassing strong supervised parsers and setting a new state-of-the-art among few-shot methods, and it transfers across GQL formalisms, attaining the best iid accuracy and a balanced generalization profile that surpasses all open-source few-shot baselines on ZOGRASCOPE. These results show that syntax-derived, multi-granular retrieval is an effective and generalizable strategy for few-shot NL2GQL semantic parsing.

Read PDF

Similar papers

Open access Jul 2026

SARG-QLoRA: Syntax-Aware Retrieval-Guided Parameter-Efficient Fine-Tuning for Dependency Parsing with Autoregressive Large Language Models

SARG-QLoRA is introduced, a method which solves the trade-off problem by merging Syntax-Aware Retrieval Guidance with Quantized Low-Rank Adaptation with Quantized Low-Rank Adaptation, allowing for the generation of dependency structures on a consumer-grade hardware setup.

Nagarchi Arshad · 0 citations
Open access 2026

A New Metadata-Aware Retrieval-Augmented Generation (RAG) Architecture for Trustworthy Legal Question Answering

The proposed architecture achieves double-digit improvements over a Naive RAG baseline across all four RAGAS metrics—Context Precision, Context Recall, Factual Correctness, and Faithfulness—with gains ranging from 13.10% to 28.15%; notably, Faithfulness surpasses 0.90 for Gemma-3-27B.

Alexandra V. Jove-Ticona, Luis J. Duarte-Coaquera, Israel N. Chaparro-Cruz et al. · 0 citations
Aug 2026

STaR: a soft-labeling and triplet-aware retriever for efficient retrieval-augmented QA

This study proposes STaR, a novel retriever fine-tuning framework that integrates BM25 similarity graph-based soft labeling with a triplet similarity learning strategy based on Sentence-BERT (SBERT), and introduces a triplet-aware SBERT training architecture that explicitly models relative semantic distances between qu...

Jiali Jiang, Chih-Yung Chang, Youxi Li et al. · 0 citations
#artificial intelligence Preprint Aug 2026

Do General NLP Embeddings Capture Ontological Reasoning?

AVA is introduced, a systematic framework for evaluating whether embeddings distinguish logic-sensitive relational semantics in ontologies and knowledge graphs, and reveals a persistent gap between linguistic representation learning and ontology-level discrimination, challenging the assumption that strong NLP benchmark...

Hamed Babaei Giglou, Jennifer D'Souza, S. Auer · 0 citations

CONSISTRE: A Unified Consistency-Aware Framework for Document-Level Relation Extraction with Large Language Models

Document-level relation extraction (DocRE) aims to extract relations among multiple entities across extended contexts while maintaining consistency across predicted triples. Although large language models (LLMs) show remarkable reasoning capabilities in information extraction, their predictions are typically generated...

Mingxuan Sun · 0 citations
Open access Aug 2026

Optimizing sample selection for large language model-based entity matching using AssistEM

AssistEM, a framework for efficient LLM adaptation to EM via principled data selection, demonstrates that selective fine-tuning not only accelerates adaptation but also improves training efficiency (requiring fewer GPU hours), enabling open-source LLMs to rival–and in some cases outperform–closed-source models.

John Bosco Mugeni, Steven J. Lynden, Toshiyuki Amagasa et al. · 1 citation

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.