QuestionQ122
Implement generative AI and agentic solutionsYou have a Microsoft Foundry project that includes an agent. The agent has a Model Context Protocol (MCP) tool named kbsearch that queries a knowledge base stored in Azure AI Search.
Some agent runs produce answers from the base model without calling the knowledge base, resulting in responses that lack grounded citations.
You are given the following code snippet used to run the agent.

You need to deterministically require the agent to invoke kbsearch on every run.
What should you do?
- A Add the response_format parameter to the create_and_process() method call.
- B Replace create_and_process() method with the create_thread_and_process_run() method.
- C Add the toolset parameter to the create_and_process() method call.
- D Add the tool_choice parameter to the create_and_process() method call.
Community Discussion