skills/add-generative-answers/SKILL.md
Add generative answer nodes (SearchAndSummarizeContent or AnswerQuestionWithAI) to a Copilot Studio topic. Use this instead of /add-node when the user asks to add grounded answers, knowledge search, generative answers, or AI-powered responses — these nodes require specific patterns (ConditionGroup follow-up, knowledge source references, autoSend, responseCaptureType) that /add-node does not cover.
npx skillsauth add microsoft/skills-for-copilot-studio skills/add-generative-answersInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Add SearchAndSummarizeContent nodes to generate responses grounded in the agent's knowledge sources.
When knowledge sources are added to the agent (via /add-knowledge), the AI can directly search them without any topic if it recognizes a QnA-style query. A dedicated topic with SearchAndSummarizeContent is useful when:
If the user just wants the agent to answer questions from its knowledge, adding the knowledge source may be enough.
Auto-discover the agent directory:
Glob: **/agent.mcs.yml
NEVER hardcode an agent name.
Determine the approach based on what the user needs:
Look up the schema for both nodes:
node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js resolve CreateSearchQuery
node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js resolve SearchAndSummarizeContent
Read settings.mcs.yml to check if GenerativeActionsEnabled: true. This determines the best pattern:
GenerativeActionsEnabled: true → prefer Pattern 2 (Orchestrator): use topic inputs/outputs and let the orchestrator handle the response. This is the best approach for generative-orchestrated agents.GenerativeActionsEnabled: false (or not set) → use Pattern 1 (Direct Response): autoSend: false + manual SendActivity, or Pattern 3 (Fallback Search) for a simple all-knowledge fallback.SearchKnowledgeSources + CreateSearchQuery for raw results without AI summarization (insurance policies, HR docs, legal text).Ask the user to clarify the behavior (if not already clear from their request):
Always precede SearchAndSummarizeContent with CreateSearchQuery to preserve conversational context. Never pass =System.Activity.Text directly to SearchAndSummarizeContent — the raw last message may lack context (e.g., "tell me more about that"). CreateSearchQuery rewrites the input into an optimized search query. Access the result via Topic.<ResultVar>.SearchQuery.
Generate unique IDs for all nodes (format: <nodeType>_<6-8 random alphanumeric>).
Build the YAML using the appropriate pattern. For full YAML examples, see patterns.md. For the complete property reference table, see property-reference.md.
| Node | Use When | Data Source | Output |
|------|----------|-------------|--------|
| SearchAndSummarizeContent | You want answers grounded in the agent's knowledge sources (websites, SharePoint, Dataverse) | Agent's configured knowledge | AI-summarized response |
| SearchKnowledgeSources | You need verbatim/exact content — insurance policies, legal text, HR docs — where AI summarization could lose details | Agent's configured knowledge | Raw search results (no AI summary) |
| AnswerQuestionWithAI | You want a response based only on conversation history and general model knowledge | No external data | AI-generated response |
Use SearchAndSummarizeContent for the vast majority of cases (what people call "generative answers"). Use SearchKnowledgeSources when you need raw, unsummarized results for precision scenarios (pair with CreateSearchQuery for better search accuracy). Use AnswerQuestionWithAI only when you explicitly want the model to respond without consulting knowledge sources.
When using knowledgeSources to restrict the search to specific sources:
/add-knowledge)knowledge/ directory.mcs.yml extensionExample: if the file is cre3c_agent.topic.MyDocs_abc123.mcs.yml, the reference is:
knowledgeSources:
kind: SearchSpecificKnowledgeSources
knowledgeSources:
- cre3c_agent.topic.MyDocs_abc123
development
Pattern library for Copilot Studio agent design. Contains proven and recommended implementation patterns with YAML examples. Used by the Advisor agent to suggest patterns and by the Author agent to reference YAML structure during implementation. USE FOR: design guidance, pattern suggestions, review against best practices, troubleshooting known pitfalls, YAML reference during implementation. DO NOT USE FOR: general YAML schema reference (use int-reference), topic creation mechanics (use new-topic).
testing
Look up Copilot Studio YAML schema definitions. Use when the user asks about schema structure, element properties, or how to use a specific YAML kind.
data-ai
Reference tables for Copilot Studio YAML authoring: triggers, actions, variables, entities, Power Fx functions, templates. Preloaded by author and advisor agents.
development
Add a knowledge source (public website or SharePoint) to a Copilot Studio agent. Use when the user asks to add a knowledge source, documentation URL, website, or SharePoint site for the agent to search.