Back to feed
Dev.to
Dev.to
8/1/2026
From Software Engineer to AI Engineer Part 3: How LLM tool use and function calling work

From Software Engineer to AI Engineer Part 3: How LLM tool use and function calling work

Original: From Software Engineer to AI Engineer - Part 3: Giving it a hand

Short summary

Part 3 of a series on transitioning from software engineer to AI engineer explains how LLM tool use works: models receive a tool catalog, output structured tool-call requests, and your code executes the function and returns results to the model's context. The post includes a concrete LangChain example building a refund-cost calculator tool that handles processing fees and admin fees. Tools are just regular functions — the engineering is in designing clear descriptions and handling the model's structured outputs.

  • LLM tool use = model outputs structured function calls, your code executes them and returns results to context
  • Tools are ordinary functions with JSON schemas; models learned the request-result pattern during training
  • Concrete example: a LangChain @tool decorator for calculating merchant refund costs with fee structures

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more