This thesis presents the design, implementation, and evaluation of a scaffolding architecture for interactive and immersive storytelling using small Large Language Models. The proposed architecture supports the generation process by providing modular components for information extraction, retrieval-augmented generation, and context management, aiming to reduce the computational burden and improve long-term coherence in resource-constrained environments. The architecture was implemented as a modular system built around the Llama-3.1-8B-Instruct model, and tested against a purely LLM-based baseline in an interactive fantasy storytelling scenario. A small-scale user study was conducted, involving seven tests with five users. Quantitative and qualitative analyses were performed, combining user questionnaires (UEQ, SUS, and custom story evaluation) with automated textual metrics covering lexical diversity, adherence to story outline, adherence to user input, and semantic coherence. Results indicate that the scaffolding architecture does not significantly degrade the perceived or objective quality of the generated stories, while offering substantial advantages in terms of computational efficiency. Specifically, the architecture maintains both processing time and context token length roughly constant as the story progresses, whereas the baseline system exhibits linear growth in both dimensions. Moreover, evidence suggests that the purely LLM-based approach may begin to degrade after approximately 20 generated scenes. These findings support the conclusion that the proposed architecture is a viable solution for interactive storytelling with small LLMs in low-resource settings, offering a favorable trade-off between story quality and computational cost.
Questa tesi presenta la progettazione, l’implementazione e la valutazione di un’architettura di scaffolding per la narrazione interattiva e immersiva, basata su Large Language Models (LLM) di piccole dimensioni (meno di 10 miliardi di parametri). L’architettura proposta supporta il processo di generazione attraverso componenti modulari per l’estrazione di informazioni, la generazione aumentata da recupero (RAG) e la gestione del contesto, con l’obiettivo di ridurre il carico computazionale e migliorare la coerenza a lungo termine in ambienti con risorse limitate. L’architettura è stata implementata come sistema modulare basato sul modello Llama-3.1-8B-Instruct e testata rispetto ad un sistema puramente LLM in uno scenario di narrazione fantasy interattiva. È stato condotto uno studio utente su piccola scala, comprendente sette test con cinque utenti. Sono state effettuate analisi sia quantitative che qualitative, combinando questionari agli utenti (UEQ, SUS e valutazione personalizzata della storia) con metriche testuali automatiche relative a diversità lessicale, aderenza alla trama, aderenza all’input utente e coerenza semantica. I risultati indicano che l’architettura di scaffolding non degrada significativamente la qualità percepita o ogget tiva delle storie generate, offrendo al contempo notevoli vantaggi in termini di efficienza computazionale. In particolare, l’architettura mantiene sia i tempi di elaborazione che la lunghezza del contesto approssimativa mente costanti al progredire della storia, mentre il sistema di riferimento mostra una crescita lineare in entrambe le dimensioni. Inoltre, vi sono evidenze che il sistema puramente LLM possa iniziare a degradarsi dopo circa 20 scene generate. Questi risultati supportano la conclusione che l’architettura proposta rappresenta una soluzione praticabile per la narrazione interattiva con piccoli LLM in contesti con risorse limitate, offrendo un bilancia mento favorevole tra qualità della storia e costo computazionale.
A scaffolding architecture for interactive and immersive storytelling with Small Language Models
GIALLONGO, NICOLÒ
2025/2026
Abstract
This thesis presents the design, implementation, and evaluation of a scaffolding architecture for interactive and immersive storytelling using small Large Language Models. The proposed architecture supports the generation process by providing modular components for information extraction, retrieval-augmented generation, and context management, aiming to reduce the computational burden and improve long-term coherence in resource-constrained environments. The architecture was implemented as a modular system built around the Llama-3.1-8B-Instruct model, and tested against a purely LLM-based baseline in an interactive fantasy storytelling scenario. A small-scale user study was conducted, involving seven tests with five users. Quantitative and qualitative analyses were performed, combining user questionnaires (UEQ, SUS, and custom story evaluation) with automated textual metrics covering lexical diversity, adherence to story outline, adherence to user input, and semantic coherence. Results indicate that the scaffolding architecture does not significantly degrade the perceived or objective quality of the generated stories, while offering substantial advantages in terms of computational efficiency. Specifically, the architecture maintains both processing time and context token length roughly constant as the story progresses, whereas the baseline system exhibits linear growth in both dimensions. Moreover, evidence suggests that the purely LLM-based approach may begin to degrade after approximately 20 generated scenes. These findings support the conclusion that the proposed architecture is a viable solution for interactive storytelling with small LLMs in low-resource settings, offering a favorable trade-off between story quality and computational cost.| File | Dimensione | Formato | |
|---|---|---|---|
|
Nicolò_Giallongo_s_Thesis.pdf
accessibile in internet per tutti
Descrizione: Thesis full text
Dimensione
4.84 MB
Formato
Adobe PDF
|
4.84 MB | Adobe PDF | Visualizza/Apri |
|
Executive_Summary_Thesis.pdf
accessibile in internet per tutti
Descrizione: The Executive Summary of the Thesis
Dimensione
457.92 kB
Formato
Adobe PDF
|
457.92 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/261640