Courseiva
AI Models and Data EngineeringmediumMultiple ChoiceObjective-mapped

AI0-001 AI Models and Data Engineering Practice Question

A logistics company uses a machine learning model to predict delivery times based on historical data including distance, traffic, weather, and driver performance. The model is deployed as a REST API using Flask and run on a single server. Recently, the model has been returning predictions with high latency (over 2 seconds) during peak hours when the API receives 500 requests per second. The server has 8 CPU cores and 32 GB RAM. The model is a gradient boosting model (XGBoost) with 500 trees. The engineer wants to reduce inference latency to under 500ms without retraining the model. Which action is most effective?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Prune the model by reducing the number of trees to 100 and limit tree depth

Pruning the model by reducing the number of trees (e.g., from 500 to 100) directly reduces the number of decision paths evaluated during inference, which decreases latency. This does not require retraining; pruning can be applied post-training. Option B (linear regression) would require retraining and likely lose accuracy. Option C (horizontal scaling) improves throughput but does not reduce per-request latency; it may help if the server is overloaded, but pruning is more effective for latency. Option D (increasing RAM) does not address the CPU-bound tree traversal bottleneck.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Prune the model by reducing the number of trees to 100 and limit tree depth

    Why this is correct

    Pruning reduces computational load and latency while often maintaining adequate accuracy.

  • Replace XGBoost with a linear regression model

    Why it's wrong here

    Linear regression is faster but would require retraining and likely significant accuracy loss.

  • Scale horizontally by deploying additional servers behind a load balancer

    Why it's wrong here

    Horizontal scaling improves throughput but may not reduce latency for each request if the model itself is slow.

  • Increase server RAM to 128 GB

    Why it's wrong here

    More RAM does not speed up CPU-bound model inference.

About these practice questions

One of 754 original AI0-001 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AI0-001 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI0-001 exam.