← AI Agents & RAG learning path
AI Agents & RAG · Module 6 of 10

Tool use and function calling

Let LLMs call APIs and functions to act.

📖 Key ideas

  1. Function/tool calling lets the model request a defined function with arguments.
  2. Your code runs the tool and returns results to the model.
  3. Tools: search, calculator, database query, send email.
  4. Describe tools clearly with names, descriptions and JSON schemas.
  5. Validate arguments and require confirmation for risky actions.
💡 Real-life example: Tool calling is the model asking an assistant: "please check the train timetable and tell me".
Tool callingModel requests a function call
JSON schemaDescribes tool parameters
Tool resultOutput returned to the model
Confirmation stepHuman approval for risky actions