0
0
Prompt Engineering / GenAIml~20 mins

Content writing assistance in Prompt Engineering / GenAI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Content Writing AI Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does a language model generate text?
Imagine a language model trained to write stories. How does it decide the next word to write?
AIt predicts the next word based on the previous words it has generated.
BIt randomly picks any word from its vocabulary without context.
CIt always repeats the first word it learned during training.
DIt selects the longest word available in the vocabulary.
Attempts:
2 left
💡 Hint
Think about how sentences flow naturally when you speak or write.
Predict Output
intermediate
2:00remaining
Output of simple text generation code
What is the output of this Python code simulating a simple text generation step?
Prompt Engineering / GenAI
import random
words = ['hello', 'world', 'machine', 'learning']
context = ['machine']
next_word = random.choice(words)
print(next_word)
ARaises a TypeError
BPrints 'hello world' concatenated
CAlways prints 'machine'
DPrints a random word from the list including 'machine'
Attempts:
2 left
💡 Hint
Look at how random.choice works on a list.
Model Choice
advanced
2:00remaining
Choosing a model for content writing assistance
You want to build a content writing assistant that can generate long, coherent articles. Which model type is best?
AA large transformer-based language model trained on diverse text data
BA clustering model grouping similar sentences
CA simple linear regression model predicting word counts
DA small decision tree model trained on article titles
Attempts:
2 left
💡 Hint
Think about models that understand language context deeply.
Metrics
advanced
2:00remaining
Evaluating content writing model quality
Which metric is most appropriate to evaluate how well a content writing model generates fluent and relevant text?
AAccuracy of classifying text sentiment
BMean Squared Error (MSE)
CBLEU score comparing generated text to reference text
DNumber of words generated per second
Attempts:
2 left
💡 Hint
Think about metrics that compare generated text to human-written text.
🔧 Debug
expert
3:00remaining
Debugging unexpected repetitive output in text generation
A content writing model keeps repeating the same phrase over and over. What is the most likely cause?
AThe optimizer learning rate is too high causing slow learning.
BThe model's temperature parameter is set too low, causing low randomness.
CThe model has too many layers causing overfitting.
DThe training data was shuffled randomly before training.
Attempts:
2 left
💡 Hint
Consider how randomness affects text diversity.