AI-102 · Question #445
In Azure AI Studio, you use Completions playground with the GPT-35 Turbo model. You have a prompt that contains the following code. function F(n) { var f = [0, 1]; for (var i = 2; i < n; i++) f[i] =…
To instruct the GPT-35 Turbo model to explain code while minimizing costs, a clear instruction should be added directly to the prompt.
Question
Options
- AChange the model to GPT-4-32k.
- BAdd // what does function F do? to the prompt.
- CAdd function F(explanation) to the prompt.
- DSet the temperature parameter to 1.
Why each option
To instruct the GPT-35 Turbo model to explain code while minimizing costs, a clear instruction should be added directly to the prompt.
Changing to GPT-4-32k would significantly increase costs, which contradicts the requirement to minimize costs.
Adding "function F(explanation)" is an incorrect prompt technique for asking a model to explain existing code; it's more akin to attempting to define a new function or generate a function signature.
Setting the temperature parameter to 1 increases the randomness of the model's output, which might affect the creativity or diversity of the explanation but does not instruct the model to provide an explanation or directly minimize costs.
Concept tested: Prompt engineering for code explanation and cost optimization
Source: https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/gpt-best-practices
Topics
Community Discussion
No community discussion yet for this question.