AIT study materials
AIT study resources

AIT cheat sheet

AIT · Keep the key ideas within reach.

Quick reference

Artificial Intelligence Fundamentals and Concepts

  • Four classical AI problem categories: search, reasoning/knowledge representation, planning, and learning.

  • Agent = architecture + program; a rational agent selects actions maximizing expected performance measure given percept sequence and built-in knowledge.

  • PEAS description decomposes a task environment into Performance measure, Environment, Actuators, Sensors.

  • Environment properties: fully vs partially observable, deterministic vs stochastic, episodic vs sequential, static vs dynamic, discrete vs continuous, single- vs multi-agent.

  • Uninformed search (BFS, DFS, uniform-cost) uses only the problem definition; informed search (A*, greedy best-first) uses a heuristic h(n).

  • A* is complete and optimal when h(n) is admissible (never overestimates true cost) and consistent (h(n) <= c(n,n') + h(n')), using f(n) = g(n) + h(n).

  • Propositional logic is decidable; first-order logic adds quantifiers and relations and is semi-decidable for entailment.

  • Strong AI claims machines can possess general intelligence/mind; weak (narrow) AI claims machines simulate intelligent behavior without understanding.

Quick reference

Machine Learning and Data Processing

  • Supervised learning maps labeled (x, y) pairs to a function; unsupervised learning finds structure in unlabeled x; reinforcement learning learns a policy from reward signals.

  • Bias-variance tradeoff: high bias underfits (simple model), high variance overfits (complex model); total error = bias^2 + variance + irreducible noise.

  • Regularization adds a penalty: L2 (ridge) adds lambdasum(w^2), L1 (lasso) adds lambdasum(|w|) and drives weights to zero for feature selection.

  • Cross-validation (k-fold) estimates generalization error by partitioning data into k train/validation splits; stratified k-fold preserves class proportions.

  • Precision = TP/(TP+FP); recall = TP/(TP+FN); F1 = 2precisionrecall/(precision+recall).

  • For imbalanced classes, accuracy is misleading; use precision, recall, F1, or AUC-ROC instead.

  • Data leakage occurs when information from the target or test set enters training features; split before any fitting of scalers, encoders, or imputers.

  • Standardization: z = (x - mean)/std; min-max scaling maps to [0,1] using (x - min)/(max - min).

Quick reference

Neural Networks and Deep Learning

  • A perceptron computes y = activation(sum(w_i * x_i) + b); a multilayer perceptron stacks layers with nonlinear activations.

  • Backpropagation applies the chain rule to compute gradients of loss w.r.t. each weight; gradient descent updates w <- w - lr * dL/dw.

  • Common activations: ReLU max(0,x) mitigates vanishing gradients; sigmoid/tanh saturate; softmax converts logits to a probability distribution.

  • Convolutional layers share weights across spatial positions, reducing parameters; pooling layers downsample; receptive field grows with depth.

  • Recurrent networks (LSTM, GRU) process sequences with hidden state; LSTMs use input/forget/output gates to mitigate vanishing gradients.

  • Dropout randomly zeroes activations during training as regularization; batch normalization normalizes layer inputs per mini-batch.

  • Loss functions: cross-entropy for classification, mean squared error for regression; optimizers include SGD, momentum, Adam.

  • Overfitting signals: training loss falls while validation loss rises; remedies include more data, regularization, early stopping, and simpler models.

Quick reference

Natural Language Processing and Generative AI

  • Tokenization splits text into tokens; subword schemes (BPE, WordPiece) balance vocabulary size and out-of-vocabulary handling.

  • Word embeddings (Word2Vec, GloVe) map words to dense vectors where semantic similarity corresponds to vector proximity.

  • Transformer self-attention computes softmax(QK^T / sqrt(d_k)) V, allowing parallel processing and long-range dependency modeling.

  • Large language models are autoregressive next-token predictors trained on large corpora; prompting conditions generation without weight updates.

  • Retrieval-augmented generation (RAG) grounds outputs by retrieving external documents before generation, reducing hallucination.

  • Hallucination = fluent but factually unsupported model output; mitigation includes grounding, citations, and verification.

  • Fine-tuning adapts pretrained weights to a task; parameter-efficient methods (LoRA) update low-rank adapters instead of full weights.

  • Evaluation metrics: perplexity for language modeling, BLEU/ROUGE for generation overlap, plus human/LLM-judge and task-specific accuracy.

Quick reference

AI Ethics, Governance, and Risk

  • Bias sources include historical data bias, sampling bias, label bias, and proxy variables; mitigation spans pre-, in-, and post-processing.

  • Fairness definitions conflict: demographic parity, equalized odds, and individual fairness cannot all hold simultaneously in general.

  • Explainability approaches: inherently interpretable models, post-hoc methods (LIME, SHAP), and model cards documenting intended use and limitations.

  • Privacy controls include data minimization, anonymization/pseudonymization, differential privacy, and consent management.

  • Risk management frameworks (e.g., NIST AI RMF, ISO/IEC 42001) structure govern, map, measure, and manage activities across the AI lifecycle.

  • Regulatory regimes (e.g., EU AI Act) classify systems by risk tier (unacceptable, high, limited, minimal) and impose tier-specific obligations.

  • Accountability requires human oversight, audit trails, documented roles, and redress mechanisms for affected parties.

  • Transparency obligations include disclosing AI interaction, documenting training data provenance, and reporting known limitations.

Quick reference

AI Applications, Tools, and Deployment

  • Deployment patterns: batch, real-time API, streaming, and edge inference; choice depends on latency, throughput, and data locality.

  • MLOps lifecycle: data ingestion, feature engineering, training, validation, deployment, monitoring, and retraining.

  • Model drift types: data drift (input distribution shift) and concept drift (relationship between inputs and target changes).

  • Serving tradeoffs: model quantization and distillation reduce size/latency at some accuracy cost; caching and batching raise throughput.

  • Feature stores centralize feature computation for training/serving consistency and reduce train-serve skew.

  • Containerization (Docker) and orchestration (Kubernetes) enable reproducible, scalable model serving with rollback.

  • Monitoring metrics include latency, error rate, prediction distribution, and data quality; alerts trigger retraining or rollback.

  • Common application domains: computer vision, NLP, recommendation, forecasting, anomaly detection, and generative assistants.

Quick reference

Artificial Intelligence Fundamentals and Concepts

  • Four classical AI problem categories: search, reasoning/knowledge representation, planning, and learning.

  • Agent = architecture + program; a rational agent selects actions maximizing expected performance measure given percept sequence and built-in knowledge.

  • PEAS description decomposes a task environment into Performance measure, Environment, Actuators, Sensors.

  • Environment properties: fully vs partially observable, deterministic vs stochastic, episodic vs sequential, static vs dynamic, discrete vs continuous, single- vs multi-agent.

  • Uninformed search (BFS, DFS, uniform-cost) uses only the problem definition; informed search (A*, greedy best-first) uses a heuristic h(n).

  • A* is complete and optimal when h(n) is admissible (never overestimates true cost) and consistent (h(n) <= c(n,n') + h(n')), using f(n) = g(n) + h(n).

  • Propositional logic is decidable; first-order logic adds quantifiers and relations and is semi-decidable for entailment.

  • Strong AI claims machines can possess general intelligence/mind; weak (narrow) AI claims machines simulate intelligent behavior without understanding.

Quick reference

Machine Learning and Data Processing

  • Supervised learning maps labeled (x, y) pairs to a function; unsupervised learning finds structure in unlabeled x; reinforcement learning learns a policy from reward signals.

  • Bias-variance tradeoff: high bias underfits (simple model), high variance overfits (complex model); total error = bias^2 + variance + irreducible noise.

  • Regularization adds a penalty: L2 (ridge) adds lambdasum(w^2), L1 (lasso) adds lambdasum(|w|) and drives weights to zero for feature selection.

  • Cross-validation (k-fold) estimates generalization error by partitioning data into k train/validation splits; stratified k-fold preserves class proportions.

  • Precision = TP/(TP+FP); recall = TP/(TP+FN); F1 = 2precisionrecall/(precision+recall).

  • For imbalanced classes, accuracy is misleading; use precision, recall, F1, or AUC-ROC instead.

  • Data leakage occurs when information from the target or test set enters training features; split before any fitting of scalers, encoders, or imputers.

  • Standardization: z = (x - mean)/std; min-max scaling maps to [0,1] using (x - min)/(max - min).

Quick reference

Neural Networks and Deep Learning

  • A perceptron computes y = activation(sum(w_i * x_i) + b); a multilayer perceptron stacks layers with nonlinear activations.

  • Backpropagation applies the chain rule to compute gradients of loss w.r.t. each weight; gradient descent updates w <- w - lr * dL/dw.

  • Common activations: ReLU max(0,x) mitigates vanishing gradients; sigmoid/tanh saturate; softmax converts logits to a probability distribution.

  • Convolutional layers share weights across spatial positions, reducing parameters; pooling layers downsample; receptive field grows with depth.

  • Recurrent networks (LSTM, GRU) process sequences with hidden state; LSTMs use input/forget/output gates to mitigate vanishing gradients.

  • Dropout randomly zeroes activations during training as regularization; batch normalization normalizes layer inputs per mini-batch.

  • Loss functions: cross-entropy for classification, mean squared error for regression; optimizers include SGD, momentum, Adam.

  • Overfitting signals: training loss falls while validation loss rises; remedies include more data, regularization, early stopping, and simpler models.

Quick reference

Natural Language Processing and Generative AI

  • Tokenization splits text into tokens; subword schemes (BPE, WordPiece) balance vocabulary size and out-of-vocabulary handling.

  • Word embeddings (Word2Vec, GloVe) map words to dense vectors where semantic similarity corresponds to vector proximity.

  • Transformer self-attention computes softmax(QK^T / sqrt(d_k)) V, allowing parallel processing and long-range dependency modeling.

  • Large language models are autoregressive next-token predictors trained on large corpora; prompting conditions generation without weight updates.

  • Retrieval-augmented generation (RAG) grounds outputs by retrieving external documents before generation, reducing hallucination.

  • Hallucination = fluent but factually unsupported model output; mitigation includes grounding, citations, and verification.

  • Fine-tuning adapts pretrained weights to a task; parameter-efficient methods (LoRA) update low-rank adapters instead of full weights.

  • Evaluation metrics: perplexity for language modeling, BLEU/ROUGE for generation overlap, plus human/LLM-judge and task-specific accuracy.

Quick reference

AI Ethics, Governance, and Risk

  • Bias sources include historical data bias, sampling bias, label bias, and proxy variables; mitigation spans pre-, in-, and post-processing.

  • Fairness definitions conflict: demographic parity, equalized odds, and individual fairness cannot all hold simultaneously in general.

  • Explainability approaches: inherently interpretable models, post-hoc methods (LIME, SHAP), and model cards documenting intended use and limitations.

  • Privacy controls include data minimization, anonymization/pseudonymization, differential privacy, and consent management.

  • Risk management frameworks (e.g., NIST AI RMF, ISO/IEC 42001) structure govern, map, measure, and manage activities across the AI lifecycle.

  • Regulatory regimes (e.g., EU AI Act) classify systems by risk tier (unacceptable, high, limited, minimal) and impose tier-specific obligations.

  • Accountability requires human oversight, audit trails, documented roles, and redress mechanisms for affected parties.

  • Transparency obligations include disclosing AI interaction, documenting training data provenance, and reporting known limitations.

Quick reference

AI Applications, Tools, and Deployment

  • Deployment patterns: batch, real-time API, streaming, and edge inference; choice depends on latency, throughput, and data locality.

  • MLOps lifecycle: data ingestion, feature engineering, training, validation, deployment, monitoring, and retraining.

  • Model drift types: data drift (input distribution shift) and concept drift (relationship between inputs and target changes).

  • Serving tradeoffs: model quantization and distillation reduce size/latency at some accuracy cost; caching and batching raise throughput.

  • Feature stores centralize feature computation for training/serving consistency and reduce train-serve skew.

  • Containerization (Docker) and orchestration (Kubernetes) enable reproducible, scalable model serving with rollback.

  • Monitoring metrics include latency, error rate, prediction distribution, and data quality; alerts trigger retraining or rollback.

  • Common application domains: computer vision, NLP, recommendation, forecasting, anomaly detection, and generative assistants.