Pre-Flight Briefing

Triggering Backend Code

Modern LLMs are trained to detect when a user's request requires an external tool. This is called 'Function Calling' (OpenAI) or 'Tool Use' (Claude).

You provide the LLM with a JSON schema describing the tools available (e.g., `get_flight_status(flight_id)`).

Instead of replying with conversational text, the model intelligently halts and outputs a JSON object containing the exact arguments needed to run that function. Your application runs the code, and passes the result back to the model.

Reference Examples

Model Output (Function Call){ "name": "get_weather", "arguments": { "location": "Tokyo, Japan", "unit": "celsius" } }