GRISP: Guided Recurrent IRI Selection over SPARQL Skeletons

arXiv cs.CL / 4/24/2026

📰 NewsDeveloper Stack & InfrastructureModels & Research

Key Points

  • The paper introduces GRISP, a SPARQL-based question-answering method that uses a small language model to guide SPARQL query construction and refinement over knowledge graphs.
  • GRISP first prompts the SLM to produce a natural-language SPARQL query “skeleton,” then iteratively re-ranks and selects knowledge-graph items to replace placeholders using KG constraints.
  • The SLM is jointly fine-tuned on two tasks: skeleton generation and list-wise re-ranking using training data derived from standard question–query pairs.
  • Experiments on Wikidata and Freebase benchmarks show GRISP outperforming existing state-of-the-art approaches under comparable experimental conditions.

Abstract

We present GRISP (Guided Recurrent IRI Selection over SPARQL Skeletons), a novel SPARQL-based question-answering method over knowledge graphs based on fine-tuning a small language model (SLM). Given a natural-language question, the method first uses the SLM to generate a natural-language SPARQL query skeleton, and then to re-rank and select knowledge graph items to iteratively replace the natural-language placeholders using knowledge graph constraints. The SLM is jointly trained on skeleton generation and list-wise re-ranking data generated from standard question-query pairs. We evaluate the method on common Wikidata and Freebase benchmarks, and achieve better results than other state-of-the-art methods in a comparable setting.