mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix(coderd/x/chatd/chatloop): discourage doctrine in compaction summaries (#25850)
Two additions to the compaction summary prompt: 1. Error specificity: the "errors encountered" bullet now instructs the model to keep error notes specific (name the file, the error, the fix) and not generalize from a specific failure to a blanket tool-avoidance rule. This addresses the doctrine crystallization pattern where a single tool failure gets promoted to a standing "avoid tool X" rule that persists across compactions and model swaps. 2. Reproducibility: a new closing sentence instructs the model to reference reproducible content by path, command, or URL rather than inlining it. Content without a stable reproducer is still preserved inline with a brief summary. This targets summary bloat from inlined code blocks (worst case: 34k chars, 76 code blocks reproducing repo content verbatim). Refs CODAGT-331
This commit is contained in:
committed by
GitHub
parent
76d3181aba
commit
8b7e040105
@@ -35,14 +35,22 @@ const (
|
||||
"- Key decisions made and their rationale\n" +
|
||||
"- Concrete technical details: file paths, function names, " +
|
||||
"commands, APIs, and configurations\n" +
|
||||
"- Errors encountered and how they were resolved\n" +
|
||||
"- Errors encountered and how they were resolved. Keep error " +
|
||||
"notes specific: name the file, the error, and the fix. Do not " +
|
||||
"generalize from a specific failure to a blanket tool-avoidance " +
|
||||
"rule (e.g. \"tool X is unreliable\" or \"always use Y instead " +
|
||||
"of Z\")\n" +
|
||||
"- Current state of the work: what is DONE, what is IN PROGRESS, " +
|
||||
"and what REMAINS to be done\n" +
|
||||
"- The specific action the assistant was performing or about to " +
|
||||
"perform when this summary was triggered\n\n" +
|
||||
"Be dense and factual. Every sentence should convey essential " +
|
||||
"context for continuation. Do not include pleasantries or " +
|
||||
"conversational filler."
|
||||
"conversational filler. For content that can be reproduced " +
|
||||
"(repo files, command output, API responses), reference how to " +
|
||||
"obtain it (file path, command, URL) rather than inlining the " +
|
||||
"full content. Include brief inline summaries when the content " +
|
||||
"itself would exceed a few lines."
|
||||
defaultCompactionSystemSummaryPrefix = "The following is a summary of " +
|
||||
"the earlier conversation. The assistant was actively working when " +
|
||||
"the context was compacted. Continue the work described below:"
|
||||
|
||||
Reference in New Issue
Block a user