Agent is not answering question which is based on Knowledge base,But i am getting response in Knowledge base

Suraj Panker 15 Reputation points
2026-06-30T08:19:39.01+00:00

User's image

User's image

The agent is not answering questions based on the knowledge base. However, when I query the knowledge base directly, I receive the expected response. It seems the knowledge base is working correctly, but the agent is not retrieving or using its content.

Azure AI Bot Service
Azure AI Bot Service

An Azure service that provides an integrated environment for bot development.


1 answer

Sort by: Most helpful
  1. Christos Panagiotidis 3,546 Reputation points
    2026-07-18T15:33:23.6366667+00:00

    Since the knowledge base answers when tested directly, the index and content are healthy. The failure is likely in the agent-to-knowledge-base connection or authorization. Confirm the agent is connected to the correct knowledge base or toolbox, then save and republish it. For a hosted or published agent, assign its managed identity Search Index Data Reader on the Azure AI Search service; the published agent identity can differ from the project identity. Also verify the search service identity has Cognitive Services User on the Foundry account when the knowledge base uses an LLM.

    Enable agent tracing and inspect the failed turn. If there is no knowledge_base_retrieve tool call, strengthen the agent instructions and knowledge-source description, or set the relevant source to alwaysQuery. If the tool call returns 401/403, fix RBAC. If it returns results but the agent still says “not found,” review retrieval instructions, filters, reasoning effort, and answer-generation instructions.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.