AI-102 exam dumps

AI-102 practice question 463 of 493

Designing and Implementing a Microsoft Azure AI Solution. Professional level, Microsoft. Free question with the correct answer and a full explanation.

AI-102 Question 463

Select 4

You are building a customer support chatbot using Azure OpenAI APIs. The chatbot must generate responses using a GPT model based on user prompts. To optimize the API usage, you need to configure the request payload correctly. Which of the following configurations should you include in the API request to control the length of the GPT model's response and the degree of randomness in the output?

  1. A

    Set the 'max_tokens' parameter to limit the length of the response.

  2. B

    Set the 'temperature' parameter to control the randomness of the response.

  3. C

    Set the 'frequency_penalty' parameter to specify the maximum number of words in the response.

  4. D

    Set the 'top_p' parameter to adjust the diversity of the response.

  5. E

    Set the 'stop' parameter to define the ending condition for the response.

Show answer and explanation

Correct answers: A, B, D, E

Explanation

When submitting prompts to the Azure OpenAI API, the 'max_tokens', 'temperature', 'top_p', and 'stop' parameters are commonly used to control the response's length, randomness, diversity, and termination point. These configurations allow you to fine-tune the behavior of the GPT model for your specific use case. The 'frequency_penalty' parameter is useful for reducing repetition but does not directly influence the length or randomness of the response.

  • A. Correct.

    Correct. The 'max_tokens' parameter determines the maximum number of tokens (words, punctuation, etc.) the response can contain, helping control its length.

  • B. Correct.

    Correct. The 'temperature' parameter affects randomness; lower values make the response more deterministic, while higher values increase randomness.

  • C. Incorrect.

    Incorrect. The 'frequency_penalty' parameter reduces repetition in the response but does not directly control its length or randomness.

  • D. Correct.

    Correct. The 'top_p' parameter adjusts the diversity of the response by including only the most probable token choices based on cumulative probability.

  • E. Correct.

    Correct. The 'stop' parameter specifies a sequence of characters at which the response should end, helping define where the model stops generating output.

Timed practice exam

Take a AI-102 practice test under exam conditions

40 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam