Decoder. plain-English AI glossary

Function schema prompting

▲ Rising

Passing a formal definition of available functions/tools to the model so it can decide which one to call and with what parameters.

Think of it like

Handing someone a phonebook: "Here are the plumbers in your area, here's how to call them."

Example

API has function "search_web(query: string, num_results: int)". Pass schema to model. Model outputs: "I'll call search_web with query='GDP France' and num_results=5".

How it actually works

Function schema prompting bridges language and action. The model sees formal specifications and outputs valid function calls. APIs like OpenAI's function_call mode handle this. The model must learn to parse its own output correctly (or use structured output to enforce it).

For product teams

Enables complex agentic workflows. Model can autonomously call APIs.

For engineers

Define function schemas carefully. Parse model output and validate before executing.

Related

Read anything AI without the jargon

Look up any term in plain English, or save terms as you read with the free Chrome extension.

Open DecoderAdd to Chrome