Challenge - 5 Problems
Input Validation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 conceptual
intermediate2:00remaining
Why is input validation important in AI systems?
Imagine you have an AI model that predicts loan approvals. Why should you validate the input data before feeding it to the model?
Attempts:
2 left
💻 code output
intermediate2:00remaining
Output of input sanitization function
What is the output of this Python function that sanitizes input text by removing digits?
Agentic_ai
def sanitize(text): return ''.join(c for c in text if not c.isdigit()) result = sanitize('Agent007 is ready!') print(result)
Attempts:
2 left
❓ model choice
advanced2:00remaining
Choosing a model robust to noisy input data
You have input data that may contain some errors or noise. Which model type is best to handle this situation?
Attempts:
2 left
❓ metrics
advanced2:00remaining
Evaluating input sanitization impact on model accuracy
You trained two models: one on raw input data and one on sanitized input data. The sanitized model has 5% higher accuracy. What does this suggest?
Attempts:
2 left
🔧 debug
expert2:00remaining
Identifying input validation bug in AI pipeline
Consider this code snippet that validates numeric input features before prediction. What error will it raise?
Agentic_ai
def validate_features(features): for key, value in features.items(): if value < 0: raise ValueError(f"Negative value for {key}") input_data = {'age': 25, 'income': -5000, 'score': 70} validate_features(input_data)
Attempts:
2 left
