IDEAS home Printed from https://ideas.repec.org/a/ers/journl/vxxviiy2024ispecialbp426-438.html
   My bibliography  Save this article

Optimizing Customer Support Using Text2SQL to Query Natural Language Databases

Author

Listed:
  • Michal Maj
  • Damian Pliszczuk
  • Patryk Marek
  • Weronika Wilczewska
  • Bartosz Przysucha
  • Tomasz Rymarczyk

Abstract

Purpose: This paper explores the challenges and potential solutions associated with integrating Text2SQL technology into customer support operations. By leveraging large language models (LLMs) and tools like Vanna.AI, the study aims to enhance the efficiency and accuracy of handling customer queries without requiring specialized SQL knowledge. Design/Methodology/Approach: A comprehensive analysis was conducted comparing the effectiveness of three large language models—Llama3:70b-instruct, Gemma2:27b, and Codegemma—in generating correct SQL queries from natural language questions. The models were trained with identical datasets and evaluated using six benchmark questions over two iterations, with and without detailed database schema information. Performance metrics included correctness of the generated queries and response times. Findings: The results indicated that while Llama3 and Gemma2 initially demonstrated higher accuracy, the addition of detailed database schema information did not improve model performance. Instead, it led to decreased accuracy and increased response times, particularly for Llama3. Codegemma showed shorter response times but slightly lower accuracy. The study highlights that excessive contextual information can overwhelm LLMs, suggesting the need for optimized context provision. Practical Implications: The findings suggest that simplifying database schema information and focusing on essential contextual data can enhance the performance of LLMs in generating SQL queries. Implementing tools like Vanna.AI, which utilize Retrieval Augmented Generation (RAG), can improve customer support processes by enabling quick and accurate data access without specialized SQL expertise. Originality/Value: This paper provides valuable insights into the practical challenges of implementing Text2SQL technology in customer support. It offers recommendations for balancing context provision and model capabilities, contributing to the optimization of LLM performance in real-world applications.

Suggested Citation

  • Michal Maj & Damian Pliszczuk & Patryk Marek & Weronika Wilczewska & Bartosz Przysucha & Tomasz Rymarczyk, 2024. "Optimizing Customer Support Using Text2SQL to Query Natural Language Databases," European Research Studies Journal, European Research Studies Journal, vol. 0(Special B), pages 426-438.
  • Handle: RePEc:ers:journl:v:xxvii:y:2024:i:specialb:p:426-438
    as

    Download full text from publisher

    File URL: https://ersj.eu/journal/3498/download
    Download Restriction: no
    ---><---

    More about this item

    Keywords

    Text2SQL; Customer Support; Large Language Models; Vanna.AI; Retrieval Augmented Generation; SQL Query Generation.;
    All these keywords.

    JEL classification:

    • C45 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods: Special Topics - - - Neural Networks and Related Topics
    • C61 - Mathematical and Quantitative Methods - - Mathematical Methods; Programming Models; Mathematical and Simulation Modeling - - - Optimization Techniques; Programming Models; Dynamic Analysis
    • M31 - Business Administration and Business Economics; Marketing; Accounting; Personnel Economics - - Marketing and Advertising - - - Marketing
    • L8 - Industrial Organization - - Industry Studies: Services
    • D83 - Microeconomics - - Information, Knowledge, and Uncertainty - - - Search; Learning; Information and Knowledge; Communication; Belief; Unawareness

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:ers:journl:v:xxvii:y:2024:i:specialb:p:426-438. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Marios Agiomavritis (email available below). General contact details of provider: https://ersj.eu/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.