Picking the right feature
Chat completion when a human reads it, structured output when code reads it, tool calling when the model needs outside data or actions, embeddings for semantic search, streaming when a user is waiting.
Last updated
Analogy
Choosing between GET, POST and a websocket. Same server, different tool for the job.
In an agent
A real agent uses most of these at once: tools to act, structured output to report, streaming to show progress.
Questions people ask
Which OpenAI feature should I use for my task?
Match it to the job. Plain chat completion when a person reads the answer. Structured output when code reads it. Tool calling when the model needs outside data or must take an action. Embeddings for search by meaning. Streaming whenever a user is waiting. Real agents usually combine several of these.
Do I need embeddings or tool calling to look up data?
They solve different problems. Embeddings find text by meaning, for example the right paragraph in your docs. Tool calling lets the model ask your code to run a function, like fetching an order by ID. Many agents use both: a searchDocs tool that runs an embedding search inside it.