In the chat completions endpoint, what is the primary purpose of the system message?
Think about which message sets the tone or rules for the AI's replies.
The system message is used to give the AI instructions or context that influence how it responds to user messages. It sets the behavior for the entire chat session.
Given the following chat messages sent to the chat completions endpoint, what will be the role and content of the AI's first response message?
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is 2 + 2?"}
]
# The AI responds based on these messages.The AI replies as the assistant role with an answer to the user's question.
The AI always responds with the role 'assistant'. Given the user asked 'What is 2 + 2?', the AI should answer correctly with '2 + 2 equals 4.'
You want to build a customer support chatbot that can handle complex questions and maintain context over multiple turns. Which model is best suited for this task?
Consider which model type is designed for conversations with context.
Large chat-optimized models are trained to understand and maintain context across multiple messages, making them ideal for chatbots handling complex dialogs.
What is the effect of increasing the temperature parameter in a chat completions request?
Think about how randomness affects AI text generation.
Higher temperature values increase randomness, making the AI's responses more varied and creative. Lower values make responses more focused and deterministic.
You have two chat completion models. Model A has a perplexity of 15 on your test set, and Model B has a perplexity of 30. What does this tell you about their performance?
Lower perplexity means better prediction of the data.
Perplexity measures how well a model predicts a sample. Lower perplexity means the model is less 'surprised' by the data and generally performs better.