Memory audit
Filter changes by library, entity, time, and memory ID, and compare snapshots to trace additions, updates, soft deletions, restorations, and deletions.
When to use memory audit
Use memory audit to determine when a memory changed, whether extraction or a user operation triggered the change, and what changed. It covers change records for factual memories, user profiles, and skill memories, including automatic extraction and manual operations.
To compare an original conversation with its associated extraction or update results, use Memory observation.
Prerequisites
Open the workspace containing the target memory library and have existing memory change records. To filter by entity or memory, obtain the corresponding entity ID or memory ID from the library's 记忆详情 (memory details). See Manage memories.
The steps below use labels from the Chinese-language console.
Query change records
- Open the Bailian console. Under Memory, select 观测与审计 > 记忆审计 (observation and audit > memory audit).
- Select a memory library. The default is 全部记忆库 (all memory libraries). The dropdown lists libraries with existing memories.
- To filter by entity, first select a specific library, then select an entity from 全部记忆实体 (all memory entities).
- Select 最近7天, 最近30天, or 最近90天 (the last 7, 30, or 90 days).
- To trace one memory, enter its ID in 请输入记忆ID (enter memory ID) and press Enter to search.
- Review matching records and the total count. Use pagination when there are more records.
The list displays the following information:
| Field | Description |
|---|---|
| 时间 (time) | When the memory changed |
| 事件 (event) | The change type, such as addition, update, soft deletion, restoration, or deletion |
| 记忆库 (memory library) | The library to which the change belongs |
| 记忆类型 (memory type) | Factual memory, user profile, or skill memory |
| 记忆实体 (memory entity) | The associated entity ID |
| 记忆ID (memory ID) | The identifier used to query multiple changes to the same memory |
| 触发原因 (trigger) | The source, such as memory extraction or a user operation |
| 耗时 (duration) | The processing duration displayed for this change record, in milliseconds |
| 操作 (actions) | Click 快照 (snapshot) to view the data before and after the change |
NoteSelect a specific library before filtering by entity. If no records match, check the memory ID, time range, library, and entity, then adjust the filters and search again.
Interpret change events
| Event | Corresponding action |
|---|---|
| 新增 (addition) | Extraction generates a new memory |
| 更新 (update) | Extraction updates existing content, or a user edits content manually |
| 软删除 (soft deletion) | A user turns off the enabled switch in memory details; the memory displays 未启用 (not enabled) |
| 恢复 (restoration) | A user turns the switch back on; the memory displays 已启用 (enabled) |
| 删除 (deletion) | A user confirms deletion of a memory |
Turning off the enabled switch and deleting a memory are different operations. After soft deletion, use the switch to restore the memory. After clicking 删除 (delete) and confirming, the memory cannot be recovered. See Manage memories for the steps.
For example, if a drink preference is extracted from a conversation, edited manually, disabled, and enabled again, querying its memory ID shows addition, update, soft deletion, and restoration records. 触发原因 (trigger) distinguishes automatic extraction from manual user operations.
View change snapshots
- Click 快照 (snapshot) in the target record's 操作 (actions) column.
- Compare 变更前 (before) and 变更后 (after) to inspect the content or status recorded for that change.
- To locate the record, copy the displayed 变更 ID (change ID). Click 收起 (collapse) when finished.
Snapshots display the data for a particular change. The before value for an addition and the after value for a deletion can display -. A restoration record may show only the restored status. Fields vary by memory type and operation; a snapshot does not necessarily repeat every memory field on both sides.
For example, a user-profile update can show content changing from an old preference to a new one. A manual factual-memory edit can show the content before and after editing. A deletion record lets you inspect the deleted content. Viewing a snapshot does not modify or restore memory.
Open audit from memory details
- In the library's 记忆详情 (memory details) tab, find an entity and click 查看 (view).
- Hover over the history icon on a memory card to display 最近变更历史 (recent change history).
- Click 更多 (more) to open memory audit in a new tab.
This shortcut fills in the library and entity filters. To query only the target memory's changes, also enter its memory ID on the audit page.