<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Haijun Wen</title>
    <description>The latest articles on DEV Community by Haijun Wen (@wenhaijun91cyber).</description>
    <link>https://dev.to/wenhaijun91cyber</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3971780%2F1e20cf53-afb9-469f-b4ec-519c9f808376.JPG</url>
      <title>DEV Community: Haijun Wen</title>
      <link>https://dev.to/wenhaijun91cyber</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wenhaijun91cyber"/>
    <language>en</language>
    <item>
      <title>Persona drift is an architecture problem, not a prompt problem</title>
      <dc:creator>Haijun Wen</dc:creator>
      <pubDate>Mon, 08 Jun 2026 18:33:30 +0000</pubDate>
      <link>https://dev.to/wenhaijun91cyber/persona-drift-is-an-architecture-problem-not-a-prompt-problem-kch</link>
      <guid>https://dev.to/wenhaijun91cyber/persona-drift-is-an-architecture-problem-not-a-prompt-problem-kch</guid>
      <description>&lt;p&gt;Most production conversational AI degrades the same way: after enough turns, the persona drifts. The voice you carefully prompted for averages out into something blander. People notice by about week six.&lt;/p&gt;

&lt;p&gt;I spent the last year building a compound-AI engine called ArcOS around a single bet: language belongs to the model, but staying in character, following rules, and remembering belong in hard-coded logic — not in a system prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  The default that fails
&lt;/h2&gt;

&lt;p&gt;One LLM call per turn: prompt + history → answer. As history grows, the model averages over inconsistent past turns. Persona drifts toward the mean. You can fight it with longer prompts, but you're patching a structural problem with text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five stages instead of one
&lt;/h2&gt;

&lt;p&gt;ArcOS splits a turn into five stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Perception — translate the message into a structured signal.&lt;/li&gt;
&lt;li&gt;Strategy — deterministic code decides what should happen.&lt;/li&gt;
&lt;li&gt;Assembly — build the exact context the writer will see.&lt;/li&gt;
&lt;li&gt;Generation — the model writes the reply.&lt;/li&gt;
&lt;li&gt;Memory — extract, store, and recall facts for next time.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Stages 1, 4, and 5 use a language model. Stages 2 and 3 are deterministic code — 75 hard-coded decision blocks, not instructions hidden in a prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why assembly is the lever
&lt;/h2&gt;

&lt;p&gt;The context the writer sees is built from fixed sections, with the persona/instruction block placed structurally last — at the tail. The writer model can't place anything after it, so the persona stays anchored no matter how long the conversation runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory that doesn't smear
&lt;/h2&gt;

&lt;p&gt;Memory is its own stage. It stores interactions and recalls them semantically, with a bi-temporal design that separates when something happened from when it was recorded. You get precise recall instead of a summarized, lossy blur.&lt;/p&gt;

&lt;h2&gt;
  
  
  Model-agnostic by construction
&lt;/h2&gt;

&lt;p&gt;Because persona, control, and routing live in code and config rather than the model, swapping the backbone (Gemma, Llama, Qwen) is a configuration change, not a rewrite. No single-vendor lock-in.&lt;/p&gt;

&lt;p&gt;It runs in production today on web and desktop, on an NVIDIA H200 I own and operate, with a native iOS app in development. I built most of it solo, AI-native.&lt;/p&gt;

&lt;p&gt;I'm Haijun Wen, founder of Light Ark Technologies. I'll be writing more about shipping production compound AI here.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>architecture</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
