Engineering
The 4-Layer Model: How Mira Twins Actually Work
The problem with generic AI
Most AI chatbots sound the same. They're helpful, polite, and completely generic. That's fine for a search engine replacement, but it's terrible for representing a real person.
When someone talks to your AI twin, they should feel like they're getting your perspective, not a generic AI response with your name on it.
The four-layer approach
Every Mira twin is built on four distinct layers, each capturing a different dimension of who you are:
Layer 1: Values
Your core beliefs and principles. What do you stand for? What trade-offs do you make? A business coach who believes in radical transparency will give different advice than one who prioritises diplomacy.
Layer 2: Skills
Your knowledge and expertise. This includes both what you know and what you don't — a good twin should acknowledge the boundaries of its creator's expertise rather than making things up.
Layer 3: Role
How you operate in context. Are you a mentor? A consultant? A teacher? Your role shapes how you communicate — a therapist asks questions, a coach gives directives, a tutor explains step by step.
Layer 4: Thinking
Your reasoning style and problem-solving approach. Do you think in frameworks? Do you start with first principles? Do you prefer analogies? This layer captures how you arrive at conclusions, not just what you conclude.
Why four layers?
Separating personality into independent layers lets you:
- Edit one dimension without affecting others — update your skills without changing your values
- Version and rollback — every layer change creates a snapshot you can revert to
- A/B test — try different thinking styles and see which resonates with your audience
- Compose — mix layers from different contexts for different use cases
Compilation
At runtime, the four layers are compiled into a single system prompt that guides the AI's behaviour. This compilation step is where the magic happens — it weaves your values, skills, role, and thinking into a coherent personality that feels authentic.
The compiled prompt is cached for performance but recompiled whenever you update any layer.
What's next
We're experimenting with automatic layer refinement based on calibration feedback — when users rate interactions, we can identify which layer needs adjustment and suggest changes. More on that soon.