AAI-M cheat sheet
AAI-M · Keep the key ideas within reach.
AI Fundamentals and Terminology
AI is the umbrella discipline; machine learning is a subset that learns patterns from data; deep learning is a further subset using multi-layer neural networks.
Supervised learning uses labeled data, unsupervised learning finds structure in unlabeled data, and reinforcement learning optimizes actions via reward signals.
Narrow (weak) AI targets a specific task; general AI (AGI) would match human performance across arbitrary tasks and does not currently exist.
Training is fitting model parameters on data; inference is using the fitted model to produce predictions; only inference runs in production serving.
Features are input variables; labels (targets) are the outputs predicted in supervised tasks.
Classification predicts discrete categories; regression predicts continuous numeric values.
A model's parameters are learned weights; hyperparameters (learning rate, tree depth) are set before training and control the learning process.
Overfitting means low training error but high generalization error; underfitting means high error on both training and held-out data.
Inference cost and latency scale with model size and input length, which is why model selection trades accuracy against operational cost.
Data Literacy and Data Quality
Data quality dimensions: accuracy, completeness, consistency, timeliness, validity, and uniqueness.
Structured data lives in rows and columns; semi-structured data (JSON, XML) has tags but no rigid schema; unstructured data (text, images) has no predefined model.
Data lineage records the origin and transformation path of a dataset, enabling impact analysis and audit.
A data dictionary defines field names, types, allowed ranges, and ownership for each attribute.
Class imbalance means one class dominates; it inflates accuracy, so use precision, recall, F1, or AUC instead.
Correlation measures association, not causation; confounding variables can create spurious correlations.
Train/validation/test splits must be disjoint; leakage occurs when test information contaminates training and inflates reported performance.
Missing data handling options include deletion, mean/median imputation, and model-based imputation; the choice affects bias and variance.
Data drift is a change in input distribution after deployment; concept drift is a change in the input-to-output relationship.
Machine Learning Concepts and Model Lifecycle
Lifecycle stages: problem framing, data collection and preparation, feature engineering, training, evaluation, deployment, monitoring, and retirement.
Cross-validation (k-fold) estimates generalization by rotating held-out folds; it reduces dependence on a single split.
Regularization (L1/Lasso, L2/Ridge) penalizes large weights to reduce overfitting; L1 can drive coefficients to zero for feature selection.
Bias-variance tradeoff: high bias underfits, high variance overfits; model complexity moves error between the two.
Precision = TP/(TP+FP); Recall = TP/(TP+FN); F1 is their harmonic mean.
A confusion matrix tabulates true positives, true negatives, false positives, and false negatives for classification.
Model versioning and experiment tracking record data, code, hyperparameters, and metrics for each trained artifact to enable reproducibility.
MLOps automates retraining, testing, deployment, and monitoring; retraining triggers include drift detection and scheduled cadence.
Model evaluation must match the deployment context: choose thresholds and metrics based on the relative cost of false positives versus false negatives.
Generative AI and Large Language Models
LLMs are transformer-based models trained to predict the next token; parameters are learned during pretraining on large text corpora.
Tokens are subword units; context window is the maximum number of tokens the model can attend to in one request.
Temperature and top-p control sampling randomness: lower values yield more deterministic output, higher values more diverse output.
Retrieval-augmented generation (RAG) injects retrieved documents into the prompt to ground answers and reduce hallucination without retraining.
Fine-tuning adapts a pretrained model to a domain or task by further training on curated examples; it is distinct from prompt engineering.
Hallucination is fluent but factually unsupported output; grounding, citations, and human review mitigate it.
Embeddings map text to vectors so semantic similarity can be computed via distance or cosine similarity, powering semantic search.
Prompt injection is an attack where untrusted input overrides or subverts the model's instructions; treat model output as untrusted.
Foundation models are large pretrained models adapted to many downstream tasks, typically via prompting, RAG, or fine-tuning.
AI Use Cases and Business Value
Value cases fall into cost reduction (automation), revenue growth (personalization, recommendation), risk reduction (fraud, anomaly detection), and decision speed.
A business case quantifies baseline metric, expected improvement, implementation cost, and time to value; ROI = (benefit - cost)/cost.
Suitability test: the task has sufficient labeled or accessible data, a measurable objective, and tolerance for probabilistic output.
Human-in-the-loop is required where errors carry high cost or regulatory consequence; full automation suits low-stakes, high-volume tasks.
Common patterns: classification (routing, triage), forecasting (demand, churn), extraction (document processing), and generation (summarization, drafting).
Total cost of ownership includes data preparation, compute, integration, monitoring, and ongoing retraining, not just model build.
Pilot-to-production gap is a leading failure mode; define success metrics and integration requirements before piloting.
Process mining and workflow analysis identify where AI inserts into an existing process and what handoffs change.
AI Ethics, Bias, and Responsible AI
Responsible AI principles commonly include fairness, transparency, accountability, safety, privacy, and human oversight.
Bias sources include historical training data, sampling and labeling bias, proxy variables, and deployment-context mismatch.
Fairness metrics include demographic parity (equal positive rates), equalized odds (equal TPR/FPR across groups), and predictive parity; these cannot all hold simultaneously in general.
Explainability methods: inherently interpretable models (linear, decision trees) versus post-hoc methods (feature importance, SHAP, LIME).
Transparency requires disclosing that AI is in use, its intended purpose, and its known limitations to affected users.
Accountability assigns a named owner for model outcomes, including escalation and remediation paths.
Model cards and datasheets document intended use, training data, evaluation results, and limitations.
Red-teaming probes a system for harmful, unsafe, or biased behavior before release.
Human oversight means a competent person can review, override, or halt automated decisions with material impact.
AI Governance, Privacy, and Compliance
A governance framework defines roles (model owner, risk owner, approver), policies, risk tiering, and review gates across the model lifecycle.
Risk-based tiering classifies AI systems by impact (e.g., minimal, limited, high, unacceptable) and applies controls proportionate to risk.
Data minimization, purpose limitation, and retention limits are core privacy principles for training and operational data.
Personal data must be lawful, transparent, and subject to access, correction, and deletion rights; anonymization must be irreversible to remove obligations.
The EU AI Act regulates by risk category, imposing transparency, documentation, and conformity obligations, with stricter rules for high-risk and prohibited uses.
High-risk uses typically require risk management, data governance, technical documentation, logging, human oversight, and post-market monitoring.
Model inventory and audit trails support regulatory inquiry and incident response.
Third-party and vendor risk review covers model provenance, data handling, licensing, and subcontractor exposure.
Incident response for AI includes detection, containment, notification, root-cause analysis, and remediation tracking.
AI Project Delivery and Operations
Delivery phases: discovery, data readiness, model development, evaluation, deployment, monitoring, and iteration.
Define acceptance criteria and success metrics before development; metrics must be measurable against a baseline.
Deployment patterns include batch scoring, real-time API serving, streaming, and edge inference; choice depends on latency and volume requirements.
Monitoring covers data quality, drift, model performance, latency, error rates, and cost per prediction.
Shadow deployment and canary release limit blast radius by comparing new and old models on live traffic before full rollout.
Rollback requires a retained prior model version and reproducible artifacts.
A/B testing compares variants on a defined metric with adequate sample size and a pre-registered decision rule.
Data and model pipelines must be versioned so any production prediction can be traced to its inputs and model artifact.
Operational runbooks define alert thresholds, on-call ownership, and escalation for model degradation.