7.1 Custom Prompts for Advanced Responses

Key Takeaways

  • Custom prompts configure instructions to Azure OpenAI Service or Azure AI Foundry models and can be added at agent level as tools, as topic nodes, or inside agent flows.
  • Prompt inputs (text, images, documents) bind from topic or system variables so the same prompt template works across turns with dynamic context.
  • Temperature ranges from 0 (predictable, conservative) to 1 (more creative diversity); default is 0 for accuracy-focused agent tasks.
  • You can select managed models or connect Azure AI Foundry chat-completion deployments (endpoint must end in /chat/completions) for bring-your-own-model prompts.
  • Strong prompt instructions are specific, brief, example-backed, and give the model a way out (for example respond with not found) to reduce hallucinations.
Last updated: August 2026

7.1 Custom Prompts for Advanced Responses

Quick Answer: Author a custom prompt in the prompt builder (instructions + inputs + model settings), then use it as an agent tool, a topic prompt node, or a Run a prompt step in an agent flow. Bind conversation variables into inputs, choose temperature and model (managed or Azure AI Foundry), test with sample data, and map the prediction output into messages or later nodes.

AB-620 Domain 1 leaf skill Configure advanced agent responses with custom prompts sits after basic topic wiring and before generative-answers-only patterns. Microsoft expects you to know when a dedicated prompt beats a free-form generative answer, where to place the prompt, and how model settings change behavior.

What a custom prompt is in Copilot Studio

A custom prompt is a reusable instruction package for a generative model. Unlike a Message node (static or lightly templated text) or a pure generative answers node (search-then-summarize knowledge), a prompt is an explicit task contract: rewrite this ticket summary, extract fields from email text, classify intent into a closed list, generate a compliant email draft from case variables, or score a policy excerpt against a checklist.

Prompt builder prompts run on models powered by Azure OpenAI Service and Azure AI Foundry. Capability availability is region-limited and can hit usage or capacity throttling—exam scenarios sometimes mention region readiness as a deployment constraint.

You can add prompts at three surfaces:

PlacementHow you add itBest for
Agent-level toolTools → New tool → PromptGenerative orchestration can select the prompt from natural language when the description is strong
Topic prompt nodeTopic canvas → Add a tool → New prompt (or existing)Deterministic sequencing after questions, conditions, or adaptive cards
Agent flowFlows → AI capabilities → Run a promptMulti-step automation that needs AI mid-flow before Respond to the agent

Anonymous (no authentication) agents cannot use Dataverse tables as knowledge inside the prompt, but they can still use input parameters, model selection, and temperature.

Authoring in the prompt builder

Open the custom prompt editor when you create a new prompt tool or node. You can write instructions manually, ask Copilot to draft instructions from a description, or start from a prompt library template.

Configure these axes:

  1. Instructions — the system-style task description for the model.
  2. User inputs — named parameters (text, images, documents) you pass at runtime from variables.
  3. Knowledge — optional Dataverse table grounding when auth and environment allow.
  4. Model — managed catalog model or a connected Foundry deployment.
  5. Settings — temperature, record retrieval count, include links, code interpreter, content moderation (managed models).
  6. Output formatting — how the completion is shaped for downstream use.

Test with sample input values before you wire the topic. The editor runs the prompt and shows the generated response so you can tighten instructions without publishing the whole agent each time.

Best practices Microsoft documents for prompt instructions

  • Be specific — vague goals produce vague answers; name the output shape and audience.
  • Use examples — show one or two ideal input→output pairs when classification or extraction is brittle.
  • Keep it simple — avoid nested policies that fight each other.
  • Keep it brief — very long instructions increase latency and timeout risk.
  • Give the agent a way out — e.g., “If the answer is not in the input, respond exactly with NOT_FOUND.” That alternative path reduces invented facts.
  • Test and refine — treat prompts like code: sample edge cases, then adjust.

Variables in prompts

Inputs are the bridge from conversation state into the model. Typical bindings:

Input nameBound fromExample use
CustomerQuestionSystem.Activity.Text or a topic question variableFree-form user ask
CaseSummaryTopic variable filled by adaptive card or earlier nodeStructured facts for rewrite
PolicySnippetOutput of HTTP or knowledge stepConstrained rewriting against approved text
ScreenshotImage input typeVision-capable models only

At runtime the topic node maps each input, then exposes outputs such as the prediction text for Message nodes, conditions, or tools. Under generative orchestration, agent-level prompt tools also receive AI-filled inputs when the planner decides to call the tool—so input descriptions matter as much as the instruction body.

Temperature, moderation, and completion behavior

In prompt builder Settings (⋯ → Settings):

SettingRange / optionsExam takeaway
Temperature0–1 slider0 → predictable, conservative; 1 → more diverse/creative; default 0
Record retrievalCount of knowledge recordsControls how much grounded table context is pulled
Include linksOn/offCitations for retrieved records when enabled
Code interpreterOn/offGenerate and execute code for calculation-style prompts
Content moderationLow → High (managed models)Higher = stricter harm filter, fewer answers; default often Moderate

Temperature is unavailable for some reasoning models (for example GPT-5 reasoning)—the slider disables. Content moderation sliders apply to managed models; they are unavailable for Anthropic or Azure AI Foundry models you connect yourself.

Use low temperature for extraction, classification, and compliance rewrites. Use higher temperature only when the business goal is creative drafting and a human or later validation step will review output.

To control what the user sees after a prompt tool runs, use the prompt’s Completion behavior (for example send a specific response using the prediction output variable) so agent-level moderation does not silently drop a crafted message path when you intentionally own the response text.

Model selection and Azure AI Foundry

Managed models in the catalog cover mini, general, and deep (reasoning) categories with different speed, cost (Copilot Credits), and context characteristics. Choose mini for short classification/summarization, general for complex multimodal drafting, and deep models when multi-step reasoning is the product requirement—not for every ticket rewrite.

Bring your own model (Azure AI Foundry) is an AB-620-relevant extension path (also called out in Domain 2 skills for Foundry catalog usage):

  1. In the prompt’s Model dropdown, select + to connect a Foundry model.
  2. Enter Model deployment name and Base model name exactly as in Azure AI Foundry.
  3. Use a chat completion endpoint URL ending in /chat/completions. Responses API endpoints (/openai/v1/responses) fail with resource-not-found style errors.
  4. Select the connected model so every run of that prompt uses it.

Foundry connections are governed as Power Platform connectors (policy name includes Azure AI Foundry). Image/document inputs filter the model list to multimodal-capable deployments. GPT-5 family models have had specific support limitations for BYOM—verify current platform notes if an exam vignette mentions unsupported model families.

Scenario: policy-compliant case summary

Contoso support must turn messy chat transcripts into a three-bullet case summary for CRM, never inventing SLA numbers. The maker builds a topic that collects the transcript (or uses System.Activity.Text), runs a custom prompt with temperature 0, instructions that force bullet format and NOT_FOUND for missing SLA data, and maps the output into a Message node plus a Dataverse update tool. An agent-level prompt tool with a rich description can also serve generative orchestration for “summarize this case,” but the topic node is preferred when the process always runs after identity verification.

Custom prompt vs generative answers vs Message nodes

NeedPrefer
Fixed wording / legal disclaimerMessage node (or Adaptive Card)
Answer from enterprise knowledge with citationsGenerative answers node + knowledge sources
Transform, classify, extract, or rewrite with a fixed instruction templateCustom prompt
Multi-step automation with AI in the middleAgent flow Run a prompt

Success checklist

  • Prompt instructions specific, brief, with a failure path.
  • Inputs bound to real variables; sample-tested in the editor.
  • Temperature matches task risk (usually low for enterprise agents).
  • Model choice justified (managed vs Foundry chat completions).
  • Placement matches orchestration: topic node for sequence, tool for planner discovery, flow for automation.
  • Output captured and used—never fire-and-forget without a conversation result.

Mastering custom prompts gives you precise generative control inside topics—the advanced response skill AB-620 tests alongside knowledge and HTTP patterns.

Test Your Knowledge

Where can you add a custom prompt so an agent uses it for advanced responses?

A
B
C
D
Test Your Knowledge

A maker needs deterministic field extraction from customer emails with minimal creative variation. Which temperature setting best matches that goal?

A
B
C
D
Test Your Knowledge

When connecting an Azure AI Foundry model to a Copilot Studio prompt, which endpoint requirement avoids a common connection failure?

A
B
C
D