Bird
Raised Fist0
Agentic AIml~20 mins

Progress tracking and reporting in Agentic AI - Practice Problems & Coding Challenges

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Challenge - 5 Problems
🎖️
Progress Tracker Pro
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Metrics
intermediate
1:30remaining
Understanding Training Loss Reporting
During training a neural network, the loss value reported after each epoch is 0.05. What does this number represent?
AThe average error between the model's predictions and true values over the training data for that epoch.
BThe percentage of correct predictions made by the model on the training data.
CThe total number of training samples processed in that epoch.
DThe time in seconds it took to complete the epoch.
Attempts:
2 left
💡 Hint
Loss measures how far off the model's guesses are from the real answers.
Predict Output
intermediate
1:30remaining
Output of Progress Reporting Code
What will be printed by this Python code snippet that tracks training progress?
Agentic AI
epochs = 3
for epoch in range(1, epochs + 1):
    loss = 0.1 / epoch
    print(f"Epoch {epoch}: Loss = {loss:.3f}")
A
Epoch 1: Loss = 1.000
Epoch 2: Loss = 0.500
Epoch 3: Loss = 0.333
B
Epoch 1: Loss = 0.100
Epoch 2: Loss = 0.200
Epoch 3: Loss = 0.300
C
Epoch 1: Loss = 0.100
Epoch 2: Loss = 0.050
Epoch 3: Loss = 0.033
D
Epoch 1: Loss = 0.010
Epoch 2: Loss = 0.005
Epoch 3: Loss = 0.003
Attempts:
2 left
💡 Hint
Loss decreases as epoch number increases because it is divided by epoch.
Model Choice
advanced
2:00remaining
Choosing a Model for Progress Tracking
You want to build a system that reports training progress with detailed metrics like accuracy, loss, and validation scores after each epoch. Which model type is best suited for this?
AA simple linear regression model without callbacks or metric tracking.
BA deep learning model using a framework that supports callbacks to report metrics after each epoch.
CA clustering model that groups data points without training epochs.
DA rule-based system that does not learn from data.
Attempts:
2 left
💡 Hint
Progress tracking needs a model that trains in steps and reports metrics.
Hyperparameter
advanced
2:00remaining
Impact of Batch Size on Progress Reporting
How does increasing the batch size during training affect the frequency and granularity of progress reports?
ALarger batch size means fewer updates per epoch, so progress reports are less frequent and less granular.
BLarger batch size causes progress reports to be skipped entirely.
CBatch size does not affect progress reporting frequency or granularity.
DLarger batch size means more frequent progress updates with finer granularity.
Attempts:
2 left
💡 Hint
Batch size controls how many samples are processed before updating the model.
🔧 Debug
expert
2:30remaining
Debugging Incorrect Progress Metrics
A training script prints validation accuracy after each epoch, but the values stay constant at 0.5 and never improve. What is the most likely cause?
Agentic AI
for epoch in range(5):
    train_model()
    val_acc = evaluate(validation_data)
    print(f"Epoch {epoch+1} Validation Accuracy: {val_acc}")
AThe model is not learning because training data is not shuffled each epoch.
BThe evaluate function is called before training updates the model weights.
CThe validation dataset is empty, so accuracy defaults to 0.5.
DThe evaluate function always returns a fixed value of 0.5 due to a bug.
Attempts:
2 left
💡 Hint
Check if the evaluation function returns dynamic results or a constant.

Practice

(1/5)
1. What is the main purpose of progress tracking during machine learning model training?
easy
A. To record how the model improves over time
B. To increase the size of the training data
C. To change the model architecture automatically
D. To speed up the training hardware

Solution

  1. Step 1: Understand progress tracking

    Progress tracking means keeping a record of how well the model is learning as it trains.
  2. Step 2: Identify the main goal

    The goal is to see improvements over time, not to change data size or hardware.
  3. Final Answer:

    To record how the model improves over time -> Option A
  4. Quick Check:

    Progress tracking = record improvement [OK]
Hint: Progress tracking = recording learning progress [OK]
Common Mistakes:
  • Confusing progress tracking with data augmentation
  • Thinking it changes model structure automatically
  • Assuming it speeds up hardware
2. Which of the following is the correct way to log training loss after each epoch in Python?
easy
A. print('Loss:', loss)
B. log('Loss:' + loss)
C. print('Loss:' loss)
D. echo 'Loss:' loss

Solution

  1. Step 1: Check Python print syntax

    In Python, print() requires arguments separated by commas or concatenated as strings.
  2. Step 2: Validate each option

    print('Loss:', loss) uses print with a comma, which is correct. log('Loss:' + loss) uses undefined log function. print('Loss:' loss) misses a comma. echo 'Loss:' loss uses echo, which is not Python.
  3. Final Answer:

    print('Loss:', loss) -> Option A
  4. Quick Check:

    Correct print syntax = print('Loss:', loss) [OK]
Hint: Use print() with commas to separate text and variables [OK]
Common Mistakes:
  • Missing commas in print statements
  • Using non-Python functions like echo or log
  • Concatenating strings without conversion
3. Given the code below, what will be printed after training for 3 epochs?
losses = []
for epoch in range(3):
    loss = 1 / (epoch + 1)
    losses.append(loss)
    print(f'Epoch {epoch+1}, Loss: {loss:.2f}')
print('Final losses:', losses)
medium
A. Epoch 1, Loss: 1.00 Epoch 2, Loss: 0.50 Epoch 3, Loss: 0.33 Final losses: [1, 2, 3]
B. Epoch 1, Loss: 0.00 Epoch 2, Loss: 0.50 Epoch 3, Loss: 0.33 Final losses: [0, 0.5, 0.3333333333333333]
C. Epoch 1, Loss: 1.00 Epoch 2, Loss: 0.50 Epoch 3, Loss: 0.33 Final losses: [1.0, 0.5, 0.3333333333333333]
D. Epoch 1, Loss: 1.00 Epoch 2, Loss: 0.50 Epoch 3, Loss: 0.33 Final losses: [1, 0.5, 0.33]

Solution

  1. Step 1: Calculate loss values for each epoch

    Epoch 1: 1/(1) = 1.0, Epoch 2: 1/(2) = 0.5, Epoch 3: 1/(3) ≈ 0.3333
  2. Step 2: Check printed output and final list

    Print shows formatted loss with 2 decimals. Final losses list stores full float values.
  3. Final Answer:

    Epoch 1, Loss: 1.00 Epoch 2, Loss: 0.50 Epoch 3, Loss: 0.33 Final losses: [1.0, 0.5, 0.3333333333333333] -> Option C
  4. Quick Check:

    Loss calculation and print formatting = Epoch 1, Loss: 1.00 Epoch 2, Loss: 0.50 Epoch 3, Loss: 0.33 Final losses: [1.0, 0.5, 0.3333333333333333] [OK]
Hint: Calculate loss per epoch and check print formatting carefully [OK]
Common Mistakes:
  • Confusing integer division with float division
  • Rounding losses in the list incorrectly
  • Misreading the range function output
4. The following code is meant to track accuracy after each training epoch, but it throws an error. What is the error?
accuracies = []
for epoch in range(5):
    accuracy = 0.8 + epoch * 0.03
    accuracies.append(accuracy)
print('Accuracies:', accuracies)
medium
A. SyntaxError due to missing colon in for loop
B. No error; code runs correctly
C. TypeError because accuracy is not a number
D. IndexError from accessing out-of-range list element

Solution

  1. Step 1: Review the code syntax and logic

    The for loop has a colon, accuracy is calculated as a float, and appended to the list.
  2. Step 2: Check for runtime errors

    No invalid operations or out-of-range accesses occur.
  3. Final Answer:

    No error; code runs correctly -> Option B
  4. Quick Check:

    Code syntax and logic correct = No error; code runs correctly [OK]
Hint: Check for syntax and type errors carefully [OK]
Common Mistakes:
  • Assuming missing colon when it is present
  • Confusing variable types
  • Expecting index errors without list access
5. You want to create a report that shows both training loss and accuracy after each epoch in a clear table format. Which approach best helps you track and report this progress effectively?
hard
A. Store losses and accuracies in separate lists and print them after training
B. Print loss and accuracy inside the training loop without storing values
C. Only track loss since accuracy is less important
D. Use a dictionary to store epoch as key and a tuple of (loss, accuracy) as value, then print a formatted table after training

Solution

  1. Step 1: Understand the need for clear reporting

    Clear reports require organized data storage and formatted output.
  2. Step 2: Evaluate each option

    Store losses and accuracies in separate lists and print them after training stores separately but may be harder to align epochs. Print loss and accuracy inside the training loop without storing values prints without storing, losing history. Use a dictionary to store epoch as key and a tuple of (loss, accuracy) as value, then print a formatted table after training uses a dictionary to link epochs with both metrics, enabling clear table printing. Only track loss since accuracy is less important ignores accuracy, which is important.
  3. Final Answer:

    Use a dictionary to store epoch as key and a tuple of (loss, accuracy) as value, then print a formatted table after training -> Option D
  4. Quick Check:

    Organized storage + formatted report = Use a dictionary to store epoch as key and a tuple of (loss, accuracy) as value, then print a formatted table after training [OK]
Hint: Use dictionary with epoch keys for clear progress reports [OK]
Common Mistakes:
  • Not storing metrics together per epoch
  • Printing inside loop without history
  • Ignoring accuracy tracking