Persona Replication: Building an AI That Writes Like You
LLMs are overpowered autocomplete tools. Give them a few bullet points and they can turn them into a clean, coherent email, report, or article within seconds. The problem is that “clean and coherent” usually converges towards the same bland, professional voice.
This is more than an aesthetic problem. In four preregistered experiments, Reif, Larrick, and Soll found that people who used AI at work anticipated and received more negative judgements of their competence and motivation. If AI-assisted writing is recognisable because it sounds generic, preserving the author’s authentic voice affects not only the quality of the writing, but also how the person behind it is perceived.
If an AI writes on my behalf, I do not want it to produce something that is merely grammatically correct. I want it to express ideas that I am likely to believe, reason about them in a way that is consistent with how I think, and write the result in a voice that actually sounds like me. Otherwise, it is just replacing my words with corporate prose.
This was the motivation behind my final-year project, Persona Replication Framework for Personalised Agent. I broke the problem into two parts. The first learns how an author writes: their phrasing, rhythm, tone, formatting habits, and discourse structure. The second reconstructs what the author thinks: their beliefs, values, opinions, recurring principles, and personal experiences.
Both are necessary. A model that captures only voice may sound convincing while expressing ideas the author does not hold. A model that retrieves only past knowledge may be accurate while sounding nothing like the author.
Persona Replication Framework for Personalised Agent
B.Comp. Dissertation · 95 pages · 5.1 MB PDF
Why “Write Like Me” Is Not a Sufficient Prompt
It is tempting to solve personalisation by giving an LLM several writing samples and asking it to “write like this person”. This works to a certain extent. The model will pick up visible markers such as lowercase text, ellipses, favourite expressions, or short sentences.
But surface imitation is not the same as understanding a writing style. In my evaluation, few-shot prompting sometimes reproduced obvious formatting quirks while introducing contemporary slang that the author never used. It also tended to smooth away unusual sentence rhythms and longer, rambling structures. The output looked vaguely similar, but it felt like an impression of the author rather than the author.
RAG solves a different problem. It retrieves relevant passages from the author’s previous writing so the generated answer can be grounded in something the author has actually said. This is useful, but conventional RAG treats the corpus as a pile of document chunks. It works when a question matches one post. It struggles when an answer requires connections across many posts, time periods, and areas of the author’s worldview.
This creates two complementary research questions:
- How can a model reproduce an author’s voice without sacrificing the meaning of the source text?
- How can a system reconstruct and retrieve what the author thinks, particularly for broad questions that require synthesis across their writing?
These questions require different representations, training objectives, and evaluation methods. Trying to make one giant prompt solve everything would make the system harder to control and much harder to evaluate. I therefore separated them and combined their outputs only at generation time.
What I Built
The author provides a topic or a set of short notes. The mental model system retrieves relevant beliefs, values, principles, and supporting evidence. A general-purpose LLM uses this context to produce a neutral draft. Finally, the style replication model rewrites that draft in the target author’s voice.
Step 1
Author direction
A topic, question, or short set of notes defines what should be written.
Step 2
Mental model retrieval
The cognitive graph finds relevant ideas, principles, and evidence from past writing.
Step 3
Grounded neutral draft
An LLM develops the argument using the retrieved worldview, without imitating the voice yet.
Step 4
Author-voice rewrite
The Phase 1 model rewrites the draft while preserving its intended meaning.
Separating drafting from rewriting is deliberate. If the style model is also asked to retrieve knowledge and develop the argument, a bad output could be caused by missing context, weak reasoning, semantic drift, or poor style imitation. It would be difficult to tell which component failed. The two-stage generation process gives each component one clear job.
Who This Method Is Actually For
This method is most useful when the target author’s writing is stylistically different from conventional formal, professional, or corporate writing.
If the desired output is a polished business email or a standard report, fine-tuning a dedicated style model is probably overkill. Frontier LLMs have already seen an enormous amount of conventional professional prose. A clear prompt and a few good examples will usually get most of the way there.
The harder and more interesting problem is preserving a voice that the base model has been trained to “correct”. This includes writing with unusual punctuation, strict lowercase, sentence fragments, long clause chains, personal slang, emotional peaks, parenthetical asides, deliberate repetition, or a rhythm that would look wrong in a corporate style guide.
Core idea
Style transfer matters most when the base model wants to "correct" the author.
The further an author's natural voice sits from generic professional prose, the less likely prompting alone is to preserve it. That is where author-specific fine-tuning and preference optimisation become worth the additional complexity.
This distinction matters because a system can appear impressive while solving an easy version of the problem. Reproducing formal prose with another model trained heavily on formal prose is not strong evidence of persona replication. The real test is whether the model can preserve the odd, inconsistent, personal details that make an author’s writing recognisable without destroying the meaning underneath.
What This Could Enable
The immediate application is personal productivity: an assistant that can expand rough notes into emails, reports, or articles for the author to review. It could also draft replies to routine messages using positions the author has expressed before, while escalating anything novel or sensitive for direct input.
The same combination of voice and mental-model grounding supports several broader use cases:
- Knowledge preservation. A retiring engineer, investor, researcher, or founder may leave behind years of reports and decisions. A cognitive graph can make their recurring principles queryable while retaining the evidence and temporal context behind each conclusion.
- Consistent content creation. A founder-led company or creator can produce more public-facing material without flattening a distinctive voice into generic marketing copy. This is particularly relevant when the personality of the writer is part of the brand.
- Cognitive digital twins. A structured model of a person’s beliefs can support scenario analysis by approximating how they may reason about a new situation. The output should be treated as a grounded simulation of past views, not as the person’s present decision.
- Authorship verification. The discriminator trained to distinguish real and generated writing may also provide a starting point for detecting impersonation.
This direction is already appearing in industry. Meta is reportedly developing an AI version of Mark Zuckerberg that is trained on his mannerisms and tone, together with his public statements and thoughts on company strategy. That is almost exactly the two-part problem described here: reproduce how a person communicates, then ground the response in what they have previously said and believed. It does not validate my implementation, but it does validate the product need.
These applications come with different risk levels. Drafting for the author’s own review is very different from autonomously publishing on their behalf. The more agency the system receives, the more important consent, access control, provenance, and human review become.
Phase 1: Learning How the Author Writes
The first phase is meant for precisely these non-standard voices. It treats authorship style transfer as a model-training problem rather than solely a prompting problem. The input is a neutral passage. The expected output expresses the same meaning in the target author’s style.
Constructing Training Data
Public preference datasets for a specific author are scarce. The training data must therefore be constructed from the author’s own writing. Each original blog post is cleaned, segmented, and transformed into a neutral version using an LLM. The original author text becomes the stylistic target, while the neutralised version becomes the input.
This creates pseudo-parallel pairs with approximately the same semantic content but different stylistic characteristics. The approach is imperfect: neutralisation may remove content as well as style, and long passages may be rewritten more aggressively than intended. Semantic-similarity filtering and manual inspection are therefore necessary before training.
Why I Moved from SFT to Iterative DPO
The obvious starting point was Supervised Fine-Tuning (SFT). It teaches the basic neutral-to-author mapping, but maximum-likelihood training only rewards the model for predicting the target tokens. It does not explicitly teach why one valid rewrite sounds more like the author than another.
Direct Preference Optimisation (DPO) provides this missing comparison. Instead of learning from a single target, the model learns to prefer a chosen rewrite over a rejected rewrite. The complete training process contains four steps:
- SFT foundation. Train a base rewriter on neutral-to-author text pairs.
- Bootstrap DPO. Use the real author passage as the preferred response and the SFT rewrite as the rejected response.
- Candidate generation. Ask the current DPO model to produce multiple rewrites for each neutral input.
- Iterative preference learning. Score the candidates, form new preference pairs, retrain the rewriter, and then retrain the discriminator against the improved outputs.
Candidate selection uses a product of three signals:
- Relative fluency preservation: whether the rewrite remains close to the author’s own level of grammaticality rather than moving towards an abstract ideal of perfect grammar.
- Meaning preservation: whether it retains the semantic content of the neutral input.
- Discriminator confidence: whether a classifier identifies the rewrite as real author text rather than generated text.
Multiplication is used instead of averaging so that a severe failure in any one dimension suppresses the entire score. A fluent and author-like rewrite should not be preferred if it changes the meaning, just as a semantically accurate rewrite should not be preferred if it is incoherent.
The word relative is important. Informal blog writing may be fragmented, repetitive, or intentionally ungrammatical. Maximising conventional fluency would reward the model for removing exactly the quirks it is supposed to preserve. The metric instead penalises movement away from the author’s characteristic register, whether that movement makes the text less grammatical or suspiciously more polished.
The rejected candidate is also selected carefully. Whenever possible, it must pass minimum fluency and meaning thresholds but receive a low style score. This gives the model a hard negative that fails specifically on style. Otherwise, DPO may learn the trivial lesson that broken or inaccurate writing is undesirable without learning the author’s voice.
What the Training Stages Actually Changed
The following example from the report shows the same idea passing through the training pipeline for one author:
| Stage | Output |
|---|---|
| Neutral input | “A person who demonstrates patience and attention when I am in this state suggests a deep level of care or affection. This recognition is a source of considerable positive sentiment for me.” |
| SFT | “the fact that the one i love can give me patience and attention when i am like this, and not run as far away as possible, makes my heart melt every single time. so fucking much.” |
| Iterative DPO (v4) | “I think someone who has this much patience and attention when I am like this, must really, really care about me. That makes me go all warm and fuzzy.” |
| Real author | “Someone who bears with me and listens to me when I am like this, truly must love me. Now that sure is something that lights up my day.” |
SFT immediately introduces informal language and emotional intensity, but it overshoots. The final iterative model is more controlled and moves closer to the real author’s repetition, rhythm, and sentiment without copying the original passage. This progression is useful qualitative evidence, but it is still only one example. The blinded study was needed to determine whether the same improvement held across prompts and authors.
Two Different Style-Content Trade-offs
I evaluated two iterative variants. The standard variant prefers the highest-scoring generated rewrite, with occasional real-author anchors. It is more willing to depart from the neutral source in order to reconstruct an author-like voice. The source-preference variant always uses real author text as the preferred output. It remains closer to the original discourse structure but can become conservative or overly literal.
Neither variant is universally stronger. The standard iterative model performed better on short, voice-dominant prompts, while the source-preference model performed better on longer, content-dense prompts. The result exposes an important trade-off: stronger stylistic transformation creates more room for semantic drift, while stronger source anchoring protects content at the cost of expressive freedom.
A manual audit of the full 494-row held-out split made this trade-off more concrete. I flagged 137 iterative-DPO outputs for semantic drift or stylistic overproduction, compared with 36 source-preference outputs - a 73% reduction. This audit was not part of the blinded survey, but it suggests a practical routing rule: use the style-forward model when voice is the main objective, and the source-anchored model when content fidelity matters more.
Evaluating Author-Likeness
The automated score is suitable for selecting candidates inside one training loop, but not for comparing final systems. Each model variant has its own discriminator, and each discriminator is retrained on increasingly difficult negatives. A score of 0.7 at one round does not represent the same standard as 0.7 at another.
I therefore ran a blinded human ranking study with 10 respondents. Each respondent completed nine tasks spanning three authors and ranked five anonymised candidates from most to least likely to have been written by the target author.
| System | Mean rank | Top-3 rate |
|---|---|---|
| Real author | 2.700 | 70.0% |
| Iterative DPO (v4) | 2.989 | 64.4% |
| Iterative DPO, source preference (v4) | 3.000 | 56.7% |
| Bootstrap DPO (v1) | 3.111 | 56.7% |
| GPT-5.1 few-shot prompt | 3.200 | 52.2% |
The iterative DPO model was the strongest generated system overall and ranked above the GPT-5.1 few-shot baseline. However, the differences amongst generated systems were modest, and average inter-rater agreement was low. The generated rewrites were competitive with authentic excerpts, but remained distinguishable overall. The evidence supports iterative preference optimisation as a useful direction; it does not support the stronger claim that the model has perfectly replicated an author’s style.
Phase 2: Learning What the Author Thinks
The style model can answer how should this be written? It cannot answer what would this author actually say? A convincing voice without the author’s actual beliefs is simply a better impersonation. This is why the project needed a second phase.
Why Not Just Put Every Blog Post into RAG?
The straightforward solution is to put every blog post into a vector database and retrieve the chunks most similar to the query. This works well for narrow questions whose answers appear in one passage. It is less useful for broad questions such as: What does this author believe makes a meaningful life? Relevant evidence may be spread across posts about career, friendship, failure, identity, and personal growth. No single chunk necessarily states the complete answer.
The second phase therefore represents the author’s writing as a cognitive graph. Instead of storing only passages, it extracts six kinds of cognitive node:
- Identity: claims about who the author is.
- Value: what the author considers important.
- Principle: general rules or beliefs about how the world works.
- Heuristic: practical decision rules used in recurring situations.
- Opinion: the author’s stance on a subject.
- Definition: the meaning the author assigns to an idea or term.
Every node retains direct evidence from the source post. When an idea changes over time, temporal versions preserve the earlier and later expressions rather than silently overwriting them.
Building the Cognitive Graph
The graph is built incrementally through four stages inspired by memory consolidation:
- WAKE - extraction and verification. An LLM extracts candidate nodes from each post. A second call verifies every candidate against a direct quote, rejecting unsupported interpretations before they enter the graph.
- MERGE - integration. Each verified node is embedded and compared with nearby graph nodes using approximate nearest-neighbour search. A routing model decides whether to create a new node, append a temporal version to an existing node, or connect two related nodes with a typed edge.
- NREM - topic organisation. UMAP reduces the embedding space and HDBSCAN discovers leaf topics. Related topics are organised into a soft hierarchy using maximal cliques, allowing a topic to belong to multiple parent groups when the author’s ideas overlap.
- REM - principle synthesis. The system derives topic-local principles from individual clusters, followed by cross-topic meta-principles from groups of related topics. These abstractions provide a higher level of retrieval than raw nodes alone.
The sleep terminology is functional rather than decorative. WAKE and MERGE process new information continuously. NREM and REM run when enough new material has accumulated, reorganising local observations into more stable topics and general principles. This avoids rebuilding the entire graph after every post while still allowing its structure to evolve.
After processing 1,273 blog posts from one author, the system produced:
| Graph component | Count |
|---|---|
| Cognitive nodes | 6,554 |
| Leaf topics | 127 |
| Parent groups | 39 |
| Topic-local principles | 777 |
| Cross-topic meta-principles | 116 |
Opinion nodes accounted for most of the graph because the source corpus was personal and diary-like. Values and principles were less frequent, but carried greater weight during generation because they represent more stable aspects of the author’s worldview.
Retrieving a Worldview, Not Just a Passage
At generation time, retrieval constructs five complementary context buckets:
- Core context: identity and value nodes that should remain available across topics.
- Relevant context: principles and heuristics closely related to the query.
- Contextual evidence: opinions and definitions retrieved from both topic-scoped and global searches.
- Derived principles: higher-order REM principles ranked independently against the query.
- Connected evidence: graph nodes that support the retrieved derived principles.
The result is not simply a list of similar text fragments. It is a structured view of the author’s identity, relevant stance, higher-order reasoning, and supporting evidence. This context is used to create the neutral draft before the style model is applied.
Narrow and Broad Retrieval Behave Differently
I compared the cognitive graph against Google RAG on 100 constructed queries: 70 narrow questions derived from individual posts and 30 broad questions derived from cross-topic meta-principles.
| Query type | System | Precision@5 | Recall@5 | MRR |
|---|---|---|---|---|
| Narrow | Google RAG | 0.186 | 0.929 | 0.701 |
| Narrow | Mental model | 0.151 | 0.757 | 0.635 |
| Broad | Google RAG | 0.053 | 0.044 | 0.161 |
| Broad | Mental model | 0.127 | 0.106 | 0.296 |
Google RAG had a structural advantage on narrow queries because the query was a paraphrase of one post and the original text was available for direct chunk matching. The cognitive graph performed substantially better on broad queries, improving Precision@5 by 139% and Mean Reciprocal Rank by 84%. Its topic hierarchy and derived principles explicitly encode relationships that are invisible to flat similarity search.
The aggregate results were almost equal because narrow queries formed 70% of the benchmark. The correct conclusion is therefore not that graph retrieval replaces conventional RAG. Flat retrieval remains the stronger tool for direct passage recall, while the cognitive graph adds value when the query requires synthesis across an author’s wider body of knowledge. A hybrid system should use both.
Putting the Two Phases Together
The integrated system can begin with a short direction such as: We should be true to ourselves instead of worrying about fitting in.
For the worked example in the report, retrieval identified five active topics, three derived meta-principles, three relevant principle nodes, and four connected support nodes. These included ideas about authenticity, self-acceptance, social conformity, honest self-expression, and the consequences of repression.
The generation model first converted this context into a neutral, structured argument. Only after the content had been grounded did the Phase 1 rewriter transform it into the target author’s personal register. The final text reflected both dimensions of the persona: the style model supplied characteristic phrasing and rhythm, while the cognitive graph supplied the position being expressed.
This separation also makes the system easier to control. The retrieved evidence can be inspected before generation, the neutral draft can be reviewed for factual and semantic accuracy, and the final rewrite can be compared against it for meaning preservation. Persona replication becomes a traceable pipeline rather than a single opaque request to “write like this person.”
What the Results Establish - and What They Do Not
The project provides evidence for three narrower conclusions:
- Iterative DPO can improve perceived author-likeness over a strong few-shot prompting baseline.
- Style-forward and source-anchored preference strategies occupy different points on a style-content trade-off.
- A structured cognitive graph can improve retrieval for broad, synthesis-requiring questions that flat chunk retrieval struggles to answer.
Several limitations prevent stronger claims. The style study used only 10 respondents, and low inter-rater agreement limits the precision of close comparisons. Phase 2 was evaluated on a single author’s corpus. Its broad-query labels were derived from meta-principles produced by the same pipeline, although the labels were fixed before the retrieval comparison. Independent human relevance annotations remain necessary.
The implementation was also constrained by my personal API budget. Phase 1 used a smaller base model, stopped after four DPO versions while the discriminator signal was still informative, and did not receive a comprehensive hyperparameter sweep. Phase 2 also relied on a cost-conscious extraction model. The results demonstrate what the framework can do under a limited budget, not its performance ceiling.
The two phases were also evaluated mostly independently. The report demonstrates that they can operate together, but does not yet provide a joint human evaluation in which respondents assess factual grounding and stylistic authenticity at the same time. The current system is therefore a validated combination of promising components, not a completed empirical demonstration of a full cognitive digital twin.
There are also broader ethical and security concerns. A system capable of reproducing an individual’s voice can support accessibility, knowledge preservation, and personal productivity, but it can also facilitate impersonation. Practical deployment would require explicit consent, strong access control, provenance, audit logs, and clear disclosure when text is generated on another person’s behalf.
Further Work
The most direct next step is a larger, joint end-to-end human study with at least 30 respondents across different reading backgrounds and levels of LLM usage. Respondents should evaluate whether generated text is simultaneously grounded in the author’s real beliefs, faithful to the requested topic, and stylistically authentic. This would test the complete system rather than treating its components separately.
The style model should be trained for additional DPO rounds with careful monitoring for reward hacking, discriminator degradation, memorisation, and loss of output diversity. A wider hyperparameter search could also clarify whether the observed results reflect the method’s capability or merely one configuration.
The mental model system should be evaluated across at least three authors with different corpus sizes and writing genres. Retrieval can be improved through a hybrid design that combines direct raw-text recall with graph traversal, using each method for the query type it handles best. Independent relevance judgements would provide a stronger benchmark for broad-query evaluation.
Conclusion
What does it actually mean for an AI to write on someone’s behalf?
It cannot merely imitate their punctuation. An agent that sounds like an author but does not reflect their beliefs is a mimic. It also cannot merely retrieve old passages. An agent that knows what the author believes but expresses everything in generic language is a search interface. A personalised writing agent requires both.
This project separates those responsibilities and reconnects them through a transparent generation pipeline. The cognitive graph determines what relevant knowledge and principles should inform the response. The neutral drafting stage turns that context into a coherent argument. The style rewriter then determines how the argument should be expressed.
The framework does not perfectly reproduce a person, nor should the evaluation be interpreted as showing that it does. What it provides is a practical direction for building personalised agents that preserve more of an individual’s intellectual identity than prompt imitation or flat document retrieval can achieve alone.
In practical terms, this could become a personal assistant that drafts and replies to emails in your voice, grounded in positions you have previously taken. It could become an internal interface to a retiring expert’s accumulated judgement, allowing a new employee to ask not only what did they decide? but what principles repeatedly led them there? It could help a founder or creator scale their communication without outsourcing their personality to corporate copy. The reported Zuckerberg agent shows that organisations are already pursuing this direction for leadership access at scale.
The useful product is not an autonomous impersonator. It is an assistant that prepares a response the person is likely to endorse, shows the evidence used to construct it, and leaves final authority with the person. For knowledge preservation, it is not a resurrection of an expert. It is a queryable record of how that expert reasoned, with enough provenance to distinguish their actual views from the model’s extrapolation.
Perhaps most importantly, the goal is not to make every piece of writing sound more polished. LLMs already do that rather well. The goal is to prevent AI from flattening every person into the same polished voice.