SAGA Improves Text-to-SPARQL Generation for Knowledge Bases

Yiming Zhang, Koji Tsuda· July 17, 2026 View original

Summary

SAGA is a new training-free framework that enhances agentic text-to-SPARQL generation by incorporating schema-aware grounding. It systematically uses entity types, property domains, and ranges to filter incompatible property candidates, significantly improving accuracy and reducing empty query results across various benchmarks.

An ongoing challenge in complex knowledge base question answering (KBQA) is accurately converting natural language queries into executable logical forms like SPARQL. While recent large language model agents have made this process more interactive by iteratively reasoning and querying, they often struggle with "type-blind grounding." This means they don't fully leverage the knowledge base's schema information, such as entity types or property constraints, when identifying relevant properties. This oversight leads to an expanded search space and frequently generates semantically incompatible query patterns that yield no results. To overcome this, a new framework called SAGA (Schema-Aware Grounding for Agentic Text-to-SPARQL Generation) has been introduced. SAGA operates without requiring additional training. SAGA systematically integrates schema knowledge by maintaining a persistent type state and filtering out incompatible property candidates during query construction. It also handles missing schema information gracefully. Across nine benchmark settings using Wikidata and Freebase, SAGA consistently achieved superior F1 scores and exact-match accuracy, while notably reducing the number of empty-result queries.

Why it matters

For professionals working with knowledge bases and natural language interfaces, SAGA offers a significant improvement in the reliability and accuracy of converting text queries into structured queries, leading to more effective data retrieval and analysis.

How to implement this in your domain

  1. 1Evaluate current KBQA systems for "type-blind grounding" issues, especially when generating SPARQL queries.
  2. 2Investigate integrating schema-aware grounding techniques into existing or new knowledge graph query agents.
  3. 3Prioritize the development or adoption of tools that leverage explicit schema information for more precise query construction.
  4. 4Train teams on the importance of schema understanding in designing and debugging complex knowledge base interactions.

Who benefits

Data AnalyticsEnterprise SearchSemantic WebHealthcareFinance

Key takeaways

  • Schema-aware grounding is crucial for accurate text-to-SPARQL generation.
  • SAGA is a training-free framework that improves KBQA by leveraging schema information.
  • The framework significantly reduces semantically incompatible queries and empty results.
  • SAGA outperforms existing methods on multiple benchmarks, enhancing reliability.

Original post by Yiming Zhang, Koji Tsuda

"arXiv:2607.14494v1 Announce Type: new Abstract: Complex knowledge base question answering (KBQA) is commonly approached through either information retrieval over a question-specific subgraph or semantic parsing into an executable logical form. We study the latter paradigm. Recent…"

View on X

Originally posted by Yiming Zhang, Koji Tsuda on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses

More in AI Research