Skip to content

Commit 800252c

Browse files
committed
compact_prompt 加入 Fidelity requirement
1 parent e602387 commit 800252c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/app/service/agent/compact_prompt.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
export const COMPACT_SYSTEM_PROMPT = `You are a conversation summarizer. Your task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions. This summary will replace the conversation history, enabling efficient task resumption in a new context window.`;
1+
export const COMPACT_SYSTEM_PROMPT = `You are a conversation summarizer. Your task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions. This summary will replace the conversation history, enabling efficient task resumption in a new context window.
2+
3+
**Fidelity requirement:** Summarize what actually happened — not what was intended or what would have been ideal. If a step failed, record the failure. If a result was ambiguous, record the ambiguity. If the agent's approach was wrong and corrected, record both. Do not revise history to make the prior work look cleaner than it was. An accurate summary of a messy situation is more useful than a polished summary of a fictional one.`;
24

35
export function buildCompactUserPrompt(customInstruction?: string): string {
46
let prompt = `Write a structured, concise, and actionable continuation summary of the conversation so far. First analyze the conversation in <analysis> tags, then write the summary in <summary> tags.

0 commit comments

Comments
 (0)