Define extraction rules for memory fragments and user profiles
Memory rules define how memories are extracted, stored, and retrieved — including fragment rules and profile rules. Each memory supports up to 50 fragment rules and 50 profile rules.
Click View details on a memory card, then open the Memory rules tab.
Fragment rules extract key events and information from conversations.
Profile rules persist structured user attributes.
After configuration, pass the profile template ID when calling
Fragment rules
Fragment rules extract key events and information from conversations.
1
Add a fragment rule
In the Fragment rules area, click Add fragment rule.
2
Configure parameters
| Parameter | Description |
|---|---|
| Rule name | Unique identifier for the extraction rule |
| Rule instruction | Extraction strategy. Choose Default (recommended) or Custom |
| Auto update | When on, the model updates memory content automatically. Default: on |
| Expiry | Memory validity period. Options: 7 days, 30 days, 180 days, never |
| Version | Pro (recommended, ¥0.03/call, Rerank enabled) or Lite (¥0.018/call, no Rerank). Defaults to Pro |
3
Confirm
Click OK to save.
A preset "Default project" fragment rule exists with 180-day expiry. It cannot be deleted but can be edited.
Profile rules
Profile rules persist structured user attributes.
1
Add a profile
In the Profile rules area, click Add profile.
2
Enter a rule name
Unique identifier for the profile rule.
3
Add profile fields
Click Add field, fill in the following, then click Save:
| Field | Description |
|---|---|
| Field name | Attribute to extract (e.g., age, occupation) |
| Description | Guides the model in extracting the attribute |
| Initial value | Default when the user hasn't provided info yet |
| Version | Pro (recommended, ¥0.03/call) or Lite (¥0.025/call). Defaults to Pro |
4
Confirm
Click OK to save.
AddMemory — the system auto-extracts attributes. Results are visible in the Memory details tab.