C.W.K.
Stream
Lesson 03 of 10 · published

Memory — 모델이 기억할 때와 안 할 때

~16 min · conversation, memory

Level 0수련생
0 XP0/100 lessons0/14 achievements
0/120 XP to next level120 XP to go0% complete

"memory"의 세 의미

  • In-conversation — 한 session 안 message history. compact out 되기 전까지 매 turn 모델이 봐.
  • Cross-conversation — user가 session 사이로 recall하길 원하는 persistent fact. 코드로 implement, database나 vault에 저장.
  • Native memory — provider-managed memory feature (OpenAI memory tool, Anthropic memory beta, ChatGPT-style implicit recall).

기억할 것

  • Persist하는 user preference (timezone, language, formatting choice).
  • user의 project나 domain에 대한 stable fact.
  • 이전 session에서 만든 결정이 후속을 shape.

기억 안 할 것

  • Ephemeral task state (workflow의 현재 step). Scoped session state 써.
  • user가 나중에 recall되길 안 원할 sensitive data (payment, health).
  • conjecture와 일회성 추측.

누가 결정

Default to: user가 explicit하게 opt-in, 또는 너의 system이 explicit하게 fact를 durable로 분류. 모든 거의 implicit memory는 privacy bug야, feature 아니야.

Code

Explicit memory write API·python
@tool
def remember(fact: str, scope: Literal["user", "project"]):
    """Persist a stable fact for future conversations. Only call when the user explicitly asks to be remembered or when the fact is structurally invariant (timezone, role, persistent preference)."""
    memory_store.add(user_id, fact, scope)
    return {"status": "saved", "fact": fact}

External links

Exercise

Conversational system 감사: session 사이로 persist하는 모든 fact 나열. 각각을 user-requested, structurally-invariant, ambient로 분류. ambient class 제거.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.