mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-19 00:01:33 +00:00
228 lines
6.8 KiB
YAML
228 lines
6.8 KiB
YAML
system_prompt: |
|
||
You are a context compaction assistant. Your role is to create structured summaries of conversations
|
||
that can be used to restore context in future sessions. Focus on preserving critical information while reducing token count.
|
||
|
||
system_prompt_zh: |
|
||
你是一个上下文压缩助手。你的角色是创建对话的结构化摘要,
|
||
这些摘要可以在未来会话中用于恢复上下文。专注于保留关键信息,同时减少token数量。
|
||
|
||
initial_user_message: |
|
||
The messages above are a conversation to summarize. Create a structured context checkpoint summary
|
||
that another LLM will use to continue the work.
|
||
|
||
Use this EXACT format:
|
||
|
||
## Goal
|
||
[What is the user trying to accomplish? Can be multiple items if the session covers different tasks.]
|
||
|
||
## Constraints & Preferences
|
||
- [Any constraints, preferences, or requirements mentioned by user]
|
||
- [Or "(none)" if none were mentioned]
|
||
|
||
## Progress
|
||
### Done
|
||
- [x] [Completed tasks/changes]
|
||
|
||
### In Progress
|
||
- [ ] [Current work]
|
||
|
||
### Blocked
|
||
- [Issues preventing progress, if any]
|
||
|
||
## Key Decisions
|
||
- **[Decision]**: [Brief rationale]
|
||
|
||
## Next Steps
|
||
1. [Ordered list of what should happen next]
|
||
|
||
## Critical Context
|
||
- [Any data, examples, or references needed to continue]
|
||
- [Or "(none)" if not applicable]
|
||
|
||
Keep each section concise. Preserve exact file paths, function names, and error messages.
|
||
|
||
initial_user_message_zh: |
|
||
上述消息是一场需要总结的对话。创建一个结构化的上下文检查点摘要,
|
||
以便另一个LLM可以用来继续工作。
|
||
|
||
使用此确切格式:
|
||
|
||
## 目标
|
||
[用户试图完成什么?如果会话涵盖不同任务,可以有多个项目。]
|
||
|
||
## 约束和偏好
|
||
- [任何用户提到的约束、偏好或要求]
|
||
- [或者如果没有提到则为"(none)"]
|
||
|
||
## 进展
|
||
### 已完成
|
||
- [x] [已完成的任务/更改]
|
||
|
||
### 进行中
|
||
- [ ] [当前工作]
|
||
|
||
### 阻塞
|
||
- [如果有任何阻碍进展的问题]
|
||
|
||
## 关键决策
|
||
- **[决策]**: [简短理由]
|
||
|
||
## 下一步
|
||
1. [接下来应该发生的事情的有序列表]
|
||
|
||
## 关键上下文
|
||
- [任何继续工作所需的数据、示例或参考资料]
|
||
- [或者如果不适用则为"(none)"]
|
||
|
||
保持每个部分简洁。保留确切的文件路径、函数名称和错误消息。
|
||
|
||
update_user_message: |
|
||
The messages above are NEW conversation messages to incorporate into the existing summary provided in
|
||
<previous-summary> tags.
|
||
|
||
<previous-summary>
|
||
{previous_summary}
|
||
</previous-summary>
|
||
|
||
Update the existing structured summary with new information. RULES:
|
||
- PRESERVE all existing information from the previous summary
|
||
- ADD new progress, decisions, and context from the new messages
|
||
- UPDATE the Progress section: move items from "In Progress" to "Done" when completed
|
||
- UPDATE "Next Steps" based on what was accomplished
|
||
- PRESERVE exact file paths, function names, and error messages
|
||
- If something is no longer relevant, you may remove it
|
||
|
||
Use this EXACT format:
|
||
|
||
## Goal
|
||
[Preserve existing goals, add new ones if the task expanded]
|
||
|
||
## Constraints & Preferences
|
||
- [Preserve existing, add new ones discovered]
|
||
|
||
## Progress
|
||
### Done
|
||
- [x] [Include previously done items AND newly completed items]
|
||
|
||
### In Progress
|
||
- [ ] [Current work - update based on progress]
|
||
|
||
### Blocked
|
||
- [Current blockers - remove if resolved]
|
||
|
||
## Key Decisions
|
||
- **[Decision]**: [Brief rationale] (preserve all previous, add new)
|
||
|
||
## Next Steps
|
||
1. [Update based on current state]
|
||
|
||
## Critical Context
|
||
- [Preserve important context, add new if needed]
|
||
|
||
Keep each section concise. Preserve exact file paths, function names, and error messages.
|
||
|
||
update_user_message_zh: |
|
||
上述消息是要整合到现有摘要中的新对话消息,这些消息在<previous-summary>标签中提供。
|
||
|
||
<previous-summary>
|
||
{previous_summary}
|
||
</previous-summary>
|
||
|
||
用新信息更新现有的结构化摘要。规则:
|
||
- 保留来自先前摘要的所有现有信息
|
||
- 从新消息中添加新的进展、决策和上下文
|
||
- 更新进度部分:当完成时将项目从"进行中"移到"已完成"
|
||
- 根据已完成的内容更新"下一步"
|
||
- 保留确切的文件路径、函数名称和错误消息
|
||
- 如果某些内容不再相关,您可以删除它
|
||
|
||
使用此确切格式:
|
||
|
||
## 目标
|
||
[保留现有目标,如果任务扩展则添加新目标]
|
||
|
||
## 约束和偏好
|
||
- [保留现有内容,添加发现的新内容]
|
||
|
||
## 进展
|
||
### 已完成
|
||
- [x] [包含以前完成的项目和新完成的项目]
|
||
|
||
### 进行中
|
||
- [ ] [当前工作 - 根据进展更新]
|
||
|
||
### 阻塞
|
||
- [当前阻塞问题 - 如果解决则删除]
|
||
|
||
## 关键决策
|
||
- **[决策]**: [简短理由](保留所有之前的内容,添加新的)
|
||
|
||
## 下一步
|
||
1. [根据当前状态更新]
|
||
|
||
## 关键上下文
|
||
- [保留重要上下文,如需要则添加新的]
|
||
|
||
保持每个部分简洁。保留确切的文件路径、函数名称和错误消息。
|
||
|
||
# Used when cut point falls mid-turn (split turn scenario)
|
||
# Example: User → Assistant(part1) → [CUT HERE] → Assistant(part2 kept) → User
|
||
# This summarizes part1 to provide context for part2
|
||
turn_prefix_summarization: |
|
||
<conversation>
|
||
{conversation_text}
|
||
</conversation>
|
||
|
||
This is the PREFIX of a turn that was too large to keep. The SUFFIX (recent work) is retained.
|
||
|
||
Summarize the prefix to provide context for the retained suffix:
|
||
|
||
## Original Request
|
||
[What did the user ask for in this turn?]
|
||
|
||
## Early Progress
|
||
- [Key decisions and work done in the prefix]
|
||
|
||
## Context for Suffix
|
||
- [Information needed to understand the retained recent work]
|
||
|
||
Be concise. Focus on what's needed to understand the kept suffix.
|
||
|
||
# 当切割点落在回合中间时使用(split turn 场景)
|
||
# 示例:用户 → 助手(部分1) → [切割点] → 助手(部分2保留) → 用户
|
||
# 这会总结部分1以为部分2提供上下文
|
||
turn_prefix_summarization_zh: |
|
||
<conversation>
|
||
{conversation_text}
|
||
</conversation>
|
||
|
||
这是一个过长而无法保留的回合的前缀。后缀(最近的工作)已保留。
|
||
|
||
总结前缀以为保留的后缀提供上下文:
|
||
|
||
## 原始请求
|
||
[用户在此回合中要求了什么?]
|
||
|
||
## 早期进展
|
||
- [在前缀中做出的关键决策和完成的工作]
|
||
|
||
## 后缀上下文
|
||
- [理解保留的最近工作所需的信息]
|
||
|
||
保持简洁。专注于理解保留后缀所需的内容。
|
||
|
||
# Format for wrapping the compaction summary when presenting to LLM
|
||
# This matches the TypeScript format: COMPACTION_SUMMARY_PREFIX + summary + COMPACTION_SUMMARY_SUFFIX
|
||
compaction_summary_format: |
|
||
The conversation history before this point was compacted into the following summary:
|
||
|
||
<summary>
|
||
{summary}
|
||
</summary>
|
||
|
||
compaction_summary_format_zh: |
|
||
此点之前的对话历史已被压缩为以下摘要:
|
||
|
||
<summary>
|
||
{summary}
|
||
</summary>
|