0
0
Prompt Engineering / GenAIml~20 mins

What Generative AI actually is in Prompt Engineering / GenAI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Generative AI Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Generative AI Outputs

Which of the following best describes what Generative AI does?

AIt only classifies existing data into categories without creating anything new.
BIt creates new content like images, text, or music based on patterns it learned.
CIt stores large amounts of data without processing or generating anything.
DIt deletes irrelevant data to make storage more efficient.
Attempts:
2 left
💡 Hint

Think about how AI can make something new rather than just sorting or storing.

Predict Output
intermediate
2:00remaining
Output of a Simple Text Generation Model

What will be the output of this simple text generation code snippet?

Prompt Engineering / GenAI
import random
words = ['cat', 'dog', 'bird']
def generate_sentence():
    return 'I see a ' + random.choice(words)

print(generate_sentence())
AI see a random animal
BI see a cat dog bird
CError because random.choice is not defined
DI see a cat (or dog or bird) - one of these randomly chosen each run
Attempts:
2 left
💡 Hint

Look at how random.choice picks one word from the list each time.

Model Choice
advanced
2:00remaining
Choosing the Right Model for Generative AI

Which model type is best suited for generating new images based on learned patterns?

AGenerative Adversarial Network (GAN) designed to create new images
BConvolutional Neural Network (CNN) used for image classification
CRecurrent Neural Network (RNN) used for time series prediction
DDecision Tree used for data splitting
Attempts:
2 left
💡 Hint

Think about models that can create new images, not just analyze them.

Metrics
advanced
2:00remaining
Evaluating Generative AI Quality

Which metric is commonly used to measure how realistic images generated by AI are?

AInception Score measuring image quality and diversity
BAccuracy score comparing predicted labels
CMean Squared Error measuring numeric prediction error
DConfusion Matrix showing classification errors
Attempts:
2 left
💡 Hint

This metric looks at both how good and how varied generated images are.

🔧 Debug
expert
2:00remaining
Debugging a Text Generation Model Output

Given this code snippet for generating text, what error will it raise?

Prompt Engineering / GenAI
def generate_text(words):
    return ' '.join(words)

print(generate_text('hello world'))
ASyntaxError due to missing colon
BNameError because 'words' is not defined
CNo error, outputs 'h e l l o w o r l d'
DTypeError because 'str' object is not iterable as expected
Attempts:
2 left
💡 Hint

Consider whether passing a string to ' '.join() raises a TypeError and what the actual output is.