Digital twin

Stack

The twin is opinionated about how it thinks, not just what it says.

Every response passes through memory, style, and stance layers before it goes out.

Core reasoning

Gemini 3 Pro

Handles response generation, driven by a persona prompt that carries writing style, opinions, and relationship context.

Persona layer

System prompt built from real stats — message length, zh/EN ratio, emoticon cadence — plus 15 representative real messages as few-shot examples.

Memory and retrieval

Deep journal archive

5,400+ daily entries from 2003 onward, indexed with Postgres FTS and gemini-embedding-001 (3072-dim) vector search.

Message-level memory

400K+ Facebook and Gmail messages, embedded and searchable alongside the journals.

Understanding context

Relationship graph

Detects person names in the conversation and injects history — message count, last interaction, recent exchanges.

Opinion extraction

LLM-mined stances from his actual messages, stored in a queryable table and surfaced when the topic matches.

Temporal awareness

Time references like 'in college' or 'last summer' resolve to date ranges and pull the right slice of history.

Everything runs in service of one thing: responses that actually sound like him, with the memory to back them up.