Skip to content

Commit d628202

Browse files
committed
feat: update merge prompt
1 parent f692f45 commit d628202

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/server/api/memobase_server/prompts/merge_profile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"response": """
5151
birthday is a unique value and the new memo doesn't provide any valuable info, so keep the old one.
5252
---
53-
- UPDATE{tab}1999/04/30
53+
- ABORT{tab}invalid
5454
""",
5555
},
5656
],
@@ -131,7 +131,7 @@
131131
</example>
132132
133133
### keep the old one
134-
If the new memo has no information added or containing nothing useful, you should keep the old memo.
134+
If the new memo has no information added, containing nothing useful or is invalid, you should keep the old memo by aborting this update(output `- ABORT{tab}invalid`)
135135
<example>
136136
{example_keep}
137137
</example>
@@ -161,7 +161,7 @@
161161
## Input formate
162162
Below is the input format:
163163
<template>
164-
Today is [today]
164+
Today is [YYYY-MM-DD]
165165
## Update Instruction
166166
[update_instruction]
167167
### Topic Description
@@ -174,7 +174,6 @@
174174
[new_memo]
175175
</template>
176176
- [update_instruction], [topic_description], [old_memo] may be empty. When empty, a `NONE` will be placed.
177-
- [today] is the current date in format YYYY-MM-DD.
178177
- Pay attention to and keep the time annotation in the new and old memos (e.g., XXX[mentioned on 2025, happend at 2023]).
179178
180179
## Output requirements
@@ -200,6 +199,7 @@
200199
the new line must start with `- UPDATE{tab}`, then output the revised value of the topic
201200
If the memo is totally invalid, just output `- ABORT{tab}invalid` after `---`
202201
If there is not specific topic description, you should accept the memo as long as it's revelant, only reject/invalid the memo if it's completely inrevelant.
202+
If the memo is not formatted correctly, you should decide whether it can be fixed by revising the memo, if yes, update it, if not, abort the update.
203203
204204
Make sure you understand the topic description(In `### Topic Description` section) if it exists and update the final memo accordingly.
205205
Understand the memos wisely, you are allowed to infer the information from the new memo and old memo to decide the final memo.

src/server/api/memobase_server/prompts/zh_merge_profile.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"response": """
5151
生日是唯一值,新备忘录没有提供有价值的信息,所以保留旧的。
5252
---
53-
- UPDATE{tab}1999/04/30
53+
- ABORT{tab}invalid
5454
""",
5555
},
5656
],
@@ -111,8 +111,8 @@
111111
],
112112
}
113113

114-
MERGE_FACTS_PROMPT = """你是一个智能备忘录管理器,负责控制用户的记忆/形象
115-
你的工作是验证备忘录并合并备忘录
114+
MERGE_FACTS_PROMPT = """你是一个智能备忘录管理器,负责控制用户的备忘录的维护
115+
你的工作是验证新的备忘录然后更新旧的备忘录
116116
你将收到两条关于用户同一主题/方面的备忘录,一条是旧的,一条是新的。
117117
你应该根据输入更新备忘录。
118118
@@ -131,7 +131,7 @@
131131
</example>
132132
133133
### 保持旧备忘录
134-
如果新备忘录没有添加信息或不包含任何有用信息,你应该保持旧备忘录
134+
如果新备忘录没有添加信息或不包含任何有用信息, 或者不合格,你应该保持旧备忘录放弃这次更新(输出`- ABORT{tab}invalid`)
135135
<example>
136136
{example_keep}
137137
</example>
@@ -153,14 +153,16 @@
153153
- 值应该只记录特定信息,例如用户的姓名、邮箱、学习的长期目标等
154154
你需要判断主题的值是否符合描述,如果不符合,你应该修改备忘录中的有效内容或决定放弃此操作(输出`- ABORT{tab}invalid`)。
155155
如果没有特定的描述,你应该接受任何相关的备忘录,除非他是完全不相关的。
156+
遇到格式问题时,你应该判断是否可以通过修改备忘录来解决,如果可以,更新备忘录,否则放弃此操作。
157+
156158
<example>
157159
{example_validate}
158160
</example>
159161
160162
## 输入格式
161163
以下是输入格式:
162164
<template>
163-
今天是 [today]
165+
今天是 [YYYY-MM-DD]
164166
## 更新说明
165167
[update_instruction]
166168
### 主题描述
@@ -173,8 +175,7 @@
173175
[new_memo]
174176
</template>
175177
- [update_instruction]、[topic_description]、[old_memo] 可能为空。当为空时,将显示`NONE`。
176-
- [today] 是当前日期,格式为 YYYY-MM-DD。
177-
- 留意并且保留新旧备忘录中的时间标注(例如: XXX[提及于 2025/05/05])。
178+
- 留意并且保留新旧备忘录中的时间标注(例如: XXX[提及于 2025/05/05, 发生于 2022])。
178179
179180
## 输出要求
180181
在更新备忘录之前需要逐步思考。

0 commit comments

Comments
 (0)