Exam Preparation Quiz

Question 50 of 75

Enhance Azure OpenAI Responses With Better System Messages

MDFT Pro, a well-known training agency, is developing an AI-powered study assistant that helps students understand technical concepts for certification exams. Claire, the AI Application Developer, is working on improving the quality and relevance of responses from their Azure OpenAI-based educational tool.

The current system provides generic answers that may not be focused enough on the specific educational domain, and Claire wants to ensure the AI assistant provides responses that are specifically tailored to AI and machine learning concepts relevant to student learning objectives rather than broad, general information that might confuse students or provide irrelevant details.

Here is the current code implementation:

...
OpenAIClient client =
    new OpenAIClient(new Uri(endpoint), new AzureKeyCredential(key));
ChatCompletionsOptions options = new ChatCompletionsOptions
{
    Messages =
    {
        new ChatMessage(ChatRole.System, "You are a helpful assistant."),
        new ChatMessage(ChatRole.User, "What is an LLM?")
    }
};

ChatCompletions response = client.GetChatCompletions(
    deploymentName, options);
ChatMessage completion = response.Choices[0].Message;
Console.WriteLine($"Chatbot: {completion.Content}");
...

Will changing the system prompt from “You are a helpful assistant” to “You are a helpful assistant. You must answer only within the context of AI language models” improve the quality of the answer?

Choose the correct answer from the options below.

Explanations for each answer:

Learn more about system messages:
System Messages
Next Question