Abstract
The formulation of structured queries over Knowledge Graphs is not an easy task. To alleviate this problem, we propose a novel interactive method for SPARQL query formulation, for enabling users (plain and advanced) to formulate gradually queries by providing examples and various kinds of positive and negative feedback, in a manner that does not pre-suppose knowledge of the query language or the contents of the Knowledge Graph. In comparison to other example-based query approaches, distinctive features of our approach is the support of negative examples, and the positive/negative feedback on the generated constraints. We detail the algorithmic aspect and we present an interactive user interface that implements the approach. The application of the model on real datasets from DBpedia (Movies, Actors) and other datasets (scientific papers), showcases the feasibility and the effectiveness of the approach. A task-based evaluation that included users that are not familiar with SPARQL, provided positive evidence that the interaction is easy-to-grasp and enabled most users to formulate the desired queries.











Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Availability of supporting data
The code of the running prototype, is publicly accessible (https://demos.isl.ics.forth.gr/SPARQL-QBE/). With "View Page Source" one can see all the source code.
Notes
Like the help page of the prototype.
A running prototype is accessible through https://demos.isl.ics.forth.gr/SPARQL-QBE/
References
Akritidis, A., & Tzitzikas, Y. (2023). Demonstrating interactive SPARQL formulation through positive and negative examples and feedback. In: Demo Paper, 26th International Conference on Extending Database Technology, EDBT 2023. https://doi.org/10.48786/edbt.2023.71
Arenas, M., Diaz, G.I., & Kostylev, E.V. (2016). Reverse engineering SPARQL queries. In: Proceedings of the 25th International Conference on World Wide Web. https://doi.org/10.1145/2872427.2882989
Čebirić, Š, Goasdoué, F., Kondylakis, H., Kotzinos, D., Manolescu, I., Troullinou, G., & Zneika, M. (2019). Summarizing semantic graphs: a survey. The VLDB Journal, 28, 295–327. https://doi.org/10.1007/s00778-018-0528-3
Chatzakis, M., Mountantonakis, M., & Tzitzikas, Y. (2021) RDFsim: similarity-based browsing over DBpedia using embeddings. Information, 12(11). https://doi.org/10.3390/info12110440
Colucci, S., Donini, F. M., Giannini, S., & Di Sciascio, E. (2016). Defining and computing least common subsumers in rdf. Journal of Web Semantics, 39,. https://doi.org/10.1016/j.websem.2016.02.001
Diaz, G., Arenas, M., & Benedikt, M. (2016). SPARQLByE: Querying RDF data by example. Proceedings of the VLDB Endowment, 9(13). https://doi.org/10.14778/3007263.3007302
Doerr, M (2003) The CIDOC conceptual reference module: an ontological approach to semantic interoperability of metadata. AI magazine, 24(3). https://doi.org/10.1609/aimag.v24i3.1720
Faulkner, L. (2003). Beyond the five-user assumption: Benefits of increased sample sizes in usability testing. Behavior Research Methods, Instruments, & Computers, 35(3). https://doi.org/10.3758/BF03195514
Ferrada, S., Bustos, B., & Hogan, A. (2020). Extending SPARQL with similarity joins. In: International Semantic Web Conference, Springer. https://doi.org/10.1007/978-3-030-62419-4_12
Ferré, S. (2017). Sparklis: An expressive query builder for SPARQL endpoints with guidance in natural language. Semantic Web, 8(3). https://doi.org/10.3233/SW-150208
Francart, T. (2021). Sparnatural. https://sparnatural.eu/
Goasdoué, F., Guzewicz, P., & Manolescu, I.: Rdf graph summarization for first-sight structure discovery. The VLDB Journal, 29. https://doi.org/10.1007/s00778-020-00611-y
Grafkin, P., Mironov, M., Fellmann, M., Lantow, B., Sandkuhl, K., & Smirnov, A.V. (2016). SPARQL query builders: Overview and comparison. In: BIR Workshops
Ioannidis, Y. (2003). The history of histograms (abridged). In: Proceedings 2003 VLDB Conference, Elsevier. https://doi.org/10.1016/B978-012722442-8/50011-2
Jacobson, S. H., & Yücesan, E. (2004). Analyzing the performance of generalized hill climbing algorithms. Journal of Heuristics, 10,. https://doi.org/10.1023/B:HEUR.0000034712.48917.a9
Kritsotakis, V., Roussakis, Y., Patkos, T., & Theodoridou, M. (2018). Assistive query building for semantic data. In: SEMANTICS Posters &Demos
Li, H., Chan, C.-Y., & Maier, D. (2015). Query from examples: An iterative, data-driven approach to query construction. Proceedings of the VLDB Endowment, 8(13). https://doi.org/10.14778/2831360.2831369
McCarthy, L., Vandervalk, B., & Wilkinson, M. (2012). SPARQL assist language-neutral query composer. BMC Bioinformatics, 13(1), 1–9. https://doi.org/10.1186/1471-2105-13-S1-S2
Metzger, S., Schenkel, R., & Sydow, M.(2013). Qbees: query by entity examples. In: Proceedings of the 22nd ACM International Conference on Information & Knowledge Management. https://doi.org/10.1007/s10844-017-0443-x
Nikas, C., Fafalios, P., & Tzitzikas, Y. (2021) Open domain question answering over knowledge graphs using keyword search, answer type prediction, SPARQL and pre-trained neural models. In: Proceedings of the 20th International Semantic Web Conference, Springer. https://doi.org/10.1007/978-3-030-88361-4_14
Nikas, C., Kadilierakis, G., Fafalios, P., & Tzitzikas, Y. (2020). Keyword search over RDF: Is a single perspective enough? Big Data and Cognitive Computing, 4(3), 22. https://doi.org/10.3390/bdcc4030022
Oldman, D., & Tanase, D. (2018) Reshaping the knowledge graph by connecting researchers, data and practices in ResearchSpace. In: International Semantic Web Conference, Springer. https://doi.org/10.1007/978-3-030-00668-6_20
Papadaki, M.-E., & Tzitzikas, Y. (2023). RDF-ANALYTICS: Interactive analytics over rdf knowledge graphs. In: Demo Paper, 26th International Conference on Extending Database Technology, EDBT 2023. https://doi.org/10.48786/edbt.2023.70
Rietveld, L., & Hoekstra, R. (2017). The YASGUI family of SPARQL clients. Semantic Web, 8(3). https://doi.org/10.3233/SW-150197
Sacenti, J.A., Fileto, R., & Willrich, R. (2022). Knowledge graph summarization impacts on movie recommendations. Journal of Intelligent Information Systems, 58(1). https://doi.org/10.1007/s10844-021-00650-z
Salton, G., & Buckley, C. (1990). Improving retrieval performance by relevance feedback. Journal of the American Society for Information Science, 41(4). https://doi.org/10.1002/(SICI)1097-4571(199006)41:4<288::AID-ASI8>3.0.CO;2-H
Thomas, J.C., & Gould, J.D. (1975). A psychological study of query by example. In: Proceedings of the May 19-22, 1975, National Computer Conference and Exposition. AFIPS ’75. ACM, New York. https://doi.org/10.1145/1499949.1500035
Tzitzikas, Y., & Meghini, C. (2003). Ostensive automatic schema mapping for taxonomy-based peer-to-peer systems. In: International Workshop on Cooperative Information Agents, Springer. https://doi.org/10.1007/978-3-540-45217-1_6
Tzitzikas, Y., Manolis, N., & Papadakos, P. (2017). Faceted exploration of RDF/S datasets: a survey. Journal of Intelligent Information Systems, 48(2). https://doi.org/10.1007/s10844-016-0413-8
Vargas, H., Aranda, C.B., & Hogan, A. (2019). RDF Explorer: A visual query builderja for semantic web knowledge graphs. In: ISWC Satellites. https://doi.org/10.1007/978-3-030-30793-6_37
Zheng, W., Zou, L., Peng, W., Yan, X., Song, S., & Zhao, D. (2016). Semantic SPARQL similarity search over RDF knowledge graphs. Proceedings of the VLDB Endowment, 9(11). https://doi.org/10.14778/2983200.2983201
Zloof, M. M. (1977). Query-by-example: A data base language. IBM Systems Journal, 16(4), 324–343. https://doi.org/10.1147/sj.164.0324
Zloof, M.M. (1975a). Query by example. In: Proceedings of the May 19-22, 1975, National Computer Conference and Exposition
Zloof, M.M. (1975b). Query-by-Example: The invocation and definition of tables and forms. In: Proceedings of the 1st Intern. Conf. on Very Large Data Bases. VLDB ’75. ACM, New York. https://doi.org/10.1145/1282480.1282482
Acknowledgements
FORTH-ICS
Funding
FORTH-ICS
Author information
Authors and Affiliations
Contributions
A.A. and Y.T. wrote the main manuscript text and prepared the figures. A.A. implemented the prototype system. All authors reviewed the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Ethical Approval
Not applicable
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Akritidis, A., Tzitzikas, Y. Querying knowledge graphs through positive and negative examples and feedback. J Intell Inf Syst 62, 1165–1186 (2024). https://doi.org/10.1007/s10844-024-00846-z
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10844-024-00846-z