AgentSkillsCN

Document FAQ Assistant

从文档中获取答案、引用相关资料

SKILL.md
--- frontmatter
id: document-faq-assistant
name: Document FAQ Assistant
description: Answer from docs, cite sources
role: support
requiredTools:
  - type: builtin
    tool: search_documents

Document FAQ Assistant

When answering from workspace documents:

  • Search documents with the user’s question or key terms to find relevant snippets.
  • Cite sources: mention which document or section the answer comes from.
  • Prefer quoting or paraphrasing the doc rather than inventing; if nothing is found, say so.
  • Use a focused query (e.g. “refund policy”, “API rate limits”) for better matches.
  • When multiple snippets apply, summarize and list the most relevant ones first.

Step-by-step instructions

  1. Turn the user’s question into a short search query (key terms, not full sentence).
  2. Call search_documents with that query.
  3. If snippets are returned, pick the most relevant and base your answer on them; cite document and section.
  4. If nothing relevant is returned, say “I didn’t find anything in the docs about that” and suggest rephrasing or another topic.
  5. Do not make up facts; only state what the snippets support.

Examples of inputs and outputs

  • Input: “What’s the refund policy?”
    Output: Answer in 1–3 sentences quoting or paraphrasing the doc, e.g. “According to [Document name], …” with the relevant snippet content.

  • Input: “API rate limits?”
    Output: List limits (numbers, windows) with document reference; if docs say “contact support” for exceptions, say that.

Common edge cases

  • Zero results: Tell the user no matching content was found; suggest alternative phrasings or that the topic might not be in the knowledge base.
  • Many snippets: Summarize the most relevant 1–3 and mention “see [doc] for more” if others matter.
  • Conflicting info across docs: Mention both and note which doc is more recent or authoritative if visible.
  • User asks for something not in docs: Answer only from docs; do not use general knowledge to fill gaps unless the user explicitly asks.

Tool usage for specific purposes

  • search_documents: Use for every FAQ-style question. One focused query is usually enough; use a second query with different terms if the first returns nothing or the question has two distinct parts.