The rapid evolution of Large Language Models (LLMs) has reshaped the field of Artificial Intelligence (AI), demonstrating exceptional capabilities in Natural Language Processing (NLP) tasks such as text generation, text classification, machine translation, question answering, and summarization. Moreover, they have also proven capable of performing operations in new domains such as data analysis, problem-solving, and code generation. LLMs, thanks to their ability to interpret instructions, infer context, and generate coherent outputs, represent promising tools for data-driven workflows. Among these workflows, data preparation is one of the most critical and complex phases, which encompasses a collection of operations aimed at improving data quality. Given the expanding capabilities of LLMs beyond traditional NLP tasks, their potential to detect errors, transform data, and identify dependencies has made the question of whether they can support data preparation an important research direction. However, their actual effectiveness in these tasks remains uncertain. This thesis therefore investigates whether LLMs can be effectively used to support data-preparation pipelines. Moreover, since LLMs often struggle with complex tasks and can benefit from additional guidance to improve accuracy, various prompting techniques have been developed to guide them toward more relevant responses. To this aim, we design and evaluate different prompting strategies to enhance LLM performance in executing data preparation tasks. To achieve this goal, an experimental framework was designed to evaluate the capabilities of three state-of-the-art LLMs in performing data preparation on structured datasets characterized by different degrees of complexity and noise. We focused on data exploration tasks, such as data profiling and dependency discovery, and cleaning tasks, such as data wrangling, data standardization, outlier detection, data imputation, and data de-duplication. Different prompting strategies were designed to enhance models' ability to perform such demanding tasks. Model outputs were evaluated through a set of customized metrics tailored to users' needs in being supported while performing data preparation. Results demonstrate that effective prompt design can significantly enhance LLM capabilities in supporting data-preparation tasks, although such improvements are not observed across all operations.
L’evoluzione rapida dei modelli linguistici di grandi dimensioni (LLM) ha trasformato il campo dell’Intelligenza Artificiale (AI), mostrando capacità eccezionali in attività di elaborazione del linguaggio naturale (NLP) come generazione del testo, classificazione, traduzione automatica, risposta alle domande e sintesi. Inoltre, hanno dimostrato di saper operare anche in nuovi domini, come l’analisi dei dati, la risoluzione di problemi e la generazione di codice. Grazie alla loro abilità di interpretare istruzioni, comprendere il contesto e generare risultati coerenti, gli LLM rappresentano strumenti promettenti per processi basati sui dati. Tra questi, la preparazione dei dati costituisce una delle fasi più critiche e complesse, comprendendo una serie di operazioni volte a migliorare la qualità delle informazioni disponibili. Alla luce delle crescenti capacità degli LLM oltre i tradizionali compiti di elaborazione del linguaggio, il loro potenziale nel rilevare errori, trasformare dati e identificare relazioni rende particolarmente rilevante la domanda se essi possano supportare la preparazione dei dati. Tuttavia, la loro reale efficacia in queste attività rimane incerta. Questa tesi indaga quindi se tali modelli possano essere utilizzati in modo efficace per sostenere i processi di preparazione dei dati. Inoltre, poiché gli LLM incontrano spesso difficoltà con compiti complessi e possono beneficiare di indicazioni aggiuntive per migliorare l’accuratezza, sono state sviluppate diverse tecniche di prompting per guidarli verso risposte più pertinenti. A tal fine, abbiamo progettato e valutato diversi prompt per migliorare le prestazioni degli LLM nell’esecuzione di compiti di preparazione dei dati. Per raggiungere questo obiettivo è stato progettato un framework sperimentale per valutare le capacità di tre LLM all’avanguardia nell’eseguire operazioni di preparazione dei dati su dataset strutturati caratterizzati da diversi livelli di complessità ed errori. Ci siamo concentrati su attività di esplorazione dei dati, come la profilazione di dati e la scoperta di dipendenze, e su attività di pulizia, come data wrangling, standardizzazione, rilevamento di valori anomali, imputazione e deduplicazione. Sono state progettate diverse strategie di prompting per migliorare la capacità dei modelli di eseguire tali operazioni complesse. I risultati prodotti dagli LLM sono stati valutati attraverso un insieme di metriche personalizzate, definite in base alle esigenze degli utenti coinvolti nella preparazione dei dati. I risultati dimostrano che un prompt design efficace può migliorare in modo significativo le capacità degli LLM nel supportare i compiti di preparazione dei dati, sebbene tali miglioramenti non siano osservabili in tutte le operazioni.
Designing and evaluating prompting strategies for LLM-based data preparation
PUPPINATO, THOMAS
2025/2026
Abstract
The rapid evolution of Large Language Models (LLMs) has reshaped the field of Artificial Intelligence (AI), demonstrating exceptional capabilities in Natural Language Processing (NLP) tasks such as text generation, text classification, machine translation, question answering, and summarization. Moreover, they have also proven capable of performing operations in new domains such as data analysis, problem-solving, and code generation. LLMs, thanks to their ability to interpret instructions, infer context, and generate coherent outputs, represent promising tools for data-driven workflows. Among these workflows, data preparation is one of the most critical and complex phases, which encompasses a collection of operations aimed at improving data quality. Given the expanding capabilities of LLMs beyond traditional NLP tasks, their potential to detect errors, transform data, and identify dependencies has made the question of whether they can support data preparation an important research direction. However, their actual effectiveness in these tasks remains uncertain. This thesis therefore investigates whether LLMs can be effectively used to support data-preparation pipelines. Moreover, since LLMs often struggle with complex tasks and can benefit from additional guidance to improve accuracy, various prompting techniques have been developed to guide them toward more relevant responses. To this aim, we design and evaluate different prompting strategies to enhance LLM performance in executing data preparation tasks. To achieve this goal, an experimental framework was designed to evaluate the capabilities of three state-of-the-art LLMs in performing data preparation on structured datasets characterized by different degrees of complexity and noise. We focused on data exploration tasks, such as data profiling and dependency discovery, and cleaning tasks, such as data wrangling, data standardization, outlier detection, data imputation, and data de-duplication. Different prompting strategies were designed to enhance models' ability to perform such demanding tasks. Model outputs were evaluated through a set of customized metrics tailored to users' needs in being supported while performing data preparation. Results demonstrate that effective prompt design can significantly enhance LLM capabilities in supporting data-preparation tasks, although such improvements are not observed across all operations.| File | Dimensione | Formato | |
|---|---|---|---|
|
2025_12_Puppinato_Tesi.pdf
accessibile in internet per tutti
Descrizione: Testo tesi
Dimensione
2.4 MB
Formato
Adobe PDF
|
2.4 MB | Adobe PDF | Visualizza/Apri |
|
2025_12_Puppinato_Executive_Summary.pdf
accessibile in internet per tutti
Descrizione: Executive summary
Dimensione
550.83 kB
Formato
Adobe PDF
|
550.83 kB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/247161