Unlocking Insights : The Influence of Query Format on LLM-based Knowledge Retrieval Systems
Year: 2024
Type: dissertation
Abstract: The purpose of this thesis is to address the challenge of democratizing access to structured knowledge retrieval by exploring the influence of query format for database queries using natural language through Large Language Models (LLMs). The significance of this problem lies in the potential of making data insights accessible to a broader audience, thereby enhancing decision-making processes across various domains. Despite advancements in natural language understanding and LLMs, translating natural language queries into structured query languages remains a complex task due to the nuances and context-dependent nature of human language. This complexity with the limitation of current research of the impact of underlying query format on performance makes it a suitable and challenging topic for this research. The problem was solved by developing structured knowledge retrieval system that allows translation of natural language questions into structured database queries in a analytics platform. The system leverages both SQL and a custom domain specific language (DSL) to generate queries. A SQL parser that could translate SQL queries into DSL queries was developed in order to be able to compare the two different query formats on the same queries. Baseline models were implemented for generating both SQL and DSL. The baseline models where then enhanced using few-shot learning and vector embeddings to improve accuracy and token efficiency. The results indicate that the underlying query format significantly impacts the accuracy and token usage of query generation. SQL-based models consistently outperformed DSL-based models, achieving higher accuracy and lower token usage. Few-shot learning proved to be specifically effective, especially for DSL-based models significantly improving their performance. However, the implementation of vector embeddings did not yield the expected improvements, suggesting further research on the topic.
Author: Johansson, Ludwig
Institution: KTH Royal Institute of Technology
Language: English
Topic: Topic Modeling
Subfield: Artificial Intelligence
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W6987765658
