Abstract
This paper reports on creating virtual assistants (VA) that enable users to query a database in the natural language. Building SQL queries from the natural language is a complicated task. We build the query via a conversation between the user and the virtual assistant allowing the users to describe their needs during a more detailed conversation. The VA uses information about the schema of the data source to guide the user. The query is built incrementally. To test the proposed method, we implemented a dialogue system for querying a part of the Open Food Facts database. The evaluation results show that users successfully completed the task in most cases. The easiest task was completed by 72% of users, the most sophisticated task was completed by 58% of users. To finish the tasks, users had to provide parameters that the VA prompted for, to sort the records, and to add filtering conditions using natural language. The proposed approach allows the building of similar VAs for different databases.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
References
Affolter, K., Stockinger, K., Bernstein, A.: A comparative survey of recent natural language interfaces for databases. VLDB J. 28(5), 793–819 (2019). https://doi.org/10.1007/s00778-019-00567-8
Balodis, K., Deksne, D.: FastText-based intent detection for inflected languages. Information 10(5), 161 (2019)
Hemphill, C.T., Godfrey, J.J., Doddington, G.R.: The ATIS spoken language systems pilot corpus. In: Speech and Natural Language: Proceedings of a Workshop Held at Hidden Valley, Pennsylvania (1990)
Hosu, I.A., Iacob, R.C.A., Brad, F., Ruseti, S., Rebedea, T.: Natural language interface for databases using a dual-encoder model. In: Bender, E.M., Derczynski, L., Isabelle, P. (eds.) Proceedings of the 27th International Conference on Computational Linguistics, pp. 514–524. ACL, Santa Fe (2018)
Lyons, G., Tran, V., Binnig, C., Cetintemel, U., Kraska, T.: Making the case for query-by-voice with EchoQuery. In: SIGMOD 2016: Proceedings of the 2016 International Conference on Management of Data, pp. 2129–2132. ACM, New York (2016)
Madotto, A., Wu, C.S., Fung, P.: Mem2Seq: effectively incorporating knowledge bases into end-to-end task-oriented dialog systems. arXiv preprint arXiv:1804.08217 (2018)
Shekarpour, S., Auer, S., Ngomo, A.C.N., et al.: Keyword-driven SPARQL query generation leveraging background knowledge. In: WI-IAT 2011: Proceedings of the 2011 IEEE/WIC/ACM International Conferences on Web Intelligence and Intelligent Agent Technology, vol. 1, pp. 203–210. IEEE Computer Society, New York (2011)
Sun, Y., Tang, D., Duan, N., et al.: Semantic parsing with syntax-and table-aware SQL generation. In: Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 361–372. ACL, Stroudsburg, PA (2018)
Xu, X., Liu, C., Song, D.: SQLNet: generating structured queries from natural language without reinforcement learning. arXiv preprint arXiv:1711.04436 (2017)
Yahya, M., Berberich, K., Elbassuoni, S., Ramanath, M., Tresp, V., Weikum, G.: Deep answers for naturally asked questions on the web of data. In: Proceedings of the 21st International Conference on World Wide Web, pp. 445–449. Association for Computing Machinery, New York (2012)
Yu, T., Zhang, R., Yang, K., et al.: Spider: a large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task. In: Proceedings of EMNLP 2018, pp. 3911–3921. ACL, Stroudsburg, PA (2018)
Yu, T., Zhang, R., Er, H., et al.: CoSQL: a conversational text-to-SQL challenge towards cross-domain natural language interfaces to databases. In: Proceedings of EMNLP-IJCNNLP 2019, pp. 1961–1979. ACL, Stroudsburg, PA (2019)
Zafar, H., Napolitano, G., Lehmann, J.: Formal query generation for question answering over knowledge bases. In: Gangemi, A., et al. (eds.) ESWC 2018. LNCS, vol. 10843, pp. 714–728. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-93417-4_46
Zhong, V., Xiong, C., Socher, R.: Seq2SQL: generating structured queries from natural language using reinforcement learning. arXiv preprint arXiv:1709.00103 (2017)
Acknowledgments
The research leading to these results has received funding from the research project “Competence Centre of Information and Communication Technologies” of EU Structural funds, contract No. 1.2.1.1/18/A/003 signed between IT Competence Centre and Central Finance and Contracting Agency, Research No. 2.3 “Neural network machine learning techniques for automated creating of virtual assistant dialog scenarios”.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Deksne, D., Skadiņš, R. (2023). Virtual Assistant for Querying Databases in Natural Language. In: Arai, K. (eds) Proceedings of the Future Technologies Conference (FTC) 2022, Volume 3. FTC 2022 2022. Lecture Notes in Networks and Systems, vol 561. Springer, Cham. https://doi.org/10.1007/978-3-031-18344-7_39
Download citation
DOI: https://doi.org/10.1007/978-3-031-18344-7_39
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-18343-0
Online ISBN: 978-3-031-18344-7
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)