Function calling and the new shape of AI-powered backends
The model became a caller of your API, not just a text generator.
Function calling quietly changed what an AI backend looks like. The model isn't just producing text anymore — it's deciding which of your internal functions to call, with what arguments, based on a conversation. That means your API surface is now something the model reasons about, not just something a frontend calls directly.
Function descriptions are the new documentation
The model only knows what a function does from its name, description and parameter schema — the same information a new engineer would need, except the model can't ask a follow-up question in Slack. Vague descriptions produce wrong function calls, which makes this documentation load-bearing in a way it never was for internal APIs before.
Validate everything, trust nothing
A model-generated function call should be treated like user input: validated, sanitized, and checked against permissions before it executes anything with real side effects. The model's confidence in its own arguments is not a substitute for your system's validation logic.
Design for partial and wrong calls
Models occasionally call the wrong function, or the right function with malformed arguments. A resilient system catches this gracefully — clear error messages the model can act on, rather than a raw stack trace it has no way to interpret — and gives it a path to recover.
- Function descriptions are documentation the model depends on — write them precisely.
- Validate model-generated function calls like any other untrusted input.
- Design clear, actionable errors so the model can recover from a wrong call.
Guardrails: designing for the answer you didn't expect
HAVE A PRODUCT IN MIND?
Tell us what you're building and where you need engineering support.