360 Secure SkillHub
360 安全技能中心

User Model Update

核心功能遵循「记忆即预测」原则,运用演绎、归纳、溯因推理,从用户陈述、行为等观测生成行为预测,更新user-model.md。典型触发场景含用户明确修正、观测与现有预测矛盾、行为模式浮现、会话结束。输出为结构化模型条目及推理日志,帮助Agent精准适配用户行为,规避静态存储等反模式。

h-mascot
h-mascot
热度 24.93
最近更新 2026-06-04 00:18:06
分类:知识依赖:读写文件应用场景:数据处理 / 工作流 / 模板

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add ec-user-model-update
Metadata
name
user-model-update
description
Update user-model.md using Memory-as-Reasoning principles. Triggered on corrections, contradictions, or session wrap-up. Uses logical reasoning (deductive, inductive, abductive) to derive predictions from observations.

User Model Update Skill

Based on Plastic Labs "Memory as Reasoning"

Core Principle

Memory is not static storage. Memory is prediction.

Don't store facts. Make predictions about behavior and update them when surprised.


When to Trigger

Trigger Signal Priority
Correction User explicitly corrects a behavior/assumption HIGH - immediate
Contradiction New observation conflicts with existing prediction HIGH - immediate
Pattern emergence 3+ similar observations form a pattern MEDIUM - batch
Session wrap-up End of substantial session LOW - review

The Reasoning Protocol

Step 1: Classify the Observation

What type of input is this?

  • Explicit statement - User directly stated a preference/fact
  • Behavioral signal - Action that implies preference
  • Correction - User corrected agent behavior
  • Contradiction - Conflicts with existing model

Step 2: Apply Logical Reasoning

Use all three types:

Deductive (certain, from explicit premises):

Premise: Henry said "never use em dashes"
Premise: Em dashes are a punctuation choice
Conclusion: Henry has explicit punctuation preferences
Certainty: HIGH (directly stated)

Inductive (patterns from observations):

Observation: 50+ sessions, Henry always leads with task
Observation: No small talk in any session
Observation: Responds faster to direct messages
Conclusion: Henry prefers task-first communication
Certainty: HIGH (consistent pattern)

Abductive (best explanation for behavior):

Observation: Henry works at 3am regularly
Observation: Never mentions being tired
Observation: Rejects suggestions to rest
Best explanation: Work is energizing, not draining for him
Prediction: Comments about late hours will annoy him
Certainty: MEDIUM (inferred, not stated)

Step 3: Derive Implications

For each conclusion, ask:

  1. What should the agent DO differently?
  2. What should the agent AVOID?
  3. What predictions can we make about future behavior?

Format:

Derived Implications:
- DO: [specific action]
- AVOID: [specific anti-pattern]
- PREDICT: [expected future behavior]

Step 4: Check for Contradictions

Compare new conclusion against existing user-model.md:

  • Does it conflict with any existing prediction?
  • If yes: Which has stronger evidence?
  • Resolution: Update the weaker, log the change

Handle contradictions without "neural inertia":

  • Don't resist updates just because old belief existed longer
  • Evidence strength > belief age
  • Log the reasoning for the change

Step 5: Update user-model.md

Add/modify the relevant section:

### [Category] (Certainty: HIGH/MEDIUM/LOW)
**Observation:** [What was observed]
**Evidence:** [Supporting data points]
**Reasoning:** [Deductive/Inductive/Abductive logic applied]
**Derived Implications:**
- DO: [action]
- AVOID: [anti-pattern]
- PREDICT: [future behavior]

Step 6: Log to Reasoning Trace

Append to the "Reasoning Trace Log" section:

### [DATE] - [Category] Update
- **Trigger:** [correction/contradiction/pattern/session]
- **Previous:** [old prediction if any]
- **New evidence:** [what was observed]
- **Reasoning:** [brief logic chain]
- **Updated:** [what changed]
- **Certainty change:** [if applicable]

Certainty Levels

Level Criteria Update Threshold
HIGH Explicit statement OR 10+ consistent observations Only contradicted by explicit statement
MEDIUM 3-9 observations OR strong abductive inference New pattern (5+ obs) or explicit statement
LOW 1-2 observations OR weak inference Any contradicting evidence

Surprisal = Signal

When predictions are WRONG, that's valuable:

  1. Log the failed prediction
  2. Analyze why it failed
  3. Update the model
  4. Add to "Predictions to Validate" if uncertain

Errors improve the model. Don't hide them.


Example Update Flow

Trigger: Henry corrects: "don't send markdown tables to Telegram"

Step 1 - Classify: Explicit correction (HIGH priority)

Step 2 - Reason:

  • Deductive: Henry said don't do X → X is wrong
  • Abductive: Why? Tables render poorly in Telegram → visual clarity matters

Step 3 - Derive:

  • DO: Use PNG (tablesnap) for tables
  • AVOID: Markdown tables in Telegram
  • PREDICT: Will prefer visual formats for complex data

Step 4 - Check Contradictions: No existing table preference → new entry

Step 5 - Update user-model.md: Add to Communication Patterns

Step 6 - Log:

### 2026-01-31 - Visual Data Update
- **Trigger:** Explicit correction
- **New evidence:** "don't send markdown tables to Telegram"
- **Reasoning:** Tables render poorly → visual clarity preference
- **Updated:** Added "Visual Over Text" prediction (HIGH)

Integration Points

SOUL.md Rule

Add to Core Truths or Things You DON'T Do:

When corrected by Henry → Immediately run user-model-update skill

Session Wrap-up

Add to wrap-up checklist:

- [ ] Any new user-model learnings this session?
- [ ] Any predictions that failed?

Weekly Cron (Optional)

Schedule review of recent sessions to extract patterns missed in real-time.


Anti-Patterns

❌ Static storage: "Henry likes X" (no reasoning, no implications) ❌ Arbitrary certainty: "Confidence: 0.73" (meaningless numbers) ❌ Belief resistance: Keeping old predictions despite new evidence ❌ Hidden errors: Not logging failed predictions ❌ Orphan facts: Conclusions with no derived implications


Files

  • user-model.md - The reasoning-based model (predictions + evidence)
  • USER.md - Static biographical facts (name, timezone, accounts)

USER.md = who Henry IS (facts) user-model.md = how Henry BEHAVES (predictions)


"The question isn't how best to store your data, but how best to reason over it." — Plastic Labs