Skip to main content

Virtual Assistant for Querying Databases in Natural Language

  • Conference paper
  • First Online:
Proceedings of the Future Technologies Conference (FTC) 2022, Volume 3 (FTC 2022 2022)

Part of the book series: Lecture Notes in Networks and Systems ((LNNS,volume 561))

Included in the following conference series:

  • 547 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    https://world.openfoodfacts.org/.

References

  1. 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

    Article  Google Scholar 

  2. Balodis, K., Deksne, D.: FastText-based intent detection for inflected languages. Information 10(5), 161 (2019)

    Article  Google Scholar 

  3. 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)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. 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)

    Google Scholar 

  6. 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)

  7. 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)

    Google Scholar 

  8. 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)

    Google Scholar 

  9. Xu, X., Liu, C., Song, D.: SQLNet: generating structured queries from natural language without reinforcement learning. arXiv preprint arXiv:1711.04436 (2017)

  10. 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)

    Google Scholar 

  11. 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)

    Google Scholar 

  12. 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)

    Google Scholar 

  13. 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

    Chapter  Google Scholar 

  14. Zhong, V., Xiong, C., Socher, R.: Seq2SQL: generating structured queries from natural language using reinforcement learning. arXiv preprint arXiv:1709.00103 (2017)

Download references

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

Authors

Corresponding author

Correspondence to Daiga Deksne .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics