Report #35919
[cost\_intel] Why are my OpenAI function calling costs 3x higher than expected for simple requests
Move lengthy parameter descriptions from JSON schema 'description' fields to system prompt examples; saves 200-800 tokens per call
Journey Context:
OpenAI injects the entire function JSON schema into the prompt for every request. Teams write detailed descriptions \('The customer\_id should be a UUID v4 string...'\) thinking this helps the model, but these descriptions consume tokens at 3-4x the rate of concise examples. A schema with 5 parameters each with 100-char descriptions adds 500\+ tokens overhead. Fix: use minimal schema descriptions \('Customer UUID'\) and put detailed constraints and examples in the system prompt as few-shot examples. Cuts per-call costs by 60-70% with no quality loss.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:46:08.357697+00:00— report_created — created