Scopul acestei teze de master este modul în care pot fi integrate eficient cunoștințele de domeniu în Modelele Lingvistice Mari (LLMs), astfel încât acestea să furnizeze răspunsuri corecte, actualizate și verificabile. În contextul în care modelele tradiționale bazate exclusiv pe memorie parametrică pot genera erori, informații învechite sau răspunsuri nefondate, este necesară investigarea metodelor moderne care permit conectarea modelelor la surse reale de date și la cunoștințe actualizabile. Lucrarea analizează trei metode principale de integrare a cunoștințelor. Retrieval-Augmented Generation (RAG) bazat pe baze de date vectoriale pentru acces la documente. Agentic RAG, care extinde RAG prin agenți capabili să utilizeze instrumente externe și interogări Text-to-SQL pentru a accesa baze de date relaționale. Fine-Tuning, utilizat pentru încorporarea directă a cunoștințelor stabile și a specificului limbajului de domeniu în parametrii modelului. Capitolul Analiza Domeniului descrie problema integrării cunoștințelor, relevanța acesteia și limitele tehnicilor tradiționale, urmată de analiza metodelor moderne: RAG, Agentic RAG, Fine-Tuning și aplicațiile lor practice. Sunt analizate, de asemenea, competiția, soluțiile existente. Capitolul Proiectarea Sistemului prezintă arhitecturile celor trei metode, incluzând diagrame pentru RAG, Agentic RAG, Fine-Tuning și mecanismele de evaluare cu RAGAS. Sunt explicate componentele esențiale precum ingestia datelor, indexarea, recuperarea, orchestrarea și apelarea instrumentelor (precum Text-to-SQL). Capitolul Implementări descrie prototipuri funcționale pentru metodele analizate, incluzând arhitectură, diagrame de secvență și fragmente de cod. Experimentele acoperă interogări pe documente diverse (TXT, CSV) și pe tabele relaționale (SQLite), simulând scenarii reale de întrebare-răspuns. Capitolul Evaluare și Recomandări compară performanța celor trei metode din perspectiva calității răspunsurilor și a costului operațional. Pentru sistemele RAG sunt utilizate metricile din cadrul RAGAS, evidențiind diferențele dintre recuperarea semantică (Classic RAG) și accesarea exactă a tabelelor prin SQL (Agentic RAG). În plus, este utilizată o evaluare unificată orientată pe ieșire structurată, bazată pe răspunsuri strict JSON pentru sarcini fixe. Pe baza acestor rezultate, capitolul oferă recomandări clare de utilizare.
The aim of this master's thesis is to investigate and compare practical methods for integrating domain knowledge into Large Language Models (LLMs) so that these systems can produce accurate, up-to-date, and verifiable answers. Traditional LLMs rely solely on parametric memory, which can lead to outdated or ungrounded responses; therefore, modern approaches that connect models to external, refreshable knowledge sources are essential. This thesis analyzes three core methods of knowledge integration. Retrieval-Augmented Generation (RAG) using vector databases for document retrieval. Agentic RAG, which extends RAG with tool-use capabilities such as Text-to-SQL for querying relational databases. Fine-Tuning, used to encode stable domain knowledge and domain-specific language directly into the model’s parameters. The Domain Analysis chapter introduces the motivation behind grounded AI systems, explains the limitations of purely parametric models, and details how RAG, Agentic RAG, and Fine-Tuning address these challenges. It also reviews existing solutions and highlights the need for reliable, interpretable, and auditable AI systems in real-world applications. The System Design chapter presents the architectures of all three approaches through diagrams and describes the key components of each system, data ingestion, indexing, retrieval, generation, and tool-calling mechanisms. It also includes the evaluation framework based on RAGAS metrics. The Implementations chapter provides functional prototypes for each method, including architecture diagrams, sequence diagrams, and code examples. The experiments use a representative dataset composed of documents (TXT, CSV) and structured data (SQLite tables), covering common query types such as factual lookups, multi-document questions, numerical reasoning, and mixed document-table questions. The Evaluation and Recommendations chapter compares the performance of the three methods in terms of response quality and operational cost. For RAG systems, the metrics from the RAGAS framework are used, highlighting the differences between semantic retrieval (Classic RAG) and exact table access via SQL (Agentic RAG). In addition, a unified evaluation oriented to structured output is used, based on strict JSON responses for fixed tasks. Based on these results, the chapter provides clear recommendations for use.