feat(loop): prompt cue guidance for structured/stepwise output - #223
Open
raymondginger2018-sudo wants to merge 1 commit into
Open
feat(loop): prompt cue guidance for structured/stepwise output#223raymondginger2018-sudo wants to merge 1 commit into
raymondginger2018-sudo wants to merge 1 commit into
Conversation
Contributor
Author
关键设计决策补充
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
设计说明
问题:agent 输出经常包含 free-form filler(复述任务、无关客套),多步任务容易脱轨。系统 prompt 已经很重,不适合再往里面堆指令。
解法:一条简短的 prompt cue——在 routed request 上附加 transient context 消息,提示模型 stepwise 工作、先验证再断言、引用工具结果时带标签。
关键设计决策:
transient_context_messages注入,不会出现在 compaction summarizer 的 prefix 中,避免破坏 prefix/KV cache 对齐DEEPCODE_PROMPT_CUE开关(默认开,设0/false/off关闭)边界情况:
测试建议:验证
build_cue_context()开关逻辑 + 返回结构;prompt_cue_enabled()的环境变量解析