HumanLayer 的 Dex Horthy 回应“同会话加载多个技能是否会污染上下文”:5 步流程内没问题,但技能需要叠加(第 2 个技能的指令在第 6 步仍要生效)或单会话需同时激活约 200 个技能时,应改用新上下文、子智能体或预先合并技能内容。他还建议按技能内容区分处理:流程步骤多就拆开,纯信息可合并进一条用户消息,行为类规则需靠 hooks 等确定性方式重复。
question from the TL:
quick question, do you think consuming more skills in the same session unnecessarily dirties the context?
Say you have a 5 step work, each step with a skill. You can either run all on single session, divide into subagents with relevant skills, or compact or new chat per step.
my intuition says 5 steps in a process is fine. Each successive skill will take a share of attention from previous skills,
so if you have a VERY long complex process where you need skills to STACK (ie instructions from skill 2 must still be honored while skill 6 is executing)
Or if you have many (eg 200) separate skills that all need to be active during a session ( think: agent memory snippets implemented as skills, probably an antipattern in today’s harnesses)
Then you want fresh context, subagents, or to synthetically precombine many skill contents into a single user message (although then you lose the attention recency bias for instructions in step 6 of the process)
Also worth noting that good skills can be a mix of:
- information not in the weights
- steps to execute a process (not in the weights)
-general steering or behavior
They usually contain all three, but what’s in your skills nudges the meta here.
More instructions / process steps? You wanna string those out
Mostly information? Probably safe to combine into one user message.
Behavior? Depends. Adherence can decay over a long session. Fine to split or combine, but if it’s important, you want some way of repeating important rules, either by including rules in all the steps of a process, or by something more deterministic like hooks
And OF COURSE I’m begging you PLEASE stop putting stuff that’s in the weights in your skills. You are wasting time and locking in a specific, potentially suboptimal behavior.
来源:dex · x.com