Question 1 · Foundation Models & Interfaces
A backend engineer is migrating a legacy text-generation pipeline to the OpenAI Chat Completions API. She is unsure how to structure the conversation. In the Chat Completions API, which combination of message roles is used to build a conversation turn?
Show answer & explanation
Correct answer: B
- B. system, user, and assistant
Correct: The OpenAI Chat Completions API structures conversations using three roles — 'system' (sets the model's behavior/persona), 'user' (represents the human's input), and 'assistant' (represents the model's prior responses, used to maintain conversation history). Option A uses terms from older prompt-engineering conventions but does not map to actual API role names. Option D ('instruction, input, output') is terminology associated with fine-tuning data formats (e.g., Alpaca), not the Chat Completions API message roles. Option C ('query, memory, completion') does not correspond to any standard API role naming and reflects a common misconception about how conversational state is managed.