Sitemap

Member-only story

Tool Calling in LLMs: AI Engineer Interview Cheat Sheet

AI Engineer Interview Preparation

4 min readJust now

--

Click here for the full AI Engineer Prep list. Read this blog free.

Press enter or click to view image in full size

1. What is Tool Calling (Function Calling) in LLMs and how does it work?

Tool Calling (Function Calling) is a capability that allows an LLM to invoke external functions, APIs, or services to retrieve information or perform actions instead of relying only on its internal knowledge.

The LLM does not execute the function itself. It decides which tool to use and with what arguments. The application executes the tool and returns the result to the LLM, which then generates the final response.

Workflow

User Request
↓
LLM decides a tool is needed
↓
LLM generates tool name + arguments
↓
Application executes the tool
↓
Tool returns result
↓
LLM generates final response

Example: User asks:

“What’s the weather in Boston today?”

The LLM identifies that weather information is external and generates:

{
"tool": "get_weather",
"location": "Boston"
}

--

--

Shahid Kawsar
Shahid Kawsar

Written by Shahid Kawsar

Senior Manager, AI Engineering, San Diego, CA. Join my ML course: https://www.udemy.com/course/ace-ml-interview/