Sahaj.blogs

Day page

21 Aug 2026

Study

Agentic AI · Tool and function calling

Structured tool calling with a real local model: Python functions become JSON schemas, Qwen2.5-0.5B-Instruct emits tool calls through its chat template, and the app parses and executes them, including one wrong call.

  • The model never runs code: it emits a structured request (tool name plus JSON arguments) that the application validates and executes.
  • A small model picked the right tool for maths and weather, but also called the weather tool for a question that needed no tool.

Read the post →