CAIC System Architecture & Design 2 — Questions and Answers
Question 1: In an AI system that requires real-time inference with latency under 10ms, which deployment pattern is most appropriate?
- Batch processing pipeline
- Edge inference with model quantization (Correct answer)
- Centralized cloud API with CDN caching
- Serverless function with cold-start optimization
Correct answer: Edge inference with model quantization
Edge inference with quantized models minimizes network round-trip latency and enables sub-10ms response times at the point of need.
Question 2: Which architectural pattern best decouples AI model updates from the application logic that consumes predictions?
- Monolithic embedding of the model in the application
- Model-as-a-Service (MaaS) with versioned API contracts (Correct answer)
- Direct model file loading at application startup
- Hard-coded feature engineering pipelines
Correct answer: Model-as-a-Service (MaaS) with versioned API contracts
Model-as-a-Service with versioned APIs allows models to be retrained and deployed independently without changing consumer application code.
Question 3: A feature store in an ML system serves what primary architectural purpose?
- Storing trained model weights for version control
- Providing consistent, reusable feature computations across training and serving (Correct answer)
- Logging prediction outputs for audit trails
- Managing hyperparameter search experiments
Correct answer: Providing consistent, reusable feature computations across training and serving
A feature store eliminates training-serving skew by ensuring the same feature transformations are applied consistently during both model training and online inference.
Question 4: When designing an AI system for a regulated industry, which architectural component directly addresses explainability requirements?
- GPU cluster for faster training
- Model explanation layer with SHAP or LIME integration (Correct answer)
- Horizontal auto-scaling group
- Multi-region data replication
Correct answer: Model explanation layer with SHAP or LIME integration
Integrating post-hoc explainability tools like SHAP or LIME allows the system to generate human-interpretable rationales for individual predictions required by regulators.
Question 5: What is the key advantage of using a shadow deployment strategy when releasing a new AI model?
- It reduces infrastructure costs by sharing compute between old and new models
- It allows production traffic comparison without exposing users to the new model's outputs (Correct answer)
- It enables the new model to learn from live user feedback immediately
- It automatically rolls back deployments that exceed latency thresholds
Correct answer: It allows production traffic comparison without exposing users to the new model's outputs
Shadow deployment runs the new model in parallel on real traffic and logs its outputs for comparison without affecting the user experience, enabling safe pre-production validation.
Question 6: In a Lambda architecture for AI, the batch layer primarily serves which function?
- Serving low-latency queries from pre-computed views
- Reprocessing all historical data to produce accurate, comprehensive views (Correct answer)
- Handling real-time streaming events as they arrive
- Managing model registry and artifact versioning
Correct answer: Reprocessing all historical data to produce accurate, comprehensive views
The batch layer processes the entire historical dataset on a schedule to produce highly accurate, complete views that correct any errors in real-time processing.
Question 7: Which technique is specifically designed to prevent training-serving skew in production ML systems?
- Using different preprocessing libraries in training and serving code
- Sharing identical feature transformation code or pipelines between training and inference (Correct answer)
- Retraining models daily to match the production data distribution
- Caching inference results to reduce repeated computation
Correct answer: Sharing identical feature transformation code or pipelines between training and inference
Training-serving skew is caused by inconsistent data preprocessing; sharing the exact same transformation pipeline code between both phases eliminates this discrepancy.
In an AI system that requires real-time inference with latency under 10ms, which deployment pattern is most appropriate?