token-budget-advisor

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Token Budget Advisor

Token预算顾问

This skill provides early assessment of token-heavy tasks and recommends chunking strategies to ensure successful completion within context window constraints.
此技能可提前评估高Token消耗任务,并推荐任务拆分策略,以确保在上下文窗口限制内成功完成任务。

When to Use This Skill

何时使用此技能

Trigger this skill before beginning work when you detect:
  • Multiple file uploads (3+ documents) combined with analysis requests
  • Requests for "comprehensive", "complete", "thorough", or "full" analysis
  • Multi-document comparative analysis
  • Complex workflows requiring 10+ tool calls (extensive web research + synthesis)
  • Tasks combining heavy research with large artifacts (reports, presentations)
  • Queries spanning multiple dimensions (temporal + categorical + quantitative)
  • Requests to "analyze everything" or "create a complete report on all aspects"
当你检测到以下情况时,在开始工作前触发此技能:
  • 结合分析请求的多文件上传(3份及以上文档)
  • 包含“全面的”“完整的”“彻底的”或“全部的”等表述的分析请求
  • 多文档对比分析
  • 需要10次以上工具调用的复杂工作流(大量网页研究+信息整合)
  • 结合大量研究与大型成果(报告、演示文稿)的任务
  • 跨越多个维度的查询(时间+类别+量化)
  • “分析所有内容”或“创建涵盖所有方面的完整报告”类请求

Core Function

核心功能

This skill serves two purposes:
  1. Early warning system: Assess whether a task will likely exceed token limits
  2. Strategic planning: Provide specific, actionable chunking recommendations
此技能有两个核心用途:
  1. 早期预警系统:评估任务是否可能超出Token限制
  2. 战略规划:提供具体、可执行的任务拆分建议

Token Estimation Framework

Token估算框架

Quick Assessment Heuristics

快速评估准则

Estimate token consumption using these rough guidelines:
Input costs:
  • Uploaded document: ~1,000-5,000 tokens each (depending on length)
  • Web search result: ~500-1,500 tokens
  • Web fetch (full article): ~2,000-8,000 tokens
  • Google Drive document: ~1,000-10,000 tokens (varies significantly)
Output costs:
  • Simple response: 500-2,000 tokens
  • Detailed analysis: 2,000-5,000 tokens
  • Long-form report: 5,000-15,000 tokens
  • Complex artifact (presentation, document): 5,000-20,000 tokens
Tool call overhead:
  • Each tool call includes the query, results, and reasoning: ~1,000-3,000 tokens average
Warning thresholds:
  • Caution zone (60-80% of budget): Task is achievable but tight; consider efficiency
  • Danger zone (80-95% of budget): High risk; strongly recommend chunking
  • Exceeds budget (95%+ of budget): Task requires chunking; cannot complete in one conversation
使用以下大致准则估算Token消耗:
输入成本:
  • 上传文档:每份约1000-5000 Token(取决于长度)
  • 网页搜索结果:约500-1500 Token
  • 网页抓取(完整文章):约2000-8000 Token
  • Google Drive文档:约1000-10000 Token(差异较大)
输出成本:
  • 简单回复:500-2000 Token
  • 详细分析:2000-5000 Token
  • 长篇报告:5000-15000 Token
  • 复杂成果(演示文稿、文档):5000-20000 Token
工具调用开销:
  • 每次工具调用包含查询、结果和推理:平均约1000-3000 Token
预警阈值:
  • 注意区(预算的60-80%):任务可完成但空间紧张;需考虑效率优化
  • 危险区(预算的80-95%):高风险;强烈建议拆分任务
  • 超出预算(95%以上):任务必须拆分;无法在单次对话中完成

Task Complexity Multipliers

任务复杂度乘数

Apply these mental adjustments:
  • Synthesis required: Add 30-50% to output estimate (comparing, integrating multiple sources)
  • Iterative refinement: Add 20-30% (when task involves reviewing and improving)
  • Multiple formats: Add 20% per additional output type (report + presentation + spreadsheet)
应用以下调整系数:
  • 需要信息整合:在输出估算基础上增加30-50%(对比、整合多来源信息)
  • 迭代优化:增加20-30%(当任务涉及审查和改进时)
  • 多种格式:每增加一种输出类型增加20%(报告+演示文稿+电子表格)

Chunking Strategy Framework

任务拆分策略框架

When a task exceeds token budget, recommend specific chunking approaches. Choose strategies based on task structure:
当任务超出Token预算时,推荐具体的拆分方法。根据任务结构选择策略:

1. Sequential Processing

1. 顺序处理

Best for: Time-series data, chronological analysis, ordered workflows
Pattern:
"This analysis of 12 months of data will exceed our token budget. I recommend we split it into quarters:
- Part 1: Q1-Q2 analysis (Jan-Jun)
- Part 2: Q3-Q4 analysis (Jul-Dec)  
- Part 3: Synthesis and recommendations

Should I start with Part 1?"
When to use:
  • Historical data analysis
  • Period-over-period comparisons
  • Multi-phase projects
最适用于: 时间序列数据、 chronological分析、有序工作流
示例话术:
"对12个月数据的分析将超出我们的Token预算。我建议按季度拆分:
- 第一部分:Q1-Q2分析(1-6月)
- 第二部分:Q3-Q4分析(7-12月)  
- 第三部分:信息整合与建议

我可以从第一部分开始吗?"
适用场景:
  • 历史数据分析
  • 同期对比分析
  • 多阶段项目

2. Dimensional Breakdown

2. 维度拆分

Best for: Multi-faceted analysis, different aspects of same topic
Pattern:
"A complete market analysis covering financial, competitive, regulatory, and technological factors will strain our token budget. Let's break it into:
- Session 1: Financial performance and market size
- Session 2: Competitive landscape and positioning
- Session 3: Regulatory environment and compliance
- Session 4: Technology trends and synthesis

Which dimension should we tackle first?"
When to use:
  • Multi-stakeholder analysis
  • Different analytical lenses on same subject
  • Complex business cases
最适用于: 多方面分析、同一主题的不同维度
示例话术:
"涵盖财务、竞争、监管和技术因素的完整市场分析会让Token预算吃紧。我们可以拆分为:
- 环节1:财务表现与市场规模
- 环节2:竞争格局与定位
- 环节3:监管环境与合规性
- 环节4:技术趋势与信息整合

我们先处理哪个维度?"
适用场景:
  • 多利益相关方分析
  • 同一主题的不同分析视角
  • 复杂商业案例

3. Depth Progression

3. 深度递进

Best for: Tasks requiring outline → draft → refinement
Pattern:
"Creating a comprehensive 50-slide presentation with detailed research will exceed our budget. I recommend:
- Round 1: Build structure and outline (30 min)
- Round 2: Develop content for slides 1-25 (45 min)
- Round 3: Develop content for slides 26-50 (45 min)
- Round 4: Refinement pass (30 min)

Let's start with the outline?"
When to use:
  • Large documents or presentations
  • When quality refinement is important
  • Creative projects benefiting from iteration
最适用于: 需要大纲→草稿→优化的任务
示例话术:
"创建包含详细研究的50页演示文稿会超出预算。我建议:
- 第一轮:构建结构和大纲(30分钟)
- 第二轮:制作第1-25页内容(45分钟)
- 第三轮:制作第26-50页内容(45分钟)
- 第四轮:优化完善(30分钟)

我们先从大纲开始?"
适用场景:
  • 大型文档或演示文稿
  • 注重质量优化的任务
  • 可从迭代中受益的创意项目

4. Subset Sampling

4. 子集抽样

Best for: Large document sets where representative sampling works
Pattern:
"Analyzing all 15 contracts will exceed our budget. I suggest:
- Part 1: Analyze 5 representative contracts (different types/dates)
- Part 2: Based on patterns found, confirm with 5 more
- Part 3: Quick scan of remaining 5 for exceptions, then synthesize

This gives thorough coverage while managing tokens. Sound good?"
When to use:
  • Document review at scale
  • Pattern identification across many files
  • Risk-based sampling approaches
最适用于: 可采用代表性抽样的大型文档集
示例话术:
"分析全部15份合同会超出预算。我建议:
- 第一部分:分析5份代表性合同(不同类型/日期)
- 第二部分:基于发现的模式,再分析5份
- 第三部分:快速扫描剩余5份以查找例外情况,然后整合信息

这种方式既能保证全面覆盖,又能管控Token消耗。可以吗?"
适用场景:
  • 大规模文档审查
  • 跨多文件的模式识别
  • 基于风险的抽样方法

5. Parallel Track Processing

5. 并行追踪处理

Best for: Independent workstreams that can be combined later
Pattern:
"Comparing our product vs 5 competitors across features, pricing, and positioning is too large for one session. Let's split by competitor:
- Session 1: Competitors A & B full analysis
- Session 2: Competitors C & D full analysis  
- Session 3: Competitor E + synthesis matrix

Each session stays focused and manageable."
When to use:
  • Comparative analysis
  • Multiple independent subjects
  • When parts don't need each other's context
最适用于: 可后续合并的独立工作流
示例话术:
"对比我们的产品与5个竞争对手的功能、定价和定位,单次会话无法完成。我们按竞争对手拆分:
- 环节1:竞争对手A和B的完整分析
- 环节2:竞争对手C和D的完整分析  
- 环节3:竞争对手E分析+整合矩阵

每个环节都聚焦且易于管理。"
适用场景:
  • 对比分析
  • 多个独立主题
  • 各部分无需彼此上下文的任务

Communication Guidelines

沟通准则

Messaging Framework

话术框架

When recommending chunking, use this structure:
  1. Acknowledge the request clearly
  2. Provide token budget assessment (brief, 1 sentence)
  3. Recommend specific chunking approach (numbered list, 2-4 parts)
  4. Ask for confirmation to proceed (keep user in control)
Example:
I'll help you analyze these 8 financial reports and create a comprehensive presentation. 
This task will exceed our token budget given the research and artifact creation required. 
I recommend splitting it into:
1. Reports 1-4: Analysis and key findings
2. Reports 5-8: Analysis and key findings  
3. Synthesize all findings into presentation

Should I start with reports 1-4?
推荐任务拆分时,使用以下结构:
  1. 清晰确认请求
  2. 简要说明Token预算评估(1句话)
  3. 推荐具体拆分方法(编号列表,2-4个部分)
  4. 请求确认以推进(让用户掌控进度)
示例:
我会帮你分析这8份财务报告并创建一份全面的演示文稿。
考虑到所需的研究和成果创建工作,此任务将超出我们的Token预算。
我建议拆分为:
1. 报告1-4:分析与关键发现
2. 报告5-8:分析与关键发现  
3. 将所有发现整合为演示文稿

我可以从报告1-4开始吗?

What NOT to Do

禁忌事项

❌ Don't over-explain token budgets or get technical about context windows ❌ Don't apologize excessively or sound limiting ❌ Don't provide vague suggestions like "maybe split this up somehow" ❌ Don't start work and then stop mid-task saying "we've run out of tokens"
✅ Do be matter-of-fact and solution-oriented ✅ Do provide specific, actionable breakdowns ✅ Do keep the momentum going toward task completion ✅ Do frame chunking as a quality improvement (thoroughness) not limitation
❌ 不要过度解释Token预算或深入讲解上下文窗口的技术细节 ❌ 不要过度道歉或表现出局限性 ❌ 不要给出模糊建议,比如“也许可以想办法拆分一下” ❌ 不要开始工作后中途停止说“我们的Token用完了”
✅ 要实事求是,以解决方案为导向 ✅ 要提供具体、可执行的拆分方案 ✅ 要保持推进任务完成的势头 ✅ 要将任务拆分表述为提升质量(更彻底)而非限制

Handling Edge Cases

边缘场景处理

User Insists on Single Session

用户坚持单次会话完成

If user pushes back on chunking:
"I understand you'd prefer this in one go. I'll do my best to complete it, but I may need to:
- Prioritize the most critical elements
- Provide a condensed version
- Focus on breadth over depth in some areas

Let me start and we'll see how far we can get. What aspects are highest priority?"
如果用户反对拆分:
"我理解你希望一次性完成。我会尽力完成,但可能需要:
- 优先处理最关键的内容
- 提供精简版结果
- 在某些领域侧重广度而非深度

我现在开始,看看能完成多少。哪些方面是最高优先级?"

Task Becomes Too Large Mid-Stream

任务进行中变得过大

If partway through, token budget becomes concerning:
"I'm about halfway through and we're approaching token limits. I have two options:
1. Complete this current section and continue in a fresh conversation (recommended - maintains quality)
2. Accelerate through remaining sections with lighter analysis

Which approach works better for you?"
如果在任务中途,Token预算出现问题:
"我已完成约一半工作,即将达到Token限制。我有两个选项:
1. 完成当前部分,在新会话中继续(推荐 - 保证质量)
2. 加快剩余部分的处理,简化分析

哪种方式更适合你?"

Uncertain Estimation

估算不确定

When task scope is ambiguous:
"I want to make sure we complete this successfully. The scope could go in different directions. Could you clarify:
- [Specific question about depth]
- [Specific question about breadth]

This helps me gauge whether we should chunk this task."
当任务范围不明确时:
"我想确保我们能成功完成任务。任务范围可能有不同方向。你能澄清一下:
- [关于深度的具体问题]
- [关于广度的具体问题]

这有助于我判断是否需要拆分任务。"

Integration with Other Skills

与其他技能的集成

This skill works in conjunction with domain-specific skills:
  • Before heavy document analysis: Check token budget, then use docx/pdf/xlsx skills
  • Before comprehensive research: Assess scope, then execute research process
  • Before complex artifacts: Plan chunking, then use pptx/docx/xlsx creation skills
Think of this skill as a "pre-flight check" before embarking on token-intensive tasks.
此技能可与特定领域技能配合使用:
  • 在大型文档分析前:检查Token预算,然后使用docx/pdf/xlsx技能
  • 在全面研究前:评估范围,然后执行研究流程
  • 在创建复杂成果前:规划拆分,然后使用pptx/docx/xlsx创建技能
将此技能视为执行高Token消耗任务前的“预检步骤”。

Examples in Action

实际应用示例

Example 1: Multi-Document Analysis

示例1:多文档分析

User query: "Analyze all these uploaded contracts and tell me the common terms and differences" [User has uploaded 12 PDF contracts]
Response: "I'll help you analyze these 12 contracts. Given the volume, I recommend we process this in batches to ensure thorough analysis:
  1. Contracts 1-4: Extract key terms, obligations, and unique clauses
  2. Contracts 5-8: Same analysis
  3. Contracts 9-12: Same analysis
  4. Synthesis: Common terms across all + key differences
This ensures I can give each contract proper attention. Should I start with contracts 1-4?"
用户查询: "分析所有上传的这些合同,告诉我共同条款和差异" [用户已上传12份PDF合同]
回复: "我会帮你分析这12份合同。考虑到数量,我建议分批处理以确保分析彻底:
  1. 合同1-4:提取关键条款、义务和独特条款
  2. 合同5-8:相同分析
  3. 合同9-12:相同分析
  4. 整合:所有合同的共同条款+关键差异
我可以从合同1-4开始吗?"

Example 2: Comprehensive Research Report

示例2:全面研究报告

User query: "Research the AI chip market and create a detailed report covering market size, key players, technology trends, and 5-year forecast"
Response: "I'll create a comprehensive AI chip market report. This research and report creation will be substantial, so I recommend:
  1. Market overview: Size, growth, segments (research + draft)
  2. Competitive landscape: Key players, market share, strategies (research + draft)
  3. Technology trends: Current developments, emerging tech (research + draft)
  4. Future outlook: 5-year forecast, implications (research + draft)
  5. Final report assembly: Executive summary, polish, formatting
Each section gets thorough research and quality writing. Should I begin with the market overview?"
用户查询: "研究AI芯片市场,创建一份涵盖市场规模、关键玩家、技术趋势和5年预测的详细报告"
回复: "我会创建一份全面的AI芯片市场报告。这项研究和报告创建工作体量较大,我建议拆分为:
  1. 市场概述:规模、增长、细分领域(研究+草稿)
  2. 竞争格局:关键玩家、市场份额、策略(研究+草稿)
  3. 技术趋势:当前发展、新兴技术(研究+草稿)
  4. 未来展望:5年预测、影响(研究+草稿)
  5. 最终报告整合:执行摘要、润色、格式调整
每个部分都能得到充分研究和高质量撰写。我可以从市场概述开始吗?"

Example 3: Simple Task (No Chunking)

示例3:简单任务(无需拆分)

User query: "Summarize this 10-page PDF and give me the key takeaways"
Response: [No trigger - proceed normally without invoking this skill] "I'll read through the PDF and extract the key points for you."
Rationale: Single document summary is well within normal token budget.
用户查询: "总结这份10页的PDF,告诉我关键要点"
回复: [不触发此技能 - 正常执行] "我会通读这份PDF并为你提取关键要点。"
理由:单文档摘要完全在正常Token预算范围内。

Skill Maintenance

技能维护

This skill should be updated when:
  • Token budget limits change
  • New patterns of token-heavy tasks emerge
  • Chunking strategies prove ineffective in practice
  • User feedback indicates communication could be clearer
当出现以下情况时,应更新此技能:
  • Token预算限制变更
  • 出现新的高Token消耗任务模式
  • 任务拆分策略在实践中被证明无效
  • 用户反馈表明沟通方式需更清晰