Dialogue Generation Framework
LLM to NPC framework using psychological modelling

Anaren sample

Languages, Tools & Keywords


LLM to NPC Framework for Immersive Dialogue Generation

I developed a framework that leverages various psychological theories to simulate the internal states of NPCs in video games, ultimately enhancing the immersive quality of generated dialogue. By integrating this framework into a language model, NPC responses are informed by contextual information—such as age, name, current activity, and most importantly, psychological status—thereby fostering authentic roleplay interactions.

For instance, I use Maslow’s Hierarchy of Needs to determine an NPC’s primary desires. This ensures that basic needs, such as hunger or thirst, take precedence over higher-order social requirements, aligning dialogue generation with the character’s immediate priorities. Additionally, the Five Factor Theory of Personality is employed to characterize traits like extraversion, influencing whether an NPC is inclined toward engaging in small talk or more substantive conversation. By filtering language model prompts through these psychological frameworks, the system produces dialogue that remains true to each character’s unique persona and current state.