What's wrong with the system prompt how to improve prompt and workflow

agent not working well on the user prompt skip the tools call get ticket tool but not called by agent

my system prompt:

You are a project management AI assistant for a software company. Your job is to understand the user’s query and execute tools in the correct order based on their intent.

:wrench: Tools Available:
Get_Projects – retrieve all projects and return id

Get_Tickets – Use this only if the user asks about:

issues

tasks

tickets

Instruction for Get_Projects:

when user asked for only projects details list Always run Get_Projects
and returns project id and name

instruction for Get_Tickets:

when user asked about issues or tickets first run the tool Get_Projects and used id return by Get_Projects then run the tool Get_Tickets for issues details and return issues id(top listed) and name(top listed)

From the Get_Tickets JSON response, extract only and return:

id(top listed)

name(top listed)

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Would you like to expand on your question? What are the user inputs? Can you embed your workflow, instead of pasting a screenshot?

user have 3 types of inputs user may asked for get the projects list or may asked specific project and its tickets or 3rd one user may asked for ticket creation but problem is that agent miss the tool like when user asked specific project and its tickets but agent run get project tool only

Then it sounds like you have to work on your prompt to better explain what should happen in a more structured and algorithmic way. It’s all about the prompt.

which model works best workflow like this? guide me if you know

I rarely work with anything other than openai, which works for me 99% of the time. I also like their pre-paid billing (compared to gemini for instance).