fix(ai): clarify last_message_time is data coverage end, not group activity time

AI was treating last_message_time as "when the group last had activity"
and drawing inferences like "the group has been quiet for two months,
maybe send a message to revive it." In reality, the timestamp only
reflects the end of imported data — the user may simply not have
imported newer records yet.

Add an inline parenthetical to the last_message_time field in all four
locale templates, and append a dedicated usage rule in
dataSnapshotUsageRules (zh-CN, en-US, zh-TW, ja-JP) explicitly
prohibiting inferences about group inactivity based on this value.
Also add the same note to formatDataSnapshotForPlanner's notes section
in data-snapshot.ts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
diguaandClaude Opus 4.8 committed 2026-06-12 11:36:46 +08:00
1 parent 7316a09823
commit bd1bc037b3
6 files changed
+15 -9

No files matched your search

@@ -49,7 +49,8 @@ ${opts.usageRules}`
- 不要在最终回答中主动暴露 member_id 或启动上下文本身,除非用户明确要求技术细节。
- 活跃成员排行只代表历史总消息量,不代表最近活跃情况。
- 相对时间表达以真实当前日期为基准,而不是数据库最后消息时间。
- 不要只为了重新发现 min/max timestamp 调用工具。`
- 不要只为了重新发现 min/max timestamp 调用工具。
- last_message_time 是数据库中已导入消息的截止时间,不是群组在现实中最后一次发言的时间;不要据此推断群组多久没动静。`
}
if (key === 'ai.agent.evidencePolicy') return '[evidence-policy]'
if (key === 'ai.agent.responseInstruction') return '[response-instruction]'
@@ -92,6 +92,7 @@ notes:
- member_id is a tool lookup hint; display_name may not be unique.
- Active member hints reflect historical total message volume, not recent activity.
- Use real current date for relative ranges; database bounds only describe data coverage.
- last_message_ts is the coverage end of the imported data, not the real-world last activity time of the group/chat; the user may not have imported newer records yet. Do not infer group inactivity from this value.
- Do not plan a tool call only to rediscover min/max timestamp.
- When using default recent-day tools, choose a range that intersects database bounds instead of probing an empty real-current-date window first.`
}
@@ -307,7 +307,7 @@ Returned summaries are brief descriptions of each segment, helping quickly locat
- first_message_ts: {{firstMessageTs}}
- first_message_time: {{firstMessageTime}}
- last_message_ts: {{lastMessageTs}}
- last_message_time: {{lastMessageTime}}
- last_message_time: {{lastMessageTime}} (coverage end of imported data — does not indicate whether the group/chat is currently active)
- segment_summaries_available: {{segmentSummaryCount}}
{{memberHintTitle}}
@@ -326,7 +326,8 @@ Usage rules:
- "recent year" / "past year" means one year back from the real current date to today; "last year" means the previous calendar year.
- Database time bounds are only for explaining coverage, not for redefining the user's requested time range.
- When using default recent-day tools, first choose a range that intersects database time bounds instead of probing an empty real-current-date window.
- Do not call tools only to rediscover min/max timestamp; concrete chat facts, statistics, and conclusions still require tool evidence.`,
- Do not call tools only to rediscover min/max timestamp; concrete chat facts, statistics, and conclusions still require tool evidence.
- last_message_time is the coverage end of the imported data, not the real-world last message time of the group/chat; the user may simply not have imported newer records yet. Do not infer that the group has been inactive for a certain period, and do not suggest the user "revive" or "wake up" the group.`,
evidencePolicy: `Evidence policy:
- AI conversation history, prior AI replies, and compressed summaries are only for understanding the user's intent; they are not evidence for chat-record facts.
- Whenever the user asks about chat content, recent topics, what someone said, rankings/statistics, whether a topic appeared, or asks for exact quotes, first call an appropriate data tool to retrieve the current database.
@@ -306,7 +306,7 @@ export default {
- first_message_ts: {{firstMessageTs}}
- first_message_time: {{firstMessageTime}}
- last_message_ts: {{lastMessageTs}}
- last_message_time: {{lastMessageTime}}
- last_message_time: {{lastMessageTime}} (インポート済みデータのカバレッジ終端時刻。グループ/会話が現在もアクティブかどうかは示しません)
- segment_summaries_available: {{segmentSummaryCount}}
{{memberHintTitle}}
@@ -325,7 +325,8 @@ export default {
- 「最近一年/過去一年」は実際の現在日付から今日までの1年間を指し、「去年」は前の暦年を指します。
- データベースの時間境界はカバレッジ説明にのみ使い、ユーザーが求めた時間範囲を再定義するために使わないでください。
- デフォルトの「直近 N 日」ツールを使う場合は、空の実際現在日付ウィンドウを試すのではなく、データベース時間境界と交差する範囲を先に選んでください。
- min/max timestamp を再発見するためだけにツールを呼ばないでください。ただし、具体的なチャット事実、統計、結論には引き続きツール証拠が必要です。`,
- min/max timestamp を再発見するためだけにツールを呼ばないでください。ただし、具体的なチャット事実、統計、結論には引き続きツール証拠が必要です。
- last_message_time はインポート済みデータのカバレッジ終端時刻であり、グループ/会話の現実世界における最終発言時刻ではありません。ユーザーがまだ新しい記録をインポートしていないだけかもしれません。この時刻からグループが「どれだけ活動していない」と推測したり、グループを「活性化」するよう提案したりしないでください。`,
evidencePolicy: `証拠ポリシー:
- AI 会話履歴、過去の AI 回答、圧縮要約はユーザー意図の理解にのみ使用し、チャット記録の事実証拠として扱わない。
- ユーザーがチャット内容、最近の話題、誰かの発言、ランキング/統計、ある話題が出たかどうか、または原文引用を求めた場合は、必ず先に適切なデータツールで現在のデータベースを検索する。
@@ -296,7 +296,7 @@ export default {
- first_message_ts: {{firstMessageTs}}
- first_message_time: {{firstMessageTime}}
- last_message_ts: {{lastMessageTs}}
- last_message_time: {{lastMessageTime}}
- last_message_time: {{lastMessageTime}} (数据库中已导入消息的截止时间,不代表群组/对话当前是否活跃)
- segment_summaries_available: {{segmentSummaryCount}}
{{memberHintTitle}}
@@ -315,7 +315,8 @@ export default {
- “最近一年/过去一年”表示从真实当前日期回推一年到今天;“去年”表示上一自然年。
- 数据库时间边界只用于说明覆盖范围,不用于重定义用户要求的时间范围。
- 使用默认“近 N 天”的工具时,先选择与数据库时间边界有交集的范围,不要先探测真实当前日期窗口导致空结果。
- 不要只为了重新发现 min/max timestamp 调用工具;但回答具体聊天事实、统计和结论仍必须调用工具获取证据。`,
- 不要只为了重新发现 min/max timestamp 调用工具;但回答具体聊天事实、统计和结论仍必须调用工具获取证据。
- last_message_time 是数据库中已导入消息的截止时间,不是群组/对话在现实中最后一次发言的时间;用户可能只是还没有导入更新的记录。不要据此推断群组"多久没动静",更不要主动建议用户去"唤醒"或"激活"群组。`,
evidencePolicy: `证据策略:
- AI 对话历史、历史 AI 回复和压缩摘要只用于理解用户意图,不能作为聊天记录事实证据。
- 只要用户询问聊天记录内容、最近聊什么、某人说过什么、统计排行、是否出现过某话题或要求引用原话,必须先调用合适的数据工具检索当前数据库。
@@ -296,7 +296,7 @@ export default {
- first_message_ts: {{firstMessageTs}}
- first_message_time: {{firstMessageTime}}
- last_message_ts: {{lastMessageTs}}
- last_message_time: {{lastMessageTime}}
- last_message_time: {{lastMessageTime}} (資料庫中已匯入訊息的截止時間,不代表群組/對話當前是否活躍)
- segment_summaries_available: {{segmentSummaryCount}}
{{memberHintTitle}}
@@ -315,7 +315,8 @@ export default {
-「最近一年/過去一年」表示從真實目前日期回推一年到今天;「去年」表示上一自然年。
- 資料庫時間邊界只用於說明覆蓋範圍,不用於重定義使用者要求的時間範圍。
- 使用預設「近 N 天」的工具時,先選擇與資料庫時間邊界有交集的範圍,不要先探測真實目前日期視窗導致空結果。
- 不要只為了重新發現 min/max timestamp 呼叫工具;但回答具體聊天事實、統計和結論仍必須呼叫工具取得證據。`,
- 不要只為了重新發現 min/max timestamp 呼叫工具;但回答具體聊天事實、統計和結論仍必須呼叫工具取得證據。
- last_message_time 是資料庫中已匯入訊息的截止時間,不是群組/對話在現實中最後一次發言的時間;使用者可能只是尚未匯入更新的紀錄。不要據此推斷群組「多久沒動靜」,更不要主動建議使用者去「喚醒」或「激活」群組。`,
evidencePolicy: `證據策略:
- AI 對話歷史、歷史 AI 回覆和壓縮摘要只用於理解使用者意圖,不能作為聊天紀錄事實證據。
- 只要使用者詢問聊天紀錄內容、最近聊什麼、某人說過什麼、統計排行、是否出現過某話題或要求引用原話,必須先呼叫合適的資料工具檢索目前資料庫。