逐日AI

面试题库

共 328 题,当前筛选 1 题。

7 天 Agent Skills:把经验做成可复用能力

D1 Skills 是什么:SKILL.md 规范、目录结构与三阶段渐进式加载

  • Agent Skills 解决的是什么问题?它和把所有规范写进一个大的提示词文件有什么区别?What problem do Agent Skills solve, and how are they different from putting every convention into one big instruction file?
    国内高频海外高频基础#agent-skills#context-engineering

    分析过程 · 先想清楚再作答

    1. 这题的区分度在你有没有说出「按需」两个字。只答「skill 是可复用的提示词」的人,等于没答,因为那句话对提示词模板同样成立。
    2. 先给分工:工具补的是能力缺口,模型本来做不到的事;技能补的是经验缺口,模型做得到但不知道你们这儿怎么做。这一刀切下去,后面的论证才站得住。
    3. 再给机制差异:常驻指令文件每次会话全量进上下文,skill 平时只露 name 与 description,命中才展开正文。前者的成本是固定的,后者的成本是按需的。
    4. 接着算代价:二十条规范写满六千 token 的系统提示,五十轮会话要重复计费三十万 token;更贵的是注意力被不相干的规则稀释,做第三件事时被第十七条干扰。
    5. 最后给判据,这是面试官真正想听的一句:这条经验是不是每次都用得上?是就写进常驻指令文件,不是就做成 skill。
    6. 可预期的追问是「那提示词模板呢」。答案是谁来挑:模板是你手动选的,skill 是模型读着 description 自己选的,触发权在模型手里。

    How to reason about it · think before answering

    1. The discriminator is whether you say on demand. Answering skills are reusable prompts says nothing, because that is equally true of a prompt template.
    2. Start with the split: tools fill a capability gap the model cannot cross on its own; skills fill an experience gap where the model can do the task but not the way your team does it.
    3. Then the mechanism: a persistent instruction file enters context in full every session, while a skill exposes only name and description until something matches and its body is loaded.
    4. Quantify the cost: twenty conventions at six thousand tokens of system prompt bill three hundred thousand tokens over a fifty-turn session, and the attention dilution costs more than the money.
    5. Close with the rule of thumb interviewers want: if the guidance applies every single time, it belongs in the persistent instruction file; otherwise make it a skill.
    6. Expected follow-up: what about prompt templates? The difference is who chooses. You pick a template; the model picks a skill by reading descriptions.

    答题要点

    • 工具补能力缺口,技能补经验缺口,这是两件事,不要混着答。
    • 常驻指令文件成本固定且每轮重发,skill 的正文只在命中时才进上下文。
    • 把不相干的规范全塞进系统提示,除了花钱还会稀释注意力,让模型被无关规则干扰。
    • 判据是「是不是每次都用得上」:是就常驻,不是就做成 skill。
    • 和提示词模板的关键差别是触发权在模型手里,靠的是 description。

    Key points

    • Tools close capability gaps, skills close experience gaps. Do not blur the two.
    • A persistent instruction file costs the same tokens every turn; a skill body only enters context when it matches.
    • Dumping unrelated conventions into the system prompt both costs money and dilutes attention.
    • The test is whether the guidance applies every time: if yes it stays resident, if no it becomes a skill.
    • Unlike a prompt template, a skill is selected by the model itself from its description.