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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / How can we add any pre...
Copilot Studio
Suggested Answer

How can we add any predefined prefix text in question

(1) ShareShare
ReportReport
Posted on by 101
Hello,
 
 
I've integrated OpenAI datasource in "Conversational Boosting" topic > Create generative answers step. (Refer below snaps)
If user enter question accordingly it's fetching response using OpenAI search(Connected with SQL data source) and it's working fine.
 
Now the thing is that agent which I created is specific to host user that mean when user enter any question I would like to add prefix text "All data must be for host HostFirsName HostLastName".
So questions is like "Give me name of property which contain name Villa." then while passing to datasource from backend would like to add prefix and it should
pass text "All data must be for host Charlotte Stripe. Give me name of property which contain name Villa."
 
Note: In chat interface I do not would like to display prefix text. This is only for purpose to get data specific to user only.
 
Thanks
 
 
Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at
    Hello,
    As far as I know you can't capture the Activity.Text and modify it before sending to Azure OpenAI. Instead of using this approach, I would create a Power Automate flow that calls (using HTTP action) OpenAI REST API, modifying the text and adding the prefix text. Then you would capture the result and show it in the agent.
    In this excellent article you can get an idea on how to use Power Automate and HTTP actions to call Azure OpenAI REST endpoint: https://www.karlex.fi/call-openai-rest-api-with-custom-index-and-prompt-with-power-automate/
     
    Hope it helps!
    Ferran
     
     
  • Suggested answer
    Vinoth Selvam Profile Picture
    1,590 Super User 2025 Season 2 on at
     
    Since you mention that you only need to add the same prefix to whatever question user is asking, means you will be able to fetch and append the Activity.Text before sending it to Generative answers node.

    Anyhow currently you will not be able to use some direct formula in variables to append the text. But i suggest you can call a Action first and use a custom prompt or plugin or even a  simple Power automate to do the append functionality.

    The only difficulty is that, if u are using multiple topics that can trigger for different scenarios, then you might need to append the same steps in each topics seperately.
     
    You can also follow the below approach suggested by fchopo , if you wanted to use the Power Automate Approach.
     
    Thanks.

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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 261 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard