AI-102 Question 476
Select 3You are developing an Azure AI solution that uses Azure OpenAI Service to generate text-based responses for a chatbot. The chatbot must ensure that responses remain contextually relevant and avoid producing overly generic or verbose outputs. Which parameter(s) should you configure to meet these requirements?
- A
Temperature
- B
Top-p (nucleus sampling)
- C
Max tokens
- D
Frequency penalty
- E
Stop sequences
Show answer and explanation
Correct answers: A, B, C
Explanation
To control generative behavior for a chatbot in Azure OpenAI Service, you need to adjust parameters like 'Temperature' to balance randomness, 'Top-p' to fine-tune token selection, and 'Max tokens' to limit the response length. Together, these parameters ensure that responses are contextually relevant and concise.
- A. Correct.
Temperature controls the randomness of the generated output. Lowering the temperature ensures more focused and deterministic responses, which helps maintain contextual relevance.
- B. Correct.
Top-p (nucleus sampling) determines the cumulative probability threshold for selecting tokens. This can help generate responses that are less generic by limiting token selection to a more meaningful subset.
- C. Correct.
Max tokens define the maximum length of the generated response. Limiting the token count prevents overly verbose outputs.
- D. Incorrect.
Frequency penalty discourages repetition in the generated text but does not directly affect the contextual relevance or verbosity of responses.
- E. Incorrect.
Stop sequences define when the model should stop generating text, but it does not influence the relevance or length of the response within the given constraints.