← Back to Index

6. Key Components

Production AI systems are built from a set of reusable components. Understanding each component's role, technology options, and design considerations is essential.

Feature Store

A centralized repository for features shared across training and serving. Eliminates the training-serving skew caused by inconsistent feature computation.

# Feature store usage
# Training: query historical features
features = feature_store.get_historical_features(
    entity_ids=user_ids, feature_names=["avg_purchase_7d", "session_count"],
    timestamp_column="event_time"
)

# Inference: query latest features
features = feature_store.get_online_features(
    entity_ids={"user_id": 42}, feature_names=["avg_purchase_7d"]
)

Training Pipeline

Orchestrates data loading, preprocessing, training, evaluation, and model registration.

Model Registry

Versioned catalog of trained models with metadata: metrics, hyperparameters, training dataset ID, deployment status (staging, production, archived).

Serving Infrastructure

Exposes models for inference. Key considerations:

ToolBest ForKey Feature
NVIDIA TritonGPU-accelerated servingMulti-framework, dynamic batching
vLLMLLM inferencePagedAttention, continuous batching
TorchServePyTorch modelsModel versioning, A/B testing
BentoMLPython model servingUnified API, containerization
ONNX RuntimeCross-framework servingOptimized execution, quantization

Monitoring Infrastructure

Feedback Collection Service

Captures explicit (ratings, corrections) and implicit (clicks, conversions) feedback. Stores it in a feedback data store, timestamped, for future retraining cycles and drift analysis.

Exercise: List the components you would need for an AI-powered email classification system (spam vs not-spam). For each component, identify: a) what technology you would use, b) what data flows through it, c) what could go wrong if the component fails.