Core Problem
Most current memory systems work like this:
memory.save(embed("Apply for vacation through HR portal"))
What gets lost:
- Who it was said to
- When it was said
- Under what premise
- What exceptions exist
Embeddings only preserve internal sentence structure (word relationships), while external context is completely lost.
Key Insight: Store Functions, Not Values
Traditional Approach
store: answer = "Deployment is next Tuesday"
Proposed Approach
store: answer(who, when) = {
base_date = nearest_release_after(when)
visibility = permission_level(who)
return format(base_date, visibility)
}
We store functions, not values.
Decomposing Utterances: Deductive Reasoning
Instead of simply storing answers, decompose the premises hidden behind the answer.
Example
Observation:
- Q: "Do I need a health checkup? I did one at my previous company."
- A: "If you didn't receive an email, you're fine."
Wrong storage:
"Had checkup at previous company → Don't need one" ← Wrong generalization
Correct decomposition:
Fact 1: "It's currently health checkup season" (temporal)
Fact 2: "Emails are sent to checkup targets" (policy)
Fact 3: "No email means not a target" (rule)
Fact 4: "Non-targets don't need checkups" (rule)
Knowledge Layers
Layer 1: Rule (immutable policies)
"Emails are sent to health checkup targets"
"No email means not a target"
Layer 2: State (current status)
"It's currently checkup season" (temporal, changes)
Layer 3: Event (occurred events)
"Health checkup email was sent on 2024-01-05" (trigger)
Answer Method Comparison
| Method | Example | Problem |
|---|---|---|
| State-based direct answer | "You don't need one" | No reasoning, not reusable |
| Rule-based answer | "If no email was sent, you're not a target" | Questioner can reason themselves, reusable |
Memory Architecture
┌──────────────────────────────────────────────────────────┐
│ Memory Layer │
├──────────────────────────────────────────────────────────┤
│ SOT (Static Knowledge) │ Events (Time-based) │
│ ├─ Facts │ ├─ Timestamp │
│ ├─ Policies │ ├─ Valid period │
│ └─ Procedures │ ├─ Related SOT links │
│ │ └─ Related Q&A │
├──────────────────────────────────────────────────────────┤
│ Event Adapters │
│ ├─ [Primary] Induction from conversations │
│ ├─ [Secondary] Slack announcement collection │
│ └─ [Optional] Email, Flex, etc. │
└──────────────────────────────────────────────────────────┘
Related Concepts
- Situation Calculus — Expressing knowledge as functions of situations
- Modal Logic — Knowledge as functions of possible worlds
- Dynamic Semantics — Meaning = context → context function
- Event Sourcing — Storing events instead of state
Next Steps
- Specify CPS Memory schema
- Prototype Event tagging UI
- Parse and structure SOT documents
- Design search/ranking algorithm