A code app must answer employees' free-text questions about HR policies. The HR team already maintains a published Copilot Studio agent grounded on those policy documents and updates its knowledge sources regularly. What is the best approach for the developer?
Select an answer to reveal the explanation.
Short Explanation
Why reinvent the wheel when HR already built and maintains a good one? Call their published agent from your app and you inherit every knowledge update they make. The trap is rebuilding language handling in your bundle that goes stale the moment HR edits a policy.
Full Explanation
When an organization already maintains a Copilot Studio agent grounded on the right knowledge, the code app's job is to consume it rather than replicate it. Through the Microsoft Copilot Studio connector, the app sends the employee's question to the published agent and displays the response, while the HR team keeps ownership of knowledge sources, topics and updates. This keeps a single source of truth for policy answers and separates the app's user experience from agent maintenance. Bundling policy PDFs with keyword search produces poor answers to free-text questions and ships documents that become outdated as soon as HR revises them. A new prompt sent to a model endpoint with fetch duplicates the agent, is blocked by the default connect-src policy, and moves grounding, safety and maintenance into the app team's code. Converting the agent's topics into a React decision tree discards generative answers over knowledge sources and creates a second copy of the logic that must be kept in sync by hand. Exam caveat: deterministic logic belongs in code or rules where a fixed outcome is required, but open-ended policy questions suit an agent. Operational check: call the agent with a known policy question, compare the reply with the source document, and confirm a knowledge update is reflected without redeploying the app.