Implement generative AI and agentic solutions 2.2 Build agents by using Foundry
A prompt agent has File Search over internal policy documents and Web Search.
Study guide skill: Define agent roles, goals, conversation-tracking approach, and tool schemas
Question B6-021
A prompt agent has File Search over internal policy documents and Web Search. For questions about internal policies, it often uses Web Search instead of File Search. What should you add first?
Select one answer.
Answer: C
When tools overlap, the guidance is to add a decision rule to the instructions and to tell the model what each tool is for. tool_choice none stops the model from calling tools, and auto leaves the decision to the model, which is the behavior you're trying to correct. Removing tool descriptions works against the guidance.
Deep dive
How it works
The agent has two tools that overlap: both can answer a "what's our policy on X" question. Microsoft's tool guidance covers this case directly: if you have multiple tools that overlap, add a decision rule to the instructions. Its example is almost word for word the fix here: "Use File Search before Web Search for internal content."
The same guidance says to tell the model what each tool is for, and to describe in the agent instructions what each tool is for and when to use it. A decision rule plus clear tool descriptions is the first, cheapest fix.
tool_choice is the more forceful lever. Microsoft calls it the most deterministic control over tool calling, and if you need deterministic behavior you set it to required. But its values work per request:
auto: the model decides whether to call tools.none: the model doesn't call tools.
Neither one says File Search should beat Web Search for internal questions.
The other options, and when you'd use them
- Shorter instructions without tool purposes: That removes the guidance the model needs. Microsoft says to tell the model what each tool is for.
- tool_choice auto: With
autothe model decides, and that's where the wrong choice comes from. - tool_choice none: The model wouldn't call any tool, including File Search.
Exam tip
Overlapping tools = decision rule in the instructions, plus what each tool is for. auto = model decides; none = no tools; required = must call.
References
Last reviewed: