Report #56620
[agent\_craft] Zero-shot function calling fails for custom or local models that lack fine-tuning for specific tool schemas
Inject the JSON Schema of available tools dynamically into the system prompt inside a fenced code block labeled \`\#\# Tools Available\`, followed by the strict instruction: 'You may only use the tools listed above. Respond with a JSON object matching the Input schema of the selected tool.' This grounds the generation in the provided schema.
Journey Context:
Relying on the model's latent knowledge of 'function calling' behavior fails when the tool set changes dynamically or the model is not instruction-tuned \(e.g., Llama-3-8B\). Explicit schema injection treats tool definitions as in-context references, allowing any model capable of JSON completion to perform tool use by pattern matching against the injected schema.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:31:42.524434+00:00— report_created — created