I am trying to build a coding agent using langgraph. I am currently developing a graph that try to understand the user query and gather the requirement by asking question to user. Currently sometime the llm uses my ‘askUserTool‘ but many times it does not uses the tool and simply frame the question in the response.
My Code is on this github repo: GitHub - ashishkujoy/ai-coding-agent
graph code: ai-coding-agent/src/nodes/requirementGatherer.ts at main · ashishkujoy/ai-coding-agent · GitHub
And the system prompt i am using is here.: ai-coding-agent/src/prompts/requirement-gathering.ts at main · ashishkujoy/ai-coding-agent · GitHub
Output gist: AI coding agent output · GitHub
Kindly someone please help me understand the issue with the prompt or how i am creating graph.