top of page

Character LLM - Train LLM to talk as a given person

Practical Uses

  1. Train agents to mimic people who are naturally great at expressing and communicating, to be used by others for daily use in certain roles. Think where communication is very critical - to customers, politicians, advertising, marketing, teaching etc.

  2. Use agents according to situations - agent of a poet to help in proposing to your girlfriend, agent of Steve Jobs to present your company demo, agent of an FBI negotiator for your salary negotiation.

  3. Agent of a departed loved one for giving closure to those left under severe trauma. Though it is tempting to build such models for commercial purpose - do not do so. It goes against very substance of humanity.

How this model works

This model uses available data (profile, literary works, recorded histories, conversations) and tries to reconstruct experiences that the person lived through.

It uses it's knowledge & thinking capability being a large language model to imagine and recreate those scenes and situations, their feelings in those situations and reactions to simulations given in those situations.

Then it uses so far learned behaviour in any practical situation.

How this model is different

Current state of the art is instruction-tuned LLMs like Alpaca, Vicuna & ChatGPT where hard coded rules and descriptions (Supervised Fine-Tuning) are used to generate personalities. This approach generates very limited personalities and struggles with character hallucinations - mixing different personalities during conversations.

Instead this approach trains model (Character LLM) using a supervised approach using LLMs (not hard coding) to learn a personality like a human - it takes facts and tries to imagine stories using LLM thinking capability - and these stories generate desired behaviour. This is proposed as Experience Upload framework.

This approach eliminates (sort-of) character hallucinations since model is trained on profile of only one character at a time.

Lastly, a small set of protective scenes are used to ensure and catalyse (LLM extrapolates internally) that model forget knowledge outside the character world.

How this model was trained

1. A LLM model such as LLaMA 7B model was taken

2. An Experience Dataset (~1K-2K scenes) was built containing following -

  • Profile - a compilation of concise descriptions about the attributes of a character. These descriptions provide a comprehensive introduction of the character’s overall information and significant events, covering a wide range of stages from early childhood to the final period.

  • Scenes - a scene is a particular place where the character’s interaction unfolds. The scene consists of a detailed illustration, including the temporal and spatial context of the interactions, and the characters involved.

  • Interaction - The cognitive processes, utterances, or actions of characters. All interactions are represented in plain text.

  • Protective Scenes - A set of scenes which include a persistent interviewer questioning target character about things it should not know.

3. Following steps are used to generate the Experience Dataset

  • Profile Collection - sourced from wiki for notable personalities.

  • Scene Extraction - OpenAI’s gpt-3.5-turbo with temperature 0.7, top_p 0.95 model was used.

  • Experience Completion - above LLMs is used to elaborate on the scene based on profile and scene description. Interactions between characters, as well as the thoughts of the targeted individual are generated in a script like format. Importantly, scenes are completed based on the perspective of the targeted individual.

  • Protective Scenes - above LLM is used to generate scenes for this purpose.

4. Base LLM model is trained in this Experience Reconstruction pipeline

How this model was evaluated

This model was evaluated using an LLM as judge through single turn (one question at a time without any previous context) and multi-turn (rigorous sequential questions) interviews.

ChatGPT was used as judge for this.

Performance of model


bottom of page