Prompt Optimization for Enhancing AI-Generated Creative Writing with Large Language Models
Dátum
Authors
Folyóirat címe
Folyóirat ISSN
Kötet címe (évfolyam száma)
Kiadó
DOI
Absztrakt
This thesis examines how prompt engineering strategies influence the quality of AI-generated creative writing across multiple large language models. Eight prompt variants were tested on four model families using PromptLab, a purpose-built browser-based research platform. Evaluation followed a dual pipeline combining an LLM-as-judge with deterministic mathematical metrics covering lexical diversity, style match, and coherence. Results show that structured and persona-based prompts outperform zero-shot baselines by up to 36.5%, with Gemini 2.0 Flash leading qualitative scores and Llama-3.2-3B leading lexical diversity metrics. The study confirms that prompt structure has a significant, measurable effect on creative writing quality and that cross-model comparisons are essential, as different model families respond differently to the same strategies.