mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
[MASTRA-2425] Vector Query Tool and Graph RAG Tool Schema Update (#2956)
This PR enhances the vectorQueryTool and graphRAGTool to improve compatibility with various LLM models. Testing revealed significant inconsistencies in how different Ollama models handle tool calls, with only Qwen2.5, LLama3.1, and LLama3.2 working reliably. This PR does the following: - modifies the inputSchema of both the vectorQueryTool and the graphRAGTool to be more permissive, accomodating models that send input values in certain format. - moves validation logic to the execute function for more flexible parameter handling - Enhanced agent instructions to provide clearer guidance on tool usage Findings: Model-specific quirks were identified that affect tool usage: ollamaMistral: Describes tools instead of using them when filters are enabled ollamaGranite31Dense: Shows inverse behavior, using tools only when filters are enabled ollamaNemotronMini: Uses custom <toolcall> format not recognized by the framework ollamaSmollm2: Calls tools correctly but returns empty responses These changes improve the reliability of our tools when working with various models, though some models will still require custom handling for full compatibility.
This commit is contained in:
parent
5052613309
commit
ff1a76cb5c
5 changed files with 122 additions and 50 deletions
Loading…
Add table
Add a link
Reference in a new issue