0
0
Prompt Engineering / GenAIml~10 mins

Why production readiness matters in Prompt Engineering / GenAI - Test Your Understanding

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

Complete the code to print a message about production readiness.

Prompt Engineering / GenAI
print("Production readiness is important because it ensures [1].")
Drag options to blanks, or click blank then click option'
Acode runs fast locally
Btraining data is large
Cmodels work well in real use
Dalgorithms are complex
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing options about training data size instead of real-world use.
Focusing on code speed rather than reliability.
2fill in blank
medium

Complete the code to check if a model is ready for production by testing its accuracy.

Prompt Engineering / GenAI
if model_accuracy >= [1]:
    print("Model is production ready")
else:
    print("Model needs improvement")
Drag options to blanks, or click blank then click option'
A0.8
B0.3
C0.1
D0.5
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing too low accuracy thresholds like 0.1 or 0.3.
Confusing accuracy with loss values.
3fill in blank
hard

Fix the error in the code that checks if a model is production ready based on latency.

Prompt Engineering / GenAI
if model_latency [1] 100:
    print("Ready for production")
else:
    print("Too slow for production")
Drag options to blanks, or click blank then click option'
A<=
B>=
C==
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>=' which means latency is too high.
Using '==' which is too strict.
4fill in blank
hard

Fill both blanks to create a dictionary of model metrics only if accuracy is above threshold and latency is below limit.

Prompt Engineering / GenAI
metrics = {"accuracy": [1], "latency": [2] if accuracy [3] 0.75 and latency [4] 150 else {}
Drag options to blanks, or click blank then click option'
Aaccuracy
Blatency
C>
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping comparison operators.
Using wrong variable names.
5fill in blank
hard

Fill all three blanks to create a function that returns True if model is production ready based on accuracy, latency, and error rate.

Prompt Engineering / GenAI
def is_ready(accuracy, latency, error_rate):
    return accuracy [1] 0.85 and latency [2] 100 and error_rate [3] 0.05
Drag options to blanks, or click blank then click option'
A>=
B<=
C<
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong comparison signs for latency or error rate.
Confusing greater than and less than.