Skip to slide
113 / 221

CH 09 · Data Modeling for Agents · 07/12

Read as one page

The snapshot-vs-current reconciliation

A subtle but common issue: a conversation message captures a point-in-time snapshot (e.g. "this edit was pending when the agent proposed it"), but some referenced facts are mutable (the edit was later accepted). You have two options:

  1. Update every historical snapshot when the underlying fact changes: expensive and error-prone.
  2. Reconcile on read: store the snapshot as-is, and when loading the conversation, re-read the current state of referenced mutable records and patch the snapshot before sending it to the client.

Option 2 is usually better: it keeps writes cheap and localised, and accepts a small read-time join to present current truth. Design your read path to reconcile snapshots against live records for any field that can change after it's recorded.

Finished this idea?

Your learning progress stays in this browser.