Riassunto analitico
Negli ultimi anni, i Large Language Model (LLM) hanno rivoluzionato il modo in cui interagiamo con la tecnologia. La loro rapida diffusione è dovuta alla facilità di utilizzo di LLM come ChatGPT, Gemini e Claude, che possono essere impiegati per essere testati su un vasto pubblico eterogeneo, comodamente attraverso una semplice e funzionale interfaccia di chat. Ormai qualsiasi impresa commerciale, finanziaria o sanitaria ospita nel proprio sito un assistente digitale basato su LLM, disponibile H24 per rispondere alle domande degli utenti e alleggerire il flusso di assistenza tecnica. Sebbene gli LLM siano reti artificiali con una sorprendente capacità di elaborazione e gestione dei dati, presen- tano tuttavia una problematica su cui è necessario porre particolare attenzione: la divulgazione di informazioni errate. La loro formulazione teorica e implementazione permettono loro di generare la se- quenza più probabile sulla base di quelle viste in precedenza; tuttavia, la sequenza in uscita potrebbe non essere corretta dal punto di vista del contenuto informativo. Nel caso dei chatBOT, in cui il compito principale è la generazione di una risposta a partire da una domanda in input, ci si aspetta che la risposta sia corretta non solo dal punto di vista sintattico, ma anche tecnico e informativo. Tuttavia, un semplice LLM non è sufficiente per soddisfare questo requisito. La soluzione a questo proble- ma è l’adozione di tecniche di Augmentation, in cui una componente di Retrieval reperisce informazioni valide e contestualmente corrette, fornendole a un LLM prima della generazione dell’output finale. Questa tecnica prende generalmente il nome di Retrieval-Augmented Generation (RAG). In questo elaborato verrà illustrato come realizzare un sistema di tipo RAG, ana- lizzando in dettaglio le best practice per la sua implementazione: dall’analisi e dal preprocessing dei dati, alla scelta della componente di retrieval, fino alla generazio- ne della risposta finale. In particolare, questo elaborato descrive come creare un chatbot su richiesta di una software-house chiamata Maticad, che necessita di un assistente digitale in grado di aiutare clienti base ed esperti nelle operazioni abi- tuali svolte all’interno del loro software professionale di progettazione, rendering e visualizzazione 3D per il settore ceramico e dell’arredo, denominato DomuS3D.
|
Abstract
In recent years, Large Language Models (LLMs) have revolutionized the way we interact with technology. Their rapid spread is due to the ease of use of LLMs like ChatGPT, Gemini, and Claude, which can be employed solely to be tested on a vast, heterogeneous audience, conveniently through a simple and functional chat interface.
Nowadays, any commercial, financial, or healthcare company hosts a digital assistant based on LLMs on their website, available 24/7 to answer user questions and ease the flow of technical support. Although LLMs are artificial networks with surprising data processing and handling capabilities, they still present a problem that requires particular attention: the dissemination of false information.
Their theoretical formulation and implementation allow them to generate the most probable sequence based on previously seen data; however, the output sequence may not be correct in terms of informational content. In the case of chatbots, where the main task is to generate a response based on an input question, one expects the answer to be correct not only from a syntactic point of view but also from a technical and informational standpoint. However, a basic LLM does not meet this requirement. The solution to this problem is the adoption of augmentation techniques, in which a retrieval component retrieves valid and contextually correct information and provides it to an LLM before generating the final output. This technique is generally referred to as Retrieval-Augmented Generation (RAG).
This paper will illustrate how to build a RAG system, analyzing in detail the best practices for its implementation: from data analysis and preprocessing, to the choice of the retrieval component, up to the generation of the final response. In particular, this paper aims to describe how to create a chatbot at the request of a software house called Maticad, which needs a digital assistant capable of helping both basic and expert users in performing common tasks within their professional design, rendering, and 3D visualization software for the ceramic and furniture sectors, called DomuS3D.
|