Literary AI: Character-Centric Dialogue Systems with Contextual Data
Introducing a framework that facilitates character-centric conversations and interactions with stories. The proposed scheme integrates the LLaMA 3 8B instruction-tuned LLM with parameter-efficient LoRA adaptation, hybrid dense and sparse retrieval, contextual prompt integration, and conversation memory. The system generates character-consistent responses that are also grounded in the relevant context of what has been previously talked about. Five literary characters were used to evaluate the framework, namely Harry Potter, Hermione Granger, Sherlock Holmes, Katniss Everdeen, and Percy Jackson. The evaluation was performed using a set of 500 manually designed prompts based on factual recall, inferential reasoning, and character perspective questions. Human evaluators were expert literature teachers who assessed the systems using BLEU, ROUGE-L, etc, and CGA. The system obtained average scores of 42.6 BLEU, 51.4 ROUGE-L, 92.1% CGA, and 4.6/5 in human evaluation. The findings demonstrate that the suggested framework can produce (a) contextually grounded and (b) character-consistent dialogue across different character or persona types. As demonstrated by our findings, the technical feasibility of the integration of retrieval augmentation, parameter-efficient adaptation and conversational memory in literary dialogue systems is established. Future studies will involve direct evaluation with the learner to assess the potential of these systems for literacy-related learning.