Lesson 5 of 5 Copilot Studio Agent Design

Designing Prompt Actions in Copilot Studio

This lesson explains how to design reusable prompts with inputs, models and structured outputs.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe what a prompt is in Copilot Studio.
  • Explain guidelines for designing prompts.
  • Choose between a prompt and nearby components.

What a prompt is in Copilot Studio

A prompt in Copilot Studio is a configured instruction to an Azure OpenAI or Foundry model, built with the prompt builder. It has instructions with placeholders for inputs, a chosen chat model and temperature, and optional settings for knowledge retrieval (including data from Dataverse tables), links in responses, code interpreter, reasoning and output formatting. Inputs can be text and images supplied by the user or by the calling component. A prompt can be added to an agent as a tool, used as a node in a topic, or run as a step in an agent flow.

Prompts give makers a controlled, reusable way to perform a language task, such as summarizing a case, classifying an email, extracting fields from a description or drafting a reply. Unlike the agent's free conversation, a prompt has a fixed instruction and defined inputs, so its behaviour is easier to test and its output easier to consume.

Design guidelines

Designing a prompt applies the prompt engineering principles directly.

  • One task per prompt: a prompt that classifies and also drafts a reply is harder to test than two prompts.
  • Explicit inputs: name and describe each input, and say in the instructions how to use it.
  • Fixed output format: structured output, such as a set of named fields, lets flows and topics use the result without parsing free text.
  • Low temperature for consistency: classification and extraction need repeatable answers; drafting may tolerate more variety.
  • Grounding when facts matter: enable knowledge or Dataverse retrieval and instruct the model to use only that data.
  • Model choice: a smaller model for simple, high-volume tasks, a more capable or reasoning model for complex analysis.

Prompts run on models that are limited to specific regions and may face throttling, and they have their own content moderation setting. The design should account for these constraints and test prompts with realistic inputs, including unusual and adversarial ones.

Where prompts fit

Prompts are one of several ways to bring language capability into a solution. The following table compares them with nearby options.

NeedRecommended component
Classify or summarize text as one step in a deterministic processPrompt in an agent flow
Answer open questions from documents in a conversationKnowledge sources with generative answers
Extract fields from a scanned formDocument processing in AI Builder or Document Intelligence
Plan multi-step work across toolsGenerative orchestration of the agent

Because prompts are stored in Dataverse, they are included in solutions and managed with ALM, and they can be reused across agents, apps and flows from the AI hub.

Worked example

Classifying inbound emails

A logistics company's agent flow processes 8,000 customer emails a day. Each email must be classified into one of six categories with an urgency level, and the flow then routes it. A maker currently asks the agent itself to classify each email, and results are inconsistent. What should you recommend?

Classification is a single language step inside a deterministic process, so a prompt run from the agent flow is more suitable than the agent's open conversation. The prompt should have the email text as its input, list the six categories and their definitions with an example of each, require a structured output with a category field and an urgency field, and use a low temperature. Because volume is high and the task is simple, a smaller model should be tested first. The prompt is validated on a labelled sample of emails before it replaces the current approach.

Check yourself

Why use a low temperature for a classification prompt?

Show answer

Classification needs repeatable answers, and a low temperature makes the model's output more consistent for the same input.

Exam Tips

Remember for the exam

  • A prompt is a reusable model instruction with inputs, model choice and optional knowledge.
  • Prompts can be agent tools, topic nodes or agent flow steps.
  • Use one task per prompt, explicit inputs, structured output and low temperature for consistency.
  • Prompts are stored in Dataverse, move in solutions and are reused from the AI hub.