Saved in:
Bibliographic Details
Main Authors: Domínguez, José Manuel, Errázuriz, Benjamín, Daher, Patricio
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2401.02997
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909063335378944
author Domínguez, José Manuel
Errázuriz, Benjamín
Daher, Patricio
author_facet Domínguez, José Manuel
Errázuriz, Benjamín
Daher, Patricio
contents Large Language Models (LLMs) have gained considerable notoriety in the field of natural language to SQL tasks (NL2SQL). In this study, we show how task decomposition can greatly benefit LLMs in database understanding and query generation in order to answer human questions with an SQL query. We fined-tuned open source models, specifically Llama-2 and Code Llama, by combining 2 different models each designated to focus on one of two tasks in order to leverage each model's core competency to further increase the accuracy of the final SQL query. We propose a new framework to divide the schema into chunks in order to fit more information into a limited context. Our results are comparable with those obtained by GPT-4 at the same time being 135 times smaller, 90 times faster and more than 100 times cheaper than GPT-4.
format Preprint
id arxiv_https___arxiv_org_abs_2401_02997
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Blar-SQL: Faster, Stronger, Smaller NL2SQL
Domínguez, José Manuel
Errázuriz, Benjamín
Daher, Patricio
Computation and Language
Artificial Intelligence
Large Language Models (LLMs) have gained considerable notoriety in the field of natural language to SQL tasks (NL2SQL). In this study, we show how task decomposition can greatly benefit LLMs in database understanding and query generation in order to answer human questions with an SQL query. We fined-tuned open source models, specifically Llama-2 and Code Llama, by combining 2 different models each designated to focus on one of two tasks in order to leverage each model's core competency to further increase the accuracy of the final SQL query. We propose a new framework to divide the schema into chunks in order to fit more information into a limited context. Our results are comparable with those obtained by GPT-4 at the same time being 135 times smaller, 90 times faster and more than 100 times cheaper than GPT-4.
title Blar-SQL: Faster, Stronger, Smaller NL2SQL
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2401.02997