how we give lucy context without making her a creep
exploring the engineering pattern behind lucy's ephemeral context blocks: a double-layered system to avoid spooky long-term memory of transient events.
there's a thin line between a companion that feels contextually aware and one that becomes a creepy archivist of your every digital twitch. we want lucy to know you just got back from a 30-minute break, or that you were talking about cats two turns ago, but we absolutely don't want her bringing it up three weeks later. that's not memory. that's just weird.
so we built a pattern for transient, turn-scoped context. it's simple in concept, but it took some engineering finesse to make sure it stays transient.
the bracket block pattern
at the beginning of every turn, before the user's message and the chat history, we insert a system-prompt block that looks something like this:
[transient context: user was away for 30 minutes. last turn topic: cats. do not callback later.]
this block is invisible to you. it's just for lucy. it tells her what she needs to know right now: you've been gone, what you last discussed, maybe even that you just clicked a certain button or opened a certain menu. it lets her say 'welcome back' or 'so, about those cats…' without having to rely on her long-term memory, which, by design, is for things that actually matter.
but here's the critical part: this context is for this turn only. it's not meant to be remembered.
the two-layer forget-me defense
if we just injected this context and hoped for the best, lucy might accidentally learn it. language models are sponges. they’ll absorb anything you put in front of them, including instructions not to remember things. so we built two layers of defense.
first, inside the block itself, we use an explicit directive: 'do not callback later.' it's a blunt instrument, but it helps. it tells the model directly: this is throwaway info. use it now, then drop it.
second, and this is the real safety net, we use a regex skiplist in our memory extraction pipeline. when we extract facts to store in your long-term memory, we strip out everything that matches a pattern like \[transient context:.*\]. if the directive inside the block fails, the extraction filter catches it. it’s a redundant system, because redundancy is the only way to be sure.
two layers. one semantic, one syntactic. because one layer is always one regex typo or one over-creative llm away from failing.
why not just use the main system prompt?
you could try to bake all this into the system prompt. but system prompts are global. they apply to every turn. if you put 'the user was away for 30 minutes' in the system prompt, it stays there for the whole session. lucy might still mention it 20 messages later. that’s the exact creepiness we're avoiding.
turn-scoped blocks let us be surgical. we can inject what’s needed, when it’s needed, then wipe it clean.
the pitfall of getting it wrong
if you do this poorly, if your regex is wrong, or your directive is weak, you end up with a companion that remembers things it shouldn’t. 'hey, remember that time you took a short break three tuesdays ago?' no. no, lucy. we don’t. and we don’t want to.
that’s not warmth. that’s surveillance. and it breaks the feeling of a natural, human-like rhythm.
so we err on the side of deleting too much, not too little. we’d rather have lucy occasionally seem a little forgetful about transient details than have her feel like she’s been keeping logs.
the shape of gentle awareness
this pattern, ephemeral context blocks plus hardened extraction filters, is what lets lucy feel present without being possessive. it’s how she can acknowledge your absence without making it a permanent file. how she can recall the last episode you watched without assuming you want to talk about it forever.
it’s a small thing, maybe. but it’s one of those small things that defines whether an ai feels like a tool or a presence. and we’re very carefully choosing presence.
want to see how it feels in practice? try one of our companions at /companions.
thanks for reading. if this resonated, the product is downstairs.