kth.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Enhancing Text-to-SQL Applications with Retrieval Augmented Generation: How does academic advancements in Text-to-SQL translate to industry usage?
KTH, School of Electrical Engineering and Computer Science (EECS).
2024 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesisAlternative title
Förbättring av Text-till-SQL-applikationer med Retrieval Augmented Generation : Hur omsätts akademiska framsteg inom Text-to-SQL till användning inom industrin? (Swedish)
Abstract [en]

The topic of this thesis revolves around the utilization of Retrieval Augmented Generation (RAG) models for Text-to-SQL applications, with a focus on evaluating their effectiveness and practicality in real-world scenarios. The primary objective is to assess the model’s performance on a benchmark dataset and a real-world dataset, aiming to bridge the gap between academic advancements and industry requirements in Natural Language (NL) processing. The problem statement addressed in this research is the adaptation of RAG models to real-world datasets, highlighting the challenges and opportunities in translating research advancements into practical solutions. This problem is noteworthy due to the application potential in industry settings, an area where limited research has been conducted. To solve this problem, the project undertook the construction and evaluation of the RAG model, incorporating in-context learning and prompt engineering techniques inspired by state-of-the-art models. By implementing these strategies, significant improvements were observed in the model’s accuracy and query generation capabilities. The RAG model’s potential is particularly evident in combination with the Majority Vote technique, achieving competitive performance on the benchmark dataset. The key results and conclusions of this research project underscore the successful construction and evaluation of the RAG model, showcasing its potential in Text-to-SQL applications. While the model demonstrated promising performance on benchmark datasets, challenges in adapting it to real-world data emphasize the need for further refinement. The project’s findings provide valuable insights for future research in enhancing the practical applicability of RAG models for Text-to-SQL in industry settings, paving the way for advancements in NL processing technologies.

Abstract [sv]

Ämnet för denna avhandling kretsar kring användningen av Retrieval Augmented Generation (RAG)-modeller för Text-to-SQL applikationer, med fokus på att utvärdera deras effektivitet och praktiska användbarhet i verkliga scenarier. Det primära målet är att bedöma modellens prestanda på ett benchmark-dataset och i en verklig situation, med syfte att överbrygga klyftan mellan akademiska framsteg och branschkrav inom naturlig språkbehandling. Det problem som behandlas i denna uppsats är anpassningen av RAG-modeller till verkliga dataset, med betoning på utmaningar och möjligheter vid översättning av forskningsframsteg till praktiska lösningar. Detta problem är betydelsefullt på grund av dess potentiella tillämpning i branschmiljöer, där begränsad forskning har genomförts. För att lösa detta problem genomförde projektet konstruktion och utvärdering av RAG-modellen, med hjälp av in-context learning och prompt engineering-tekniker inspirerade av state-of-the-art modeller. Genom att implementera dessa strategier observerades betydande förbättringar i modellens träffsäkerhet och SQL-genereringsförmåga. RAG-modellens potential är särskilt tydlig i kombination med tekniken Majority Vote, vilket uppnår konkurrenskraftig prestanda på benchmark-datasetet. De viktigaste resultaten och slutsatserna från detta forskningsprojekt understryker den framgångsrika konstruktionen och utvärderingen av RAG-modellen och visar dess potential i Text-to-SQL-applikationer. Medan modellen visade lovande prestanda på benchmark-datasetet hade den svårigheter att prestera på den verkliga datan. Utmaningarna med att anpassa modellen till verklig data understryker behovet av ytterligare förfining. Projektets resultat ger värdefulla insikter för framtida forskning för att förbättra RAG-modellers praktiska användbarhet för Text-to-SQL i branschmiljöer och banar väg för framsteg inom teknologier för naturlig språkbehandling.

Place, publisher, year, edition, pages
2024. , p. 61
Series
TRITA-EECS-EX ; 2024:447
Keywords [en]
Text-to-SQL, Retrieval Augmented Generation, Spider Dataset, Practical applicability, In-context learning, Prompt engineering
Keywords [sv]
Text-to-SQL, Retrieval Augmented Generation, Spider Dataset, Praktisk tillämpbarhet, In-context learning, Prompt engineering
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-351385OAI: oai:DiVA.org:kth-351385DiVA, id: diva2:1887429
External cooperation
Nibiru Software AB
Supervisors
Examiners
Available from: 2024-09-20 Created: 2024-08-07 Last updated: 2024-09-20Bibliographically approved

Open Access in DiVA

fulltext(1386 kB)728 downloads
File information
File name FULLTEXT01.pdfFile size 1386 kBChecksum SHA-512
d9a8e8e9c6c7c4d243fee266dfcdc94bcdafb944d62d2c48fd202d2ff8b7f04b221091840f19e7f6030a6c25bb474774ba72c2db6f26f825974cc4de0da1c47b
Type fulltextMimetype application/pdf

By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 728 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 683 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf