Skip to main content
AI ArchitectureIntermediate

What is Function Calling / Tool Use in LLMs?

Function calling lets LLMs trigger external actions — searching the web, running code, querying databases — by outputting structured JSON that your application executes.

TL;DR: Function calling lets LLMs trigger external actions — searching the web, running code, querying databases — by outputting structured JSON that your application executes.

The Core Idea

Without function calling, LLMs only output text. With it, the model can pause its response, output a structured JSON call like {"function": "search", "args": {"query": "latest AI news"}}, your code executes the function and returns the result, and the model continues with that real data.

function callingtool usestructured outputJSON
Sponsored

Ad served by Adsterra. OpenAIToolsHub is not responsible for advertiser content.