Replies: 1 comment
-
|
System message placement treats memories as persistent context the model should always consider - good for user preferences, personality traits, and long-term facts. User message placement treats memories as relevant-to-this-query context - better for task-specific recall. In practice, system message placement tends to have stronger influence on model behavior (models weight system instructions more heavily), but it also consumes your system prompt budget. User message placement is easier to manage dynamically and keeps your system prompt clean. For most use cases: put stable, identity-level memories (user preferences, profile info) in the system message, and put query-relevant memories (recent interactions, task context) in the user message alongside the actual query. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In the example on the mem0 project homepage, retrieved memory is concatenated into the system prompt.
However, some articles suggest concatenating problem-related memory into the user message instead, such as Best Practice Guide by MemU.
What differences do these two approaches introduce? Which is generally preferable?
Beta Was this translation helpful? Give feedback.
All reactions