逐日AI

面试题库

共 328 题,当前筛选 1 题。

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

D7 综合与复盘:把一套团队规范做成 skill 包并驱动子代理完成一次真实任务

  • 一份三十页的团队规范文档要拆成几个 skill,按什么切?How many skills should a thirty-page team convention document become, and how do you split it?
    国内高频海外高频进阶#agent-skills#design#decomposition

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

    1. 这题看着开放,其实有明确的对错。答「按章节切」几乎必错,能说清为什么错才是拿分点。
    2. 先给错的那条:**章节结构是为人的阅读顺序服务的**,通常从概念讲到细节;而 skill 的边界必须为触发场景服务——模型是在「用户刚说了一句话」这个时刻决定要不要翻开它。这两种结构几乎从不重合。
    3. 然后给正确的三步。第一步通读文档,只记「什么时候有人会用到这一段」,记场景不记内容,三十页通常能压出十来个场景。
    4. 第二步把场景按**同一个时刻**聚类。提交信息的格式、类型的取值、正文写什么,可能分散在三章里,但都在「我要提交了」这一刻被用到,它们是一个 skill;同一章里的「怎么写提交信息」和「怎么拆提交」是两个时刻,要拆开。
    5. 第三步为每个聚类写一句描述并检查互斥:各写三句会触发的话、两句形似但不该触发的话,跑一遍看有没有互相抢。**抢了说明聚类没聚干净,回第二步。**
    6. 还要主动说一件面试官爱追问的事:**文档里有一大半内容不该进任何 skill**。背景、沿革、当初为什么这么定,对人有价值,对模型是纯负担。判据仍是「不写这条,模型会不会做错」。三十页压成三四百行是正常的。
    7. 最后补一类特殊内容:确定性的规则(类型只能是这六个、版本号必须匹配某个格式)更适合沉淀成校验脚本,正文只留一句「写完跑一次校验」。
    8. 可预期的追问是「到底该切几个」。答案是数量由聚类结果决定而不是先定,但如果切出七八个还互相抢,通常是场景记得太细了;如果只切出一个,说明你还是按文档整体在想。

    How to reason about it · think before answering

    1. It sounds open-ended but has a clear wrong answer. Splitting by chapter is almost always wrong, and explaining why is where the points are.
    2. Chapter structure serves a human reading order, usually concept then detail. A skill boundary must serve the trigger moment, because the model decides whether to open it right after the user speaks. The two structures rarely coincide.
    3. Give three steps. First, read the document recording only when someone would need each passage. Record situations, not content; thirty pages usually yields a dozen situations.
    4. Second, cluster situations by shared moment. Commit message format, allowed types and body content may sit in three chapters but all apply at the moment of committing, so they are one skill. Writing a commit message and splitting commits share a chapter but are two moments, so they split.
    5. Third, write one description per cluster and test mutual exclusivity with three triggering phrases and two near-miss non-triggers each. If they compete, the clustering is not clean; go back to step two.
    6. Raise something interviewers probe: most of the document belongs in no skill. Background and history matter to people and are pure overhead for a model. The test remains whether omitting a line would make the model get it wrong. Thirty pages compressing to a few hundred lines is normal.
    7. Add the special case: deterministic rules such as an allowed type set or a version format belong in a validation script, leaving the body to say run the validator.
    8. Expected follow-up: how many exactly? The count follows the clustering. Seven or eight that still compete usually means the situations were recorded too finely; exactly one means you were still thinking about the document as a whole.

    答题要点

    • 不能按章节切,章节服务人的阅读顺序,skill 边界服务触发时刻。
    • 三步:只记使用场景、按同一个时刻聚类、写描述并用正负例查互斥。
    • 互相抢说明聚类没聚干净,要退回重聚,不是改描述糊过去。
    • 文档里一大半内容不进任何 skill,判据是不写这条模型会不会做错。
    • 确定性规则沉淀成校验脚本,正文只留一句跑校验。

    Key points

    • Do not split by chapter: chapters serve reading order, skill boundaries serve trigger moments.
    • Three steps: record situations, cluster by shared moment, write descriptions and test with positive and negative examples.
    • Competing descriptions mean bad clustering; go back rather than patching the wording.
    • Most of the document enters no skill; the test is whether omitting it would cause a mistake.
    • Deterministic rules become a validation script, leaving one line in the body.