0
0
Prompt Engineering / GenAIml~10 mins

OpenAI fine-tuning API 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 start fine-tuning a model using the OpenAI API.

Prompt Engineering / GenAI
response = openai.FineTune.create(training_file=[1])
Drag options to blanks, or click blank then click option'
A'file-abc123'
Bopenai.File.create()
C12345
DNone
Attempts:
3 left
💡 Hint
Common Mistakes
Passing an integer instead of a string file ID.
Using a file upload function instead of the file ID.
Passing None or empty value.
2fill in blank
medium

Complete the code to list all fine-tune jobs using the OpenAI API.

Prompt Engineering / GenAI
fine_tunes = openai.FineTune.[1]()
Drag options to blanks, or click blank then click option'
Acreate
Blist
Cretrieve
Ddelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using create() instead of list().
Using retrieve() which requires a job ID.
Using delete() which removes a job.
3fill in blank
hard

Fix the error in the code to retrieve a fine-tune job by ID.

Prompt Engineering / GenAI
job = openai.FineTune.[1](id='ft-A1B2C3')
Drag options to blanks, or click blank then click option'
Aretrieve
Bcreate
Clist
Dupdate
Attempts:
3 left
💡 Hint
Common Mistakes
Using list() which returns all jobs, not one.
Using create() which starts a new job.
Using update() which modifies a job.
4fill in blank
hard

Fill both blanks to create a fine-tune job with a validation file.

Prompt Engineering / GenAI
response = openai.FineTune.create(training_file=[1], [2]=validation_file)
Drag options to blanks, or click blank then click option'
Avalidation_file
B'file-train123'
Cvalidation_file_id
Dvalidation_file_name
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect parameter names like 'validation_file_name'.
Passing the wrong variable or literal for the training file.
5fill in blank
hard

Fill all three blanks to create a fine-tune job with training file, validation file, and model name.

Prompt Engineering / GenAI
response = openai.FineTune.create(training_file=[1], validation_file=[2], model=[3])
Drag options to blanks, or click blank then click option'
Avalidation_file
Bmodel
C'curie'
D'file-xyz789'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up parameter names and values.
Using incorrect strings for file IDs or model names.
Forgetting to specify the base model.