Function Calling (AI Tool Use)
Function Calling is an architecture where an AI model identifies user intent requiring external actions or live data lookups and generates structured JSON parameters to execute designated webhook tools.
How it works
While standard RAG retrieves static knowledge passages, certain visitor requests (like "Check the shipping status of order #1084" or "Book a table for 4 at 7 PM") require live programmatic interactions.
Developers define available functions with typed JSON Schema specifications. When a conversation requires a tool, the model outputs the structured arguments needed to invoke that function.
The execution can either run in the background (fire-and-forget) or return output back to the model to synthesize into a grounded conversational reply, with optional visitor confirmation dialogs for sensitive actions.
How SiteMind uses it
SiteMind supports Custom Widget Functions with sync and fire-and-forget execution modes, JSON Schema validation, execution audit logs, and customizable in-chat visitor confirmation prompts.
Related terms
Retrieval-Augmented Generation (RAG)
Retrieval-Augmented Generation (RAG) is a method where an AI looks up relevant information from a trusted source before answering, so its replies are grounded in facts instead of guesses.
Source grounding
Source grounding means every answer an AI gives is tied to and backed by specific retrieved content, and can be traced back to it.
Prompt injection
Prompt injection is an attempt to trick an AI into ignoring its instructions by hiding malicious commands in the text it reads.