cd /news/ai-agents/teaching-local-models-to-call-tools-… · home › topics › ai-agents › article
[ARTICLE · art-142442] src=loomcycle.dev ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Teaching local models to call tools they were not trained for

A local model in the coder configuration running in stateful mode matched the cloud ceiling on loomcycle v1.100.0, hitting 10 out of 10 tasks, after two failed attempts to teach small local models to call tools they were not trained for. The third attempt inlined schema and a worked example into the error body and changed stateful context mode to keep the failing call and help response together in the next turn's memo; local ornith-1.5:35b rose from 8 to 10, while cloud deepseek-v4-flash saw input tokens fall 38 percent and tool calls fall 55 percent between arms. Append-mode misses were qwen3.6 at 9 YES and 1 PARTIAL, and gpt-oss at 8 YES and 2 NO, with prior ornith failures having been 600-second timeouts on repeated help fetches.

by read2 min views11 publishedSep 28, 2026

A service agent in our runtime failed its first tool call on every run. Then it spent 1,937 output tokens reasoning about which tools it thought it didn't have, and invented two tools that exist nowhere in the codebase. The prompt named a tool in lowercase against an exact-match dispatch; the specific bug was one line. The story is what happened next, because small local models kept doing versions of the same thing. Three attempts, only the third worked. Attempt 1 was to inject a compact tool-usage guide into the system prompt; result, qwen3.6 on Ollama emitted its tool calls as prose wrapped in the same tags our reference block used to demonstrate a tool response, copying the FORMAT of the injected help as its own tool-call format; bundle default reverted. Attempt 2 was 159 proper per-operation help articles plus a failed-call pointer to the right article; narrowed the gap. Attempt 3 (the one that worked) was two changes together: put the help INSIDE the error itself (schema and one worked example inlined into the error body), and change stateful context mode to keep the failing call and the help response together in the next turn's memo. Benchmark on loomcycle v1.100.0: four models, ten tasks each. Both stateful models hit 10 out of 10: cloud deepseek-v4-flash and local ornith-1.5:35b. Ornith went from 8 in the prior arm to 10; both prior failures had been 600-second timeouts on repeated help fetches. Deepseek input tokens fell 38 percent and tool calls fell 55 percent between the two arms. Append-mode misses: qwen3.6 9 YES 1 PARTIAL, gpt-oss 8 YES 2 NO. On the tasks this benchmark tests, a local model in the coder configuration running in stateful mode matched the cloud ceiling. Also folded in: the three shapes for the same feature that failed (imperative prompt taking accuracy to 0.0034 at 1.0 abstention, injected reference block getting copied, optional tools ignored 214 / 7 / 17 across deepseek / qwen / ornith), plus the two follow-on fixes for gaps this arm found (id ending in U+FFFD; duplicate-document create). Opens the September through October retrieval-quality arc that the documents-indexing and memory-retrieval posts complete.

── more in #ai-agents 4 stories · sorted by recency
── more on @ollama 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/teaching-local-model…] indexed:0 read:2min 2026-09-28 · —