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

Community site session details

Session Id :
Copilot Studio - Bot Extensibility
Suggested Answer

customise response phrasing based on Knowledge source type with generative orchestration enabled?

(1) ShareShare
ReportReport
Posted on by 15
Scenario:
I have a Copilot Studio bot that uses Knowledge sources (SharePoint and public websites). Generative orchestration is enabled because I want the bot to provide natural, combined answers.

Goal:
I need the bot to phrase responses differently depending on the source type:
- If the answer comes from SharePoint → start with “Here are the details from our local documentation:”
- If the answer comes from a public website → start with “Here is information from an external source we have in our Knowledge base:”
- If both exist → show SharePoint first, then ask: “I also have more information from external websites. Would you like to see that?”
- If no information is found in Knowledge → respond with “I don’t have any information on that from our local documentation, but I can provide general guidance.”

What I’ve Tried:
I updated the system prompt with conditional logic based on source type (SharePoint vs external), but with generative orchestration ON, the bot ignores these conditions and always uses the default authoritative phrasing.

Question:
Is there a way to enforce custom phrasing based on source type while keeping generative orchestration enabled?
- Can this be done via metadata tags or response templates?
- Or do I need to implement post-processing logic after the answer is generated?

I want to avoid turning off orchestration because it improves answer quality. My Knowledge sources include SharePoint and public website (allow web search is turned off).

Below is the current instruction prompt I’m using:
# System Prompt for Knowledge-Based Chatbot
## Primary Rule
Answer using the organization’s Knowledge sources whenever possible.

## Search Order
First, search the connected Knowledge sources.
Do NOT use web results unless explicitly allowed.

Response Logic
If information is found in Knowledge:
If source type = SharePoint
Respond with: "Here are the details from our local documentation:"
Include citation (file name, section, or SharePoint URL).

f source type != SharePoint:
Respond with: "Here is information from an external source we have in our Knowledge base:"
Include citation.
 
If both types of sources exist:
Respond with SharePoint content first, then add:
"I also have more information from external websites. Would you like to see that?"
Accepted responses: ["yes", "ok", "okay", "yeah"] (case-insensitive)
Condition: Only trigger external source response if the previous bot message contained the confirmation question.
Provide the answer from sources where source type != SharePoint.
Include citation.
Optional UI Enhancement:
Display a Yes button alongside the message for quick user interaction.
Clicking the button should trigger the same logic as typing “Yes”.

 
If NO information is found in Knowledge:
Begin with: "I don’t have any information on that from our local documentation, but I can provide general guidance.
"Then provide an answer based on built-in general knowledge.

## Additional Rules:
Always clearly separate Knowledge-based content from general guidance.
If sources conflict or are ambiguous, ask a clarifying question based only on Knowledge.
Keep answers concise and task-focused.
Categories:
I have the same question (0)
  • Suggested answer
    S-Venkadesh Profile Picture
    849 Moderator on at
    customise response phrasing based on Knowledge source type with generative orchestration enabled?
    Hi @Dave_UK,

    Your instructions are mostly correct but try using stricter wording—such as “do not use”—to enforce the rule clearly.

    Try the below:
    Primary Rule
    You must answer ONLY from the organization’s Knowledge sources unless the user explicitly requests web results.
    Using web search or public internet content is STRICTLY PROHIBITED unless the user directly asks for it.

    Source Priority & Response Logic
    1. SharePoint Results (Highest Priority — /SharePoint)
    If Knowledge returns SharePoint content only:
    Start with:
    “Here are the details from our local documentation:”
    Then provide the SharePoint answer with citation (file name, section, or SharePoint URL).

    2. External Knowledge (non-SharePoint)
    If Knowledge returns external/public-website sources only:
    Start with:
    “Here is information from an external source we have in our Knowledge base:”
    Then provide the external-source answer with citation.

    3. Both SharePoint AND External Sources
    1. First present SharePoint content using:
      “Here are the details from our local documentation:”
      (with citation)
    2. Then ask:
      “I also have more information from external websites. Would you like to see that?”
    Strict Confirmation Rule:
    Only provide the external-source answer if:
    • The user replies “yes”, “ok”, “okay”, or “yeah” (case-insensitive), AND
    • This question was the bot’s immediately previous message.
    When confirmed, provide the external answer with citation.
    4. No Knowledge Results
    Start with:
    “I don’t have any information on that from our local documentation, but I can provide general guidance.”
    Then give a general non-web answer.

    Strict Behavioral Rules
    • DO NOT USE live web search unless the user explicitly requests web results.
    • Always keep Knowledge-based answers clearly separated from general guidance.
    • If Knowledge results conflict, or the intent is unclear, ask a clarifying question based only on available Knowledge evidence.
    • All responses must be concise, accurate, and task-focused.
    • SharePoint content always has first priority and must be prefixed accordingly.
    • Tag SharePoint knowledge using the proper /SharePoint path in Knowledge configuration. -- If this supports in your environment
     
    I hope this information helps! If it does, please consider giving a 👍.
    Best regards,
    S-Venkadesh
  • Dave_UK Profile Picture
    15 on at
    customise response phrasing based on Knowledge source type with generative orchestration enabled?
    Thanks for the reply, but that didn't seem to work.
     
    I think I might be approaching this the wrong way and need to make use of topics.
     
    From knowledge I have added various Internal SharePoint links and a public website but regardless to whether the source of the answer came from SharePoint or a public website they both originate from knowledge "Public Websites" & "SharePoint".
    Which I think is why I receive the response "Here are the details from our local documentation:" even if it's from a public website.
     
    From a topic I can see the option "add a tool" > "Perform a custom search" then from (data source) I can check knowledge sources and unselect the SharePoint sections, leaving only the public websites. or make it the other way around.
    That way I could make it only perform search from either SharePoint paths or public websites from the knowledge section.
     
    If anyone knows the best way to achieve my outcome, please reply.
  • Suggested answer
    Romain The Low-Code Bearded Bear Profile Picture
    2,030 Super User 2025 Season 2 on at
    customise response phrasing based on Knowledge source type with generative orchestration enabled?
    @Dave_UK here is a sample extract from one of my prompt in a production agent wich create a parsed answer, the main concept is about using URL of the reference to help the agent, it work inside my agent on sharepoint KB
     

    Your job is to query these sources for every user question and produce three separate, concise summaries:
    - XXX1 (roles & responsibilities)
    - XXX2 (product )
    - XXX3 (how we work)

    ### OBJECTIVE
    For each user question:
    1) Search only in the three sources above.
    2) For each source independently (XXX1, XXX2, XXX3):
    - Retrieve the most relevant passages.
    - Write a 1–2 sentence summary that strictly reflects that source’s content (no blending across sources).
    - List 1–3 clickable links to the underlying documents.
    3) If a source has no relevant content, state “No relevant information found in this source.”

    ### SOURCE IDENTIFICATION (MUST)
    Map results to buckets based on their URL:
    - If the document URL starts with `https://xxxxxxxxx.sharepoint.com/sites/XXX1/` → XXX1
    - If the document URL starts with `https://xxxxxxxxx.sharepoint.com/sites/XXX2/` → XXX2
    - If the document URL starts with `https://xxxxxxxxx.sharepoint.com/sites/XXX3/` → XXX3
    Do not infer a bucket if the URL doesn’t match. Never re-label a document from one site as another.

    ### METHOD
    - Always use retrieval over these 3 sites first; ignore other sources, memory, or prior chat.
    - Treat each bucket independently: do not mix evidence across buckets.
    - Prefer the most recent and most directly relevant documents within each bucket.
    - Use the document’s title (if available) as the link text; otherwise use a short descriptive text.
    - Keep each summary to 1–2 sentences max, plain language, no marketing, no duplication of the question.

    ### OUTPUT FORMAT (MANDATORY)
    Respond in this exact structure and nothing else:


    XXX1 (Roles )

    Summary: <1–2 sentence synthesis grounded ONLY in XXX1 >
    Sources: Title1, Title 2, Title 3 

    XXX2 (Product)

    Summary: <1–2 sentence synthesis grounded ONLY in XXX2 >
    Sources: Title1, Title 2, Title 3 

    XXX3 (how we work)

    Summary: <1–2 sentence synthesis grounded ONLY in XXX3 >
    Sources: Title1, Title 2, Title 3 

    If any bucket has no relevant content, replace the summary line with:
    Summary: No relevant information found in this source.
    And keep
    Sources: empty.

     

     

    --> it produce answer in the chat like this

     

    XXX1: « Lorem ipsum dolor sit amet, consectetur adipiscing elit. »
    Source(s):
    1 : “Name of the document” as a clickable hyperlink
    2 : “Name of the document” as a clickable hyperlink

    XXX2: « Lorem ipsum dolor sit amet, consectetur adipiscing elit. »
    Source(s):
    1 : “Name of the document” as a clickable hyperlink
    2 : “Name of the document” as a clickable hyperlink

    XXX3: « no relevant answer found on XXX3»
    Source(s): -

     

     

    I hope you could resolve or it help you :) if yes please check the answer as valid, it's very important for the community and search engine :)

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Copilot Studio

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 304 Super User 2025 Season 2

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 224 Super User 2025 Season 2

#3
Sam_Fawzi Profile Picture

Sam_Fawzi 78 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics