web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / How can I make my Copi...
Copilot Studio
Suggested Answer

How can I make my Copilot Studio Agent give consistent response?

(1) ShareShare
ReportReport
Posted on by 2
I’m building a Copilot Studio agent that fetches meetings from the user’s Outlook calendar and then calculates:
 
1. total meetings for today
2. conflicts (overlapping meetings)
3. back‑to‑back meeting blocks
4. focus time inside office hours (9 AM–6 PM)
 
Even though I’ve given detailed instructions in the system prompt, the agent sometimes gives different answers for the same email calander, especially when calculating overlapping meetings or partial overlaps inside office hours.

My questions are:
1. How can I make the agent produce consistent, deterministic results every time?
2. Is there a recommended way to structure prompts so the agent always counts meetings, conflicts, and overlaps correctly?
I have the same question (0)
  • lbendlin Profile Picture
    8,716 Super User 2026 Season 1 on at
    Copilot (and any other LLM based tool) is probabilistic by design.  There is absolutely no guarantee that you will get consistent responses. If you need consistency, use a programming language.
  • Suggested answer
    DP_Prabh Profile Picture
    381 on at

    In Microsoft Copilot Studio, inconsistent results happen because the LLM performs probabilistic reasoning, so calculations like overlaps can vary. How to get deterministic results

    Move the calculation logic to a tool/action (Power Automate flow or API) instead of doing it in the prompt.
    Let the tool compute: 

    • total meetings
    • conflicts
    • back-to-back blocks
    • focus time

    The agent should only display the results, not calculate them. How to improve prompt consistency (if logic stays in the agent)

    • Pass meetings as structured data (JSON).
    • Define exact rules for overlaps (e.g., startB < endA AND endB > startA).
    • Provide step-by-step instructions (sort meetings → check overlaps → compute time in minutes).
    • Require a fixed output format.

    Best practice: Use a Power Automate / tool for calculations and keep the agent responsible only for summarizing results.

    I hope this works for you!

  • Assisted by AI
    Prasad-MSFT Profile Picture
    Microsoft Employee on at
    1. How to Make the Agent Produce Consistent, Deterministic Results
    Preprocess Data:
    Instead of letting the agent interpret raw calendar data, preprocess the Outlook events in your workflow (Power Automate, code, or a pre-step) to:
    Sort meetings by start time.
    Normalize time zones.
    Filter only today’s meetings before passing to the agent.
    Use Structured Input:
    Pass meetings as a structured list (e.g., JSON array with start/end times) rather than free text. This reduces ambiguity.
    Explicit Instructions:
    In your system prompt, specify:
    “Do not guess. Only use the provided meeting data.”
    “Always use 24-hour time format.”
    “If two meetings overlap by even one minute, count as a conflict.”
    Set Temperature to 0:
    If you have control over model parameters, set temperature to 0 for maximum determinism.
     
    2. Recommended Prompt Structure for Accurate Counting
    Prompt Example:
    You are a scheduling assistant. Given a list of meetings for today, perform the following:
    1. Count the total number of meetings.
    2. Identify all pairs of meetings that overlap (even partially).
    3. Identify blocks of back-to-back meetings (where one ends and the next starts within 5 minutes).
    4. Calculate total focus time between 09:00 and 18:00 that is not occupied by meetings.
    Rules:
    - Meetings are provided as a JSON array with start and end times in ISO 8601 format.
    - Only use the provided data. Do not infer or guess.
    - For overlaps, if any part of two meetings overlap, count as a conflict.
    - For focus time, subtract all meeting times from the 09:00–18:00 window.
    Meetings:
    {{meetings_json}}
    Return your answer as a JSON object with keys: total_meetings, conflicts, back_to_back_blocks, focus_time_minutes.
    Tips:
    Use clear, step-by-step instructions.
    Define what counts as “overlap” and “back-to-back.”
    Ask for output in a structured format (JSON) to avoid ambiguity.
     
    3. Additional Tips
    Test with Edge Cases:
    Include test data with overlapping, adjacent, and partial meetings to validate the agent’s logic.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 277

#2
11manish Profile Picture

11manish 206

#3
sannavajjala87 Profile Picture

sannavajjala87 156 Super User 2026 Season 1

Last 30 days Overall leaderboard