Implement generative AI and agentic solutions 2.2 Build agents by using Foundry
An HR agent is connected to a Foundry IQ knowledge base through the…
Study guide skill: Integrate agent tools, including APIs, knowledge stores, search, content understanding, and custom functions
Question B2-013
An HR agent is connected to a Foundry IQ knowledge base through the knowledge_base_retrieve MCP tool, and the connection and roles are correct. Testing shows that the agent often answers from its own training data without calling the knowledge base. What should you change first?
Select one answer.
Answer: D
Missing tool invocation in the agent instructions is a common reason an agent doesn't return knowledge base results. Explicit directives make the agent consistently call the knowledge base tool rather than relying on its training data, and asking for citations makes answers easy to verify. Reasoning effort only affects retrieval once the tool is called, approvals add friction, and token limits don't change tool selection.
Deep dive
How it works
When an agent with a working knowledge base connection still answers from its own training data, the problem is usually the instructions, not the plumbing. The Foundry IQ FAQ lists missing tool invocation in agent instructions as a common reason an agent isn't returning knowledge base results, next to permission issues, a wrong project connection, and empty knowledge sources. Connections and roles are already ruled out here.
The connection guide gives a starting template for the instructions:
- Use the knowledge base tool to answer user questions.
- If the knowledge base doesn't contain the answer, respond with "I don't know".
- When you use information from the knowledge base, include citations to the retrieved sources.
The guide explains what this buys you. Explicit directives make the agent consistently call the knowledge base tool rather than rely on its training data, and citations make it easy to check where information came from. Treat the template as a baseline: evaluate and iterate on variations for your own scenario.
The other options, and when you'd use them
- Increase max_output_tokens: Output length isn't the issue. What makes the agent call the tool consistently is explicit directives in the instructions.
- Raise retrieval reasoning effort to medium: Reasoning effort controls how retrieval runs once the tool is called, for example iterative search at medium. It can't help if the tool isn't called.
- require_approval set to always: Approval adds a human gate on each call; the connection guide's own samples use never with the knowledge_base_retrieve tool. Approvals don't make the agent choose the tool more often.
Exam tip
Agent ignores a correctly connected knowledge base = fix the instructions: require the KB tool, cite sources, say "I don't know" when the KB has no answer.
References
Last reviewed: