0
0
Prompt Engineering / GenAIml~20 mins

Why fine-tuning adapts models to domains in Prompt Engineering / GenAI - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Domain Adaptation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why does fine-tuning improve model performance on a specific domain?

Imagine you have a general language model trained on many topics. You want it to work better on medical texts. Why does fine-tuning the model on medical data help?

AFine-tuning changes the model’s architecture to add new layers for medical terms.
BFine-tuning removes all previous knowledge so the model only knows medical data.
CFine-tuning increases the model size to handle more data.
DFine-tuning adjusts the model’s knowledge to focus on patterns and vocabulary specific to the medical domain.
Attempts:
2 left
💡 Hint

Think about how learning new examples helps a student focus on a topic.

Predict Output
intermediate
2:00remaining
What is the output after fine-tuning on domain data?

Given a simple model predicting sentiment, after fine-tuning on movie reviews, what will the prediction be for a new movie review?

Prompt Engineering / GenAI
class SimpleSentimentModel:
    def __init__(self):
        self.positive_words = {'good', 'great', 'fun'}
    def predict(self, text):
        return 'Positive' if any(word in text.split() for word in self.positive_words) else 'Negative'

model = SimpleSentimentModel()
# Fine-tuning adds 'amazing' to positive words
model.positive_words.add('amazing')

print(model.predict('The movie was amazing and fun'))
ANegative
BPositive
CError: 'amazing' not recognized
DNeutral
Attempts:
2 left
💡 Hint

Check if the new word added during fine-tuning is in the input text.

Model Choice
advanced
2:00remaining
Which model is best suited for fine-tuning to a new domain?

You want to adapt a language model to a specialized domain with limited data. Which model type is best to fine-tune?

AA model trained from scratch on the new domain data
BA small model trained only on the new domain data
CA large pre-trained model with general knowledge
DA model with no pre-training
Attempts:
2 left
💡 Hint

Think about using existing knowledge and adapting it.

Hyperparameter
advanced
2:00remaining
Which hyperparameter setting helps prevent overfitting during fine-tuning?

When fine-tuning a model on a small domain dataset, which hyperparameter adjustment helps avoid overfitting?

AUse a smaller learning rate
BUse a larger batch size without change
CRemove dropout layers
DIncrease the number of training epochs drastically
Attempts:
2 left
💡 Hint

Think about making smaller, careful updates to the model.

Metrics
expert
2:00remaining
Which metric best shows improved domain adaptation after fine-tuning?

You fine-tune a model on a new domain. Which metric best indicates the model learned domain-specific patterns?

AHigher accuracy on domain-specific test data
BLower training loss on original general data
CIncreased model size after fine-tuning
DFaster training time during fine-tuning
Attempts:
2 left
💡 Hint

Think about how well the model performs on new domain examples.