Executing Custom Prompts in Canvas Apps
Short answer
BC Invoke the prompt directly from app logic and pass user input as parameters to the prompt.
Question
The company requires the following functionality built into the prompt:
Generate the summary immediately when the agent selects a button in the app.
Supply current user-entered data to the prompt.
You need to execute the prompt.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
Key Takeaways
The question tests the difference between using native canvas functions versus cloud flows for AI prompt execution, highlighting that direct invocation with parameter passing is the standard method for immediate UI-triggered actions.
Learn how to execute custom AI prompts in Microsoft Power Platform canvas apps by invoking them directly via app logic and passing user input as parameters.
Common mistake: Candidates often select Cloud Flows (A) because they associate 'automation' with flows. However, for immediate, button-triggered actions within a canvas app that require passing screen-level controls as inputs, direct app logic invocation is the intended and more efficient pattern.
Expert Analysis
This scenario involves integrating AI capabilities into a canvas app using custom prompts. To execute a prompt and supply it with data, you must leverage the specific integration features provided by Power Platform for canvas apps.
First, regarding how to invoke the prompt, Canvas Apps support direct integration with AI Builder prompts via the AI.Prompt function. This allows developers to call the prompt logic directly from the app's control properties (such as the OnSelect property of a button) or through variables. This eliminates the need for an intermediary cloud flow for simple execution, making option C correct. Option A is incorrect because while cloud flows can trigger prompts, the requirement is to generate the summary "immediately when the agent selects a button" within the app context, which is best handled natively in the canvas app logic for responsiveness and simplicity.
Second, regarding supplying user-entered data, custom prompts require inputs to be mapped to parameters defined in the prompt configuration. In a canvas app, you pass the current user input (e.g., text from a text box) as arguments/parameters to the AI.Prompt function. This ensures the dynamic data entered by the agent is sent to the AI model for summarization. Therefore, option B is correct.
Options D and E are administrative or configuration steps that do not directly constitute the action of executing the prompt with user data in this context. Publishing is a lifecycle step, and updating app settings does not inherently execute the prompt.
Exam Strategy
When designing canvas app solutions involving AI, distinguish between complex background processes and immediate UI interactions. For immediate responses triggered by user controls like buttons, prioritize native canvas functions (like AI.Prompt) over delegating to cloud flows unless there is a specific need for server-side processing or external connectors not supported in the client.
Frequently Asked Questions
Can I use a cloud flow to trigger a prompt in a canvas app?
How do I send data from a text box to a custom prompt?
Discussion 1 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 1
-
exam_upskill 👍 1B. Pass user input as parameters to the prompt. C. Invoke the prompt directly from app logic.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.