Uma API integrada com o GPT 3.5 para consultas SQL por meio de linguagem natural (NL2SQL)

Detalhes bibliográficos
Autor(a) principal: Cenci, Tiago
Data de Publicação: 2024
Tipo de documento: Trabalho de conclusão de curso
Idioma: por
Título da fonte: Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT))
Texto Completo: http://repositorio.utfpr.edu.br/jspui/handle/1/34422
Resumo: The swift and accurate retrieval of information from a database is crucial in various real-world scenarios. However, within the realm of relational databases, extracting desired data requires proficiency in Structured Query Language (SQL), thereby limiting access to a specialized audience. With the advancement of Artificial Intelligence and the availability of pre-trained models such as the Generative Pre-Trained Transformer (GPT), an opportunity arises to make a significant contribution to this scenario. In this context, this work aims at developing an application that translates user-supplied natural language text into SQL commands, and then run these commands in a database that contains a dictionary of specific data containing information about its tables and fields, to finally present the result to the user in an accessible and friendly way. To achieve this, an Application Programming Interface (API) was developed in python to facilitate message exchange between users and the application, leveraging the GPT model API from OpenAI, and utilizing the Firebird relational database. The evaluation of the proposed work will assess the accuracy of SQL translation, the system’s ability to recognize out-of-context inputs, response time performance, and tolerance to errors in received text.
id UTFPR-12_4e3a13a796781887f807e1b0e7e848a4
oai_identifier_str oai:repositorio.utfpr.edu.br:1/34422
network_acronym_str UTFPR-12
network_name_str Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT))
repository_id_str
spelling Uma API integrada com o GPT 3.5 para consultas SQL por meio de linguagem natural (NL2SQL)An API integrated with GPT-3.5 for SQL queries through natural language (NL2SQL)Processamento de linguagem natural (Computação)Inteligência ArtificialAprendizado do computadorInterface de programas aplicativos (Software)Natural language processing (Computer science)Artificial intelligenceMachine learningApplication Program Interfaces (Computer software)CNPQ::CIENCIAS EXATAS E DA TERRA::CIENCIA DA COMPUTACAO::SISTEMAS DE COMPUTACAOThe swift and accurate retrieval of information from a database is crucial in various real-world scenarios. However, within the realm of relational databases, extracting desired data requires proficiency in Structured Query Language (SQL), thereby limiting access to a specialized audience. With the advancement of Artificial Intelligence and the availability of pre-trained models such as the Generative Pre-Trained Transformer (GPT), an opportunity arises to make a significant contribution to this scenario. In this context, this work aims at developing an application that translates user-supplied natural language text into SQL commands, and then run these commands in a database that contains a dictionary of specific data containing information about its tables and fields, to finally present the result to the user in an accessible and friendly way. To achieve this, an Application Programming Interface (API) was developed in python to facilitate message exchange between users and the application, leveraging the GPT model API from OpenAI, and utilizing the Firebird relational database. The evaluation of the proposed work will assess the accuracy of SQL translation, the system’s ability to recognize out-of-context inputs, response time performance, and tolerance to errors in received text.A obtenção ágil e precisa de informações de um banco de dados é de suma importância em diversos cenários do mundo real. No entanto, no contexto dos bancos de dados relacionais, a extração dos dados desejados exige proficiência em linguagem Structured Query Language (SQL), o que restringe o acesso a essas informações a um público especializado. Com o avanço da Inteligência Artificial e a disponibilidade de modelos pré-treinados, como o Generative Pre-Trained Transformer (GPT), surge a oportunidade de criar uma contribuição significativa a esse cenário. Neste contexto, este trabalho tem como objetivo desenvolver uma aplicação que traduza o texto fornecido pelo usuário em linguagem natural para comandos SQL, e em seguida, execute esses comandos em um banco de dados que contenha um dicionário de dados específico contendo informações sobre suas tabelas e campos, para, por fim, apresentar o resultado ao usuário de maneira acessível e amigável. Para realizar este trabalho, foi desenvolvida uma Interface de Programação de Aplicação, do Inglês Application Programming Interface (API) em python para facilitar a troca de mensagens entre os usuários e a aplicação, assim como foi utilizada a API do modelo GPT da OpenAi e banco de dados relacional Firebird. Para avaliação do trabalho proposto, será medida a precisão da tradução para SQL, a capacidade de reconhecer entradas fora de contexto, o desempenho no tempo de resposta e a tolerância a erros no texto recebido.Universidade Tecnológica Federal do ParanáPato BrancoBrasilDepartamento Acadêmico de InformáticaTecnologia em Análise e Desenvolvimento de SistemasUTFPRDal Molin, VivianeFavero, Eliane Maria de BortoliDal Molin, VivianeFavero, Eliane Maria de BortoliPola, Ives Renê VenturiniPegorini, ViniciusCenci, Tiago2024-08-12T15:14:14Z2024-08-12T15:14:14Z2024-06-17info:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/bachelorThesisapplication/pdfCENCI, Tiago. Uma API integrada com o GPT 3.5 para consultas SQL por meio de linguagem natural (NL2SQL). 2024. Trabalho de Conclusão de Curso (Tecnologia em Análise e Desenvolvimento de Sistemas) - Universidade Tecnológica Federal do Paraná, Pato Branco, 2024.http://repositorio.utfpr.edu.br/jspui/handle/1/34422porhttp://creativecommons.org/licenses/by-sa/4.0/info:eu-repo/semantics/openAccessreponame:Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT))instname:Universidade Tecnológica Federal do Paraná (UTFPR)instacron:UTFPR2024-08-14T06:09:37Zoai:repositorio.utfpr.edu.br:1/34422Repositório InstitucionalPUBhttp://repositorio.utfpr.edu.br:8080/oai/requestriut@utfpr.edu.br || sibi@utfpr.edu.bropendoar:2024-08-14T06:09:37Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT)) - Universidade Tecnológica Federal do Paraná (UTFPR)false
dc.title.none.fl_str_mv Uma API integrada com o GPT 3.5 para consultas SQL por meio de linguagem natural (NL2SQL)
An API integrated with GPT-3.5 for SQL queries through natural language (NL2SQL)
title Uma API integrada com o GPT 3.5 para consultas SQL por meio de linguagem natural (NL2SQL)
spellingShingle Uma API integrada com o GPT 3.5 para consultas SQL por meio de linguagem natural (NL2SQL)
Cenci, Tiago
Processamento de linguagem natural (Computação)
Inteligência Artificial
Aprendizado do computador
Interface de programas aplicativos (Software)
Natural language processing (Computer science)
Artificial intelligence
Machine learning
Application Program Interfaces (Computer software)
CNPQ::CIENCIAS EXATAS E DA TERRA::CIENCIA DA COMPUTACAO::SISTEMAS DE COMPUTACAO
title_short Uma API integrada com o GPT 3.5 para consultas SQL por meio de linguagem natural (NL2SQL)
title_full Uma API integrada com o GPT 3.5 para consultas SQL por meio de linguagem natural (NL2SQL)
title_fullStr Uma API integrada com o GPT 3.5 para consultas SQL por meio de linguagem natural (NL2SQL)
title_full_unstemmed Uma API integrada com o GPT 3.5 para consultas SQL por meio de linguagem natural (NL2SQL)
title_sort Uma API integrada com o GPT 3.5 para consultas SQL por meio de linguagem natural (NL2SQL)
author Cenci, Tiago
author_facet Cenci, Tiago
author_role author
dc.contributor.none.fl_str_mv Dal Molin, Viviane
Favero, Eliane Maria de Bortoli
Dal Molin, Viviane
Favero, Eliane Maria de Bortoli
Pola, Ives Renê Venturini
Pegorini, Vinicius
dc.contributor.author.fl_str_mv Cenci, Tiago
dc.subject.por.fl_str_mv Processamento de linguagem natural (Computação)
Inteligência Artificial
Aprendizado do computador
Interface de programas aplicativos (Software)
Natural language processing (Computer science)
Artificial intelligence
Machine learning
Application Program Interfaces (Computer software)
CNPQ::CIENCIAS EXATAS E DA TERRA::CIENCIA DA COMPUTACAO::SISTEMAS DE COMPUTACAO
topic Processamento de linguagem natural (Computação)
Inteligência Artificial
Aprendizado do computador
Interface de programas aplicativos (Software)
Natural language processing (Computer science)
Artificial intelligence
Machine learning
Application Program Interfaces (Computer software)
CNPQ::CIENCIAS EXATAS E DA TERRA::CIENCIA DA COMPUTACAO::SISTEMAS DE COMPUTACAO
description The swift and accurate retrieval of information from a database is crucial in various real-world scenarios. However, within the realm of relational databases, extracting desired data requires proficiency in Structured Query Language (SQL), thereby limiting access to a specialized audience. With the advancement of Artificial Intelligence and the availability of pre-trained models such as the Generative Pre-Trained Transformer (GPT), an opportunity arises to make a significant contribution to this scenario. In this context, this work aims at developing an application that translates user-supplied natural language text into SQL commands, and then run these commands in a database that contains a dictionary of specific data containing information about its tables and fields, to finally present the result to the user in an accessible and friendly way. To achieve this, an Application Programming Interface (API) was developed in python to facilitate message exchange between users and the application, leveraging the GPT model API from OpenAI, and utilizing the Firebird relational database. The evaluation of the proposed work will assess the accuracy of SQL translation, the system’s ability to recognize out-of-context inputs, response time performance, and tolerance to errors in received text.
publishDate 2024
dc.date.none.fl_str_mv 2024-08-12T15:14:14Z
2024-08-12T15:14:14Z
2024-06-17
dc.type.status.fl_str_mv info:eu-repo/semantics/publishedVersion
dc.type.driver.fl_str_mv info:eu-repo/semantics/bachelorThesis
format bachelorThesis
status_str publishedVersion
dc.identifier.uri.fl_str_mv CENCI, Tiago. Uma API integrada com o GPT 3.5 para consultas SQL por meio de linguagem natural (NL2SQL). 2024. Trabalho de Conclusão de Curso (Tecnologia em Análise e Desenvolvimento de Sistemas) - Universidade Tecnológica Federal do Paraná, Pato Branco, 2024.
http://repositorio.utfpr.edu.br/jspui/handle/1/34422
identifier_str_mv CENCI, Tiago. Uma API integrada com o GPT 3.5 para consultas SQL por meio de linguagem natural (NL2SQL). 2024. Trabalho de Conclusão de Curso (Tecnologia em Análise e Desenvolvimento de Sistemas) - Universidade Tecnológica Federal do Paraná, Pato Branco, 2024.
url http://repositorio.utfpr.edu.br/jspui/handle/1/34422
dc.language.iso.fl_str_mv por
language por
dc.rights.driver.fl_str_mv http://creativecommons.org/licenses/by-sa/4.0/
info:eu-repo/semantics/openAccess
rights_invalid_str_mv http://creativecommons.org/licenses/by-sa/4.0/
eu_rights_str_mv openAccess
dc.format.none.fl_str_mv application/pdf
dc.publisher.none.fl_str_mv Universidade Tecnológica Federal do Paraná
Pato Branco
Brasil
Departamento Acadêmico de Informática
Tecnologia em Análise e Desenvolvimento de Sistemas
UTFPR
publisher.none.fl_str_mv Universidade Tecnológica Federal do Paraná
Pato Branco
Brasil
Departamento Acadêmico de Informática
Tecnologia em Análise e Desenvolvimento de Sistemas
UTFPR
dc.source.none.fl_str_mv reponame:Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT))
instname:Universidade Tecnológica Federal do Paraná (UTFPR)
instacron:UTFPR
instname_str Universidade Tecnológica Federal do Paraná (UTFPR)
instacron_str UTFPR
institution UTFPR
reponame_str Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT))
collection Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT))
repository.name.fl_str_mv Repositório Institucional da UTFPR (da Universidade Tecnológica Federal do Paraná (RIUT)) - Universidade Tecnológica Federal do Paraná (UTFPR)
repository.mail.fl_str_mv riut@utfpr.edu.br || sibi@utfpr.edu.br
_version_ 1850498080350142464