0
0
Prompt Engineering / GenAIml~10 mins

Model selection (GPT-4, GPT-3.5) in Prompt Engineering / GenAI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select the GPT-4 model for generating text.

Prompt Engineering / GenAI
model = "[1]"
Drag options to blanks, or click blank then click option'
Agpt-3.5-turbo
Bcurie
Cgpt-4
Ddavinci
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'gpt-3.5-turbo' instead of 'gpt-4'.
Using older model names like 'davinci' or 'curie'.
2fill in blank
medium

Complete the code to set the temperature parameter for more creative responses.

Prompt Engineering / GenAI
response = openai.ChatCompletion.create(model="gpt-4", temperature=[1], messages=messages)
Drag options to blanks, or click blank then click option'
A0.7
B0.0
C1.5
D-0.5
Attempts:
3 left
💡 Hint
Common Mistakes
Using a temperature like 1.5, which produces overly random output.
Setting temperature to 0.0, which makes output very deterministic.
3fill in blank
hard

Fix the error in the code to correctly select GPT-3.5 model.

Prompt Engineering / GenAI
model_name = "[1]"
Drag options to blanks, or click blank then click option'
Agpt-4
Btext-davinci-003
Cgpt-3
Dgpt-3.5-turbo
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'gpt-4' instead of GPT-3.5.
Using older names like 'text-davinci-003'.
4fill in blank
hard

Fill both blanks to create a dictionary with model and max tokens for GPT-4.

Prompt Engineering / GenAI
config = {"model": "[1]", "max_tokens": [2]
Drag options to blanks, or click blank then click option'
Agpt-4
Bgpt-3.5-turbo
C8192
D4096
Attempts:
3 left
💡 Hint
Common Mistakes
Using GPT-3.5 model name with GPT-4 max tokens.
Setting max tokens too low for GPT-4.
5fill in blank
hard

Fill all three blanks to create a request with GPT-3.5, temperature 0.5, and max tokens 4096.

Prompt Engineering / GenAI
response = openai.ChatCompletion.create(model="[1]", temperature=[2], max_tokens=[3], messages=messages)
Drag options to blanks, or click blank then click option'
Agpt-4
B0.5
C4096
Dgpt-3.5-turbo
Attempts:
3 left
💡 Hint
Common Mistakes
Using GPT-4 model name instead of GPT-3.5.
Setting temperature too high or too low.
Using max tokens not supported by GPT-3.5.