Why AI Agent connected to a google sheets (knowledge base) skips it and just answer random

Hello My AI Agent is constantly skipping knowledge base stored in google sheets it answers randomly interestingly when i ask in chat to use google sheets only than answer is correct please advise what to so . Some where i have seen this but how to do it Please help i am new to n8n thanks

  1. Force Google Sheets data to AI prompt — instead of letting AI decide when to use the sheet, always inject the KB text into its system prompt.
  2. Retry Mechanism — If Node’s “No” branch can loop back to the Google Sheets fetch step and re-run the AI step.

Hey @Dr_Shabbir_hussain hope all is good and welcome to the community.

If AI agent is doing something (or in your case not doing something) it is 9 times out of 10 is because of the system prompt it gets. AI is smart, but it still needs guidance on how to carry out the tasks we want it to. If your AI Agent doesn’t call a tool - tell it about the tool and build some explanations/logic around how and when to use it. Use constructs like “always use tool X to…”, “never try to answer on your own” etc.