Agentic AI
Agentic AI systems plan, use tools, and take multi-step actions toward a goal — moving beyond single prompts to autonomous task execution.
487 concepts from Python basics to Agentic AI, organized by dependency so you always know what to learn next. Includes Telugu translations.
Python + Math + Data
Agentic AI systems plan, use tools, and take multi-step actions toward a goal — moving beyond single prompts to autonomous task execution.
Agile is an iterative development methodology: short sprints, frequent releases, constant adjustment — the opposite of writing a full spec upfront.
Agile is an iterative development approach; Scrum organizes work into 2-week sprints with daily standups, sprint planning, and retrospectives.
AI is the broadest field (making machines smart), ML is a subset (learning from data), Deep Learning is a subset of ML (using neural networks), and Generative AI creates new content.
AI powers search, recommendations, fraud detection, medical imaging, self-driving, translation, and content generation across nearly every industry today.
AI's arc spans 1956 Dartmouth, two AI winters, the deep learning revolution (2012), and the transformer era (2017-now) reshaping every industry.
An API (Application Programming Interface) defines how software components communicate; REST APIs use HTTP requests to exchange JSON data between frontend and backend.
Continuous Integration builds and tests code on every commit; Continuous Deployment automatically releases validated changes to production.
The frontend is what users see and interact with (UI/UX), while the backend handles data processing, business logic, and server-side operations.
Generative AI produces new content — text, images, code, audio, video — by learning the distribution of training data and sampling from it.
Git is a distributed version control system that tracks changes through commits, branches, and merges — the universal tool for collaborative coding.
The SDLC is the end-to-end process of building software: plan, design, build, test, deploy, maintain — the loop every team runs through.
Tech companies range from FAANG-scale platforms to bootstrapped startups, each with distinct cultures, business models, and engineering practices.
Tech teams include engineers, PMs, designers, data scientists, ML engineers, DevOps, and SREs — each owning distinct slices of the product lifecycle.
Software is a multi-trillion-dollar global industry spanning consumer apps, enterprise SaaS, infrastructure, and platforms — the largest economic sector ever created.
Version control tracks changes to code over time, enabling collaboration, history, branching, and rollback; Git is the industry standard.
Artificial intelligence is the field of building systems that perform tasks normally requiring human intelligence — perception, reasoning, language, decision-making.
Machine learning is the subset of AI where systems learn patterns from data instead of being explicitly programmed with rules.
`abc.ABC` plus `@abstractmethod` defines a class that can't be instantiated until subclasses implement the required methods, enforcing interface contracts.
deque powers sliding-window maximums, BFS queues, and bounded-history buffers via `maxlen`, all leveraging O(1) operations at both ends.
Big-O analysis, searching, sorting, and the tradeoffs that decide which algorithm fits your data — the foundation of efficient code.
`asyncio` is Python's event-loop library for `async`/`await` code — `gather` runs coroutines concurrently and `run` boots the loop from sync land.
Big O describes how an algorithm's time/space grows with input size. O(1) is constant, O(log n) is logarithmic, O(n) is linear, O(n log n) is linearithmic, O(n²) is quadratic.
Binary search finds a target in a sorted array by halving the search space each step, achieving O(log n) time. For 1 million items, it needs only ~20 comparisons.
A BST keeps left subtree < node < right subtree, giving O(log n) search/insert/delete when balanced — degrading to O(n) on sorted input.
A binary tree is a hierarchical structure where each node has at most two children — the foundation for BSTs, heaps, and expression parsing.
A binary tree has at most two children per node, traversed with DFS (inorder, preorder, postorder) or BFS (level by level). Graphs use adjacency lists and can have cycles.
A closure captures variables from its enclosing scope, letting inner functions remember state after the outer function returns.
Context managers define __enter__ and __exit__ for the with statement, guaranteeing cleanup (closing files, releasing connections) even when exceptions occur.
`collections.Counter` is a dict subclass for counting hashable items, supporting `.most_common(n)` and arithmetic like `c1 + c2` or `c1 - c2`.
Data loading reads raw data from files (CSV, JSON, databases) into structured formats like Pandas DataFrames for analysis and preprocessing.
Data visualization transforms numbers into charts that reveal patterns, outliers, and distributions. Choose chart types based on your data: line for trends, scatter for correlations, bar for comparisons, histogram for distributions.
`@dataclass` auto-generates `__init__`, `__repr__`, and `__eq__` from typed class attributes, removing boilerplate for simple data-holding classes.
A DataFrame is a 2D labeled data structure with named columns and an index. It supports boolean filtering, groupby aggregation, merging, and vectorized operations.
A decorator is a function that wraps another function with extra behavior using @decorator syntax. Common uses include timing, logging, caching, and access control.
`defaultdict(list)` auto-creates a missing key's value using the supplied factory, eliminating boilerplate `if key not in d` checks when grouping data.
`collections.deque` is a doubly-linked list giving O(1) appends and pops from both ends, unlike list which is O(n) for left-side operations.
Dijkstra's algorithm finds shortest paths in O((V+E) log V) from one source to all nodes in a weighted graph with non-negative edges, using a min-heap.
A doubly linked list adds a `prev` pointer to each node, enabling O(1) deletion given a node reference and bidirectional traversal at the cost of extra memory.
Common DP patterns include knapsack, longest common subsequence, edit distance, and coin change — recognize the recurrence and the state shape.
Double-underscore methods like `__len__`, `__iter__`, and `__repr__` hook into Python's syntax, letting your objects work with `len()`, `for`, and `print()`.
Dynamic programming solves problems by combining solutions to overlapping subproblems — either top-down with memoization or bottom-up with tabulation.
`enum.Enum` defines a set of named, immutable constants that compare by identity — safer than bare strings or ints for state machines and config.
try/except catches runtime errors without crashing. Catch specific exceptions (ValueError, FileNotFoundError), use finally for cleanup, and raise custom exceptions for clear error messages.
f-strings interpolate expressions at compile time — faster than `%` or `.format()` — and support format specs like `f'{x:.2f}'` and debug `f'{x=}'`.
FastAPI is a modern async Python web framework — type hints drive automatic validation, OpenAPI docs, and serialization with near-zero boilerplate.
Python reads and writes files with open(). Always use 'with open(...) as f:' for automatic cleanup. Modes: 'r' (read), 'w' (write/overwrite), 'a' (append).
for loops iterate over sequences (lists, ranges, strings), while loops repeat as long as a condition is True. break exits early, continue skips to the next iteration.
A generator uses yield instead of return to produce values lazily, one at a time. This keeps memory usage constant even for infinite or very large sequences.
The GIL (Global Interpreter Lock) lets only one thread run Python bytecode at a time — threads help I/O-bound work, multiprocessing helps CPU-bound.
A graph is a set of nodes connected by edges — represented as adjacency lists or matrices, traversed via BFS or DFS.
Python dicts are open-addressing hash tables with average O(1) lookup; keys must be hashable, and since 3.7 insertion order is preserved.
A binary heap is an array-backed complete tree maintaining the parent-child order property, giving O(log n) push/pop and O(1) peek at the extremum.
Conditional statements (if/elif/else) execute different code blocks based on boolean conditions, controlling the flow of a program.
Inheritance lets a child class reuse and extend a parent class. Polymorphism means the same method name behaves differently in different classes via method overriding.
A lambda is a small anonymous function written in one line (lambda x: x * 2), useful as arguments to sort(), filter(), and map().
A singly linked list chains nodes via `next` pointers — O(1) insert at head, O(n) random access, and no contiguous memory required.
Common patterns include reversing in place by rewiring `next` pointers, detecting cycles with Floyd's tortoise-and-hare, and finding the middle with slow/fast pointers.
Matplotlib is Python's foundational plotting library. Use plt.plot() for lines, plt.scatter() for relationships, plt.bar() for categories, plt.hist() for distributions, and plt.subplots() for multi-panel figures.
Memoization caches function results by argument, turning exponential recursion (fib) into linear time — a one-line `@lru_cache` decorator handles it.
Python uses the C3 linearization algorithm to flatten multiple inheritance into a deterministic lookup order, viewable via `Cls.__mro__`.
sklearn Pipelines chain preprocessing and modeling steps, preventing data leakage by ensuring transformers are fit only on training data. Use Pipeline([('scaler', StandardScaler()), ('model', RandomForest())]).
A module is a .py file you import to reuse code. Use import, from...import, and aliases (import numpy as np). Packages are directories with __init__.py.
Lists, dicts, and sets are mutable (modifiable in place); ints, strings, and tuples are immutable, so any 'change' actually creates a new object.
`namedtuple` builds a lightweight immutable class with named fields — same memory footprint as a tuple but accessible via `.field` instead of `[0]`.
NumPy provides fast n-dimensional arrays and vectorized operations implemented in C. It is the foundation of all scientific Python — 10-100x faster than Python loops for numerical computation.
A NumPy array (ndarray) is a fixed-type, n-dimensional container for numerical data with fast vectorized operations, forming the basis of all scientific Python.
Python caches small integers (-5 to 256) and interned strings, so `is` sometimes returns True for equal values — always use `==` for equality.
Defining `__add__`, `__eq__`, `__lt__`, etc. lets your objects respond to `+`, `==`, `<` so custom types feel native to the language.
Pandas provides DataFrames — labeled 2D tables for data manipulation. Load CSVs, filter rows, group and aggregate, handle missing data, and perform exploratory analysis.
`apply` runs a function across rows or columns of a DataFrame — flexible but slow; prefer vectorized operations when the same logic is expressible.
`pd.merge` joins DataFrames on keys with inner, outer, left, or right semantics — the SQL JOIN of pandas, with `on`, `left_on`, and `right_on` controls.
`pivot_table` reshapes long data into wide summaries by grouping on index/columns and aggregating values — the spreadsheet pivot, but scriptable.
Pandas time series tools include `DatetimeIndex`, `resample` for downsampling, `rolling` windows, and timezone-aware arithmetic for clean temporal analysis.
`pathlib.Path` provides object-oriented filesystem paths with operator overloading (`p / 'sub'`) and methods like `.read_text()`, `.glob()`, `.exists()`.
PEP 8 is Python's official style guide — 4-space indents, snake_case for functions, PascalCase for classes, 79-char lines, and two blank lines between top-level defs.
pip installs third-party packages from PyPI. Virtual environments (python -m venv) isolate project dependencies. requirements.txt lists exact package versions for reproducibility.
print() outputs text to the console, and the Python REPL (Read-Eval-Print Loop) lets you run code interactively line by line.
A priority queue dequeues the highest-priority element first; Python's `heapq` implements a min-heap, so negate keys or use `(-priority, item)` for max-heap behavior.
The `@property` decorator turns a method into a computed attribute, letting you add getters, setters, and validation without breaking the public API.
A protocol is an informal interface defined by which dunder methods an object implements — anything with `__iter__` is iterable, no inheritance required.
Pydantic validates and parses data using Python type hints — define a `BaseModel` subclass and bad input raises a clear `ValidationError`.
Pytest is the de-facto Python test framework — write plain `test_*` functions with `assert`, run `pytest`, and get rich failure diffs for free.
`pytest-cov` measures which lines your tests execute — aim high but remember coverage proves code ran, not that it's correct.
Fixtures are reusable setup functions decorated with `@pytest.fixture` — declare them as test arguments and pytest injects them with proper scoping and teardown.
`@pytest.mark.parametrize` runs the same test against many input/expected pairs — one function generates dozens of test cases with clear failure isolation.
Python supports +, -, *, /, // (floor division), % (modulo), and ** (exponentiation) operators for numerical computation.
Async lets one thread juggle many I/O-bound tasks via cooperative `await` points — great for network calls, useless for pure CPU work.
Python compiles source to bytecode instructions executed by the CPython VM — inspect with `dis.dis(func)` to see what your code actually runs.
A class is a blueprint for creating objects, defined with class keyword. __init__ initializes attributes, self refers to the current instance, and methods define behavior.
Build CLIs with `argparse` (stdlib) or `click`/`typer` for richer ergonomics — parse flags, validate input, and expose subcommands like `git` does.
Python talks to databases via DB-API 2.0 drivers — always use parameterized queries to prevent SQL injection, and connection pools for concurrent access.
A dictionary maps keys to values for O(1) lookup. Created with {key: value} syntax, accessed with dict[key] or dict.get(key, default).
Functions are reusable code blocks defined with def, accepting parameters and returning values. They support default args, *args, and **kwargs.
Python uses reference counting plus a cyclic garbage collector to free unused objects — the `gc` module exposes tuning and inspection hooks.
Integration ties pieces together — data layers, APIs, CLIs, tests, and deploys — so individually correct modules form a working, observable system.
A list is an ordered, mutable collection that can hold any type. Access by index, slice with [start:stop], and use list comprehensions for concise creation.
The `logging` module provides leveled, configurable output (DEBUG, INFO, WARNING, ERROR) — never use `print` in production code; loggers are filterable and routable.
Python objects live on the heap and are reclaimed by reference counting plus a cyclic garbage collector that handles reference cycles.
`multiprocessing` spawns separate processes that bypass the GIL — true parallel CPU work at the cost of inter-process communication overhead.
Packaging turns a project into a `pip install`-able distribution via `pyproject.toml` — declare dependencies, entry points, and metadata for PyPI.
Profiling identifies slow code with `cProfile`, `timeit`, or `line_profiler` — measure before optimizing, because intuition about hot paths is usually wrong.
Good project design separates concerns into modules, keeps functions small and pure, isolates I/O from logic, and writes for the next reader (often you).
A clean layout uses `src/` for code, `tests/` for tests, `pyproject.toml` for config, and a virtual environment to isolate dependencies per project.
Python's `re` module compiles regular expressions for matching, searching, and substitution — use raw strings (r"...") to avoid escaping backslashes.
The REPL is an interactive Python shell where you type code, it runs immediately, and results are printed — perfect for experimentation.
The `sqlite3` module ships with Python — connect, execute parameterized SQL with `?` placeholders, and commit changes; perfect for embedded storage.
The `threading` module runs tasks concurrently in one process — bound by the GIL, so use threads for I/O waits, not CPU-bound number crunching.
Python's core types are int, float, str, bool, and None. Python is dynamically typed — variables can change type at runtime.
A variable is a name that refers to a value stored in memory, created by assignment (x = 42) with no type declaration needed.
A queue is a First-In-First-Out collection. enqueue() adds to the back, dequeue() removes from the front. Used for BFS, task scheduling, and message processing.
Recursion solves a problem by calling the same function on smaller subproblems — every recursion needs a base case to stop the call stack.
Variables in Python are names bound to objects, not boxes holding values — assignment rebinds the name without copying the underlying object.
Parentheses create capture groups whose matches are retrieved via `match.group(n)` or named with `(?P<name>...)` — backreferences enable matching repeats.
Common regex patterns: \d for digits, \w for word chars, + and * for quantifiers, ^$ for anchors, and [] for character classes.
REST APIs expose resources over HTTP using verbs (GET, POST, PUT, DELETE) and JSON payloads — stateless, cacheable, and the lingua franca of web services.
sklearn provides a consistent fit/predict/score API for hundreds of ML algorithms. The workflow: load data, train_test_split, fit a model, predict, and evaluate with metrics.
Python resolves names in Local, Enclosing, Global, then Built-in order; use `nonlocal` to rebind enclosing names and `global` for module-level ones.
Sets are unordered hash-based collections of unique elements offering O(1) membership tests and fast union, intersection, and difference operations.
Bubble sort is O(n²) and educational only. Merge sort is O(n log n) and divides-then-merges. In practice, always use Python's built-in sorted() which implements Timsort.
SQLAlchemy is Python's premier ORM — define models as classes, query with Pythonic expressions, and switch databases without rewriting your data layer.
A stack is a Last-In-First-Out collection. push() adds to the top, pop() removes from the top. Used for DFS, undo/redo, bracket matching, and function call tracking.
Python strings are immutable sequences of Unicode code points, so every concatenation allocates a new object — use `''.join(parts)` for loops.
Python 3.10's `match`/`case` deconstructs values by shape — matching literals, sequences, mappings, and class patterns with optional guards.
`str` holds Unicode code points while `bytes` holds raw 8-bit data; convert between them with `.encode('utf-8')` and `.decode('utf-8')` explicitly.
In-order yields BST values sorted, pre-order copies/serializes the tree, post-order frees/evaluates bottom-up, and level-order (BFS) walks tier by tier.
A trie (prefix tree) stores strings as paths from the root, giving O(k) lookup and prefix matching for autocomplete and spell-check.
Tuples are immutable ordered sequences — slightly faster than lists, hashable when their contents are, and ideal for fixed records or dict keys.
The two-pointer technique walks a sequence with two indices (often from opposite ends) to solve problems like pair-sum or palindrome check in O(n) time.
Type hints annotate function signatures (def add(a: int, b: int) -> int) and variables. They are not enforced at runtime but help tools like mypy catch type errors early.
Union-Find (Disjoint Set Union) tracks connected components with near-O(1) union and find operations using path compression and rank-based merging.
assert statements verify conditions are True, raising AssertionError if False. Group tests in functions, test edge cases, error paths, and expected outputs to catch bugs early.
A venv isolates a project's Python interpreter and packages so dependencies for one project never collide with another or with the system Python.
The walrus operator assigns and returns a value in the same expression, letting you write `while (line := f.readline()):` without repeating reads.
Adam combines momentum with per-parameter adaptive learning rates, making it one of the most popular and robust optimizers for deep learning.
Bayes' theorem lets you update the probability of a hypothesis as you observe new evidence: P(H|E) = P(E|H) * P(H) / P(E).
The chain rule computes the derivative of a composite function by multiplying the derivatives of each nested function, enabling backpropagation.
Conditional probability is the likelihood of an event occurring given that another event has already occurred, written P(A|B).
A confidence interval is a range of values that, with a specified probability, contains the true population parameter being estimated.
Convergence occurs when a training algorithm's loss stabilizes at a minimum, meaning further updates produce negligible improvement.
Cosine similarity measures the angle between two vectors, giving a value from -1 (opposite) to 1 (identical direction) regardless of magnitude.
Cross-entropy measures the difference between two probability distributions and is the standard loss function for classification tasks.
A derivative measures the instantaneous rate of change of a function with respect to its input.
Descriptive statistics summarize a dataset with measures of center (mean, median, mode) and spread (standard deviation, variance) to reveal its key characteristics.
The dot product multiplies corresponding elements of two vectors and sums the results, measuring how aligned they are.
An eigenvalue is the scalar factor by which a matrix stretches its corresponding eigenvector without changing its direction.
Entropy measures the average amount of surprise or uncertainty in a probability distribution; higher entropy means more unpredictability.
Expected value E[X] is the probability-weighted average of all possible outcomes of a random variable — the long-run average if the experiment is repeated forever.
Gradient descent iteratively adjusts parameters in the opposite direction of the gradient to minimize a loss function.
A gradient is a vector of partial derivatives pointing in the direction of steepest increase of a multivariable function.
Hypothesis testing is a statistical method that uses sample data to evaluate whether a claim about a population parameter is likely true or false.
KL divergence quantifies how much one probability distribution differs from a reference distribution; it is always non-negative and zero only when the distributions match.
The learning rate controls the step size taken during each gradient descent update; too large causes overshooting, too small causes slow convergence.
A linear transformation maps vectors to vectors while preserving addition and scalar multiplication, and every such map can be represented as a matrix.
A local minimum is a point where the loss is lower than all nearby points but not necessarily the lowest overall; momentum and noise help escape them.
A loss function measures how far a model's predictions are from the true values, providing the signal that gradient descent uses to improve.
The loss landscape is the surface formed by plotting the loss function over all possible parameter values; gradient descent navigates this surface toward minima.
A matrix is a 2D grid of numbers that can represent data, transformations, or systems of equations.
Matrix multiplication combines two matrices by computing dot products of rows and columns; it is the core operation in neural network forward passes and attention.
Momentum accelerates gradient descent by accumulating a running average of past gradients, helping escape local minima and smooth noisy updates.
The normal (Gaussian) distribution is a bell-shaped curve defined by its mean and standard deviation, appearing ubiquitously in nature and ML due to the Central Limit Theorem.
A p-value is the probability of observing results at least as extreme as the data, assuming the null hypothesis is true.
A partial derivative measures how a function changes when only one of its input variables changes while the others are held fixed.
Probability quantifies how likely an event is to occur, expressed as a number between 0 (impossible) and 1 (certain).
A random variable is a function that maps outcomes of a random experiment to real numbers, enabling mathematical analysis of uncertainty.
SVD decomposes any matrix into three simpler matrices (U, Sigma, V-transpose), revealing its fundamental structure and enabling dimensionality reduction.
Stochastic calculus extends derivatives to random processes — Brownian motion, Itô integrals, and stochastic differential equations. The math diffusion models, flow matching, and score-based generative models all live in.
Variance Var(X) measures how spread out a random variable's outcomes are around its expected value, computed as E[(X - E[X])^2].
A vector is an ordered list of numbers representing magnitude and direction in n-dimensional space.
Class imbalance (e.g., 99% non-spam vs 1% spam) makes accuracy misleading — a model predicting the majority class always wins 99% but finds zero spam.
Cross-validation rotates through multiple train/test splits and averages the results, giving a more reliable estimate of model performance.
Data augmentation artificially increases training data by applying transformations like flipping, rotating, or adding noise to existing samples.
Data leakage occurs when information from outside the training set bleeds into the model, causing overly optimistic performance estimates that collapse in production.
A data pipeline is a series of automated steps that ingest, clean, transform, and deliver data from raw sources to an ML-ready format.
Data quality encompasses accuracy, completeness, consistency, and timeliness; poor data quality is the most common cause of ML project failure.
A distribution describes how the values of a variable are spread or clustered, such as normal (bell curve), uniform, or skewed shapes.
EDA is the process of visually and statistically summarizing a dataset to discover patterns, anomalies, and relationships before modeling.
Feature engineering transforms raw data into informative input features that help ML models learn patterns more effectively.
Feature scaling normalizes or standardizes numerical features to a common range so that no single feature dominates the learning process.
A feature vector is the numerical representation of a single data sample, with each dimension corresponding to a measured feature.
One-hot encoding converts categorical variables into binary vectors with one 1 and the rest 0s, making categories usable by numerical models.
Oversampling duplicates or synthesizes minority-class examples to balance the training set — boosts recall on the rare class but risks overfitting.
SMOTE (Synthetic Minority Oversampling Technique) creates new minority-class samples by interpolating between existing ones in feature space, not duplicating them.
Splitting data into separate training, validation, and test sets ensures the model is evaluated on data it has never seen during training.
Undersampling drops majority-class examples to match the minority count — fast and simple, but throws away potentially useful data.
Classical ML + Deep Learning
The bias-variance tradeoff describes how decreasing a model's bias (underfitting) typically increases its variance (overfitting), and vice versa.
Boosting sequentially trains weak learners, each focusing on the mistakes of the previous one, to build a strong ensemble model.
Clustering groups similar data points together without labels, revealing natural structure in the data.
A confusion matrix is a table showing true positives, false positives, true negatives, and false negatives for a classifier.
A decision tree splits data into branches using yes/no questions on features, creating an interpretable flowchart for prediction.
Dimensionality reduction compresses high-dimensional data to fewer dimensions while keeping its essential structure — fights the curse of dimensionality and enables visualization.
ElasticNet blends L1 and L2 penalties, getting Lasso's sparsity and Ridge's stability — preferred when correlated features confuse pure Lasso.
The F1 score is the harmonic mean of precision and recall, providing a single metric that balances both.
Feature selection picks the most predictive subset of inputs — reducing overfitting, speeding training, and making models more interpretable.
Generalization is a model's ability to perform well on unseen data, not just the training set; it is the ultimate goal of machine learning.
A hyperparameter is a setting chosen before training (e.g., learning rate, batch size, number of layers) that controls the training process but is not learned from data.
K-means partitions data into k clusters by iteratively assigning points to the nearest centroid and recomputing centroids.
KNN classifies a data point by a majority vote of its k closest neighbors in feature space, requiring no training phase.
Laplace smoothing adds a small count (alpha) to every feature frequency to prevent zero probabilities from unseen features destroying the classification.
Lasso (L1 regularization) penalizes the sum of |coefficients|, driving some to exactly zero — it does both shrinkage AND feature selection in one step.
Linear regression fits a straight line (or hyperplane) to data by minimizing the sum of squared errors between predictions and targets.
Logistic regression applies a sigmoid function to a linear model to output probabilities for binary classification.
Naive Bayes is a probabilistic classifier that applies Bayes' theorem with the assumption that features are conditionally independent given the class label.
Overfitting occurs when a model memorizes training data (including noise) so well that it fails to generalize to new data.
Precision measures how many positive predictions were correct; recall measures how many actual positives were found.
PCA reduces dimensionality by projecting data onto the directions (principal components) that capture the most variance.
A random forest trains many decision trees on random subsets of data and features, then averages their predictions to reduce overfitting.
MAE, MSE, RMSE, and R-squared each measure regression error differently — RMSE punishes large errors, MAE treats all errors equally, R-squared shows variance explained.
Regularization adds a penalty term to the loss function (L1, L2) to discourage overly complex models and reduce overfitting.
Ridge (L2 regularization) penalizes the sum of squared coefficients, shrinking them smoothly toward zero but never eliminating any — keeps all features.
ROC-AUC measures a classifier's ability to distinguish between classes across all threshold values; 1.0 is perfect, 0.5 is random.
Supervised learning trains a model on labeled input-output pairs so it can predict the output for new, unseen inputs.
An SVM finds the hyperplane that maximizes the margin between classes, using the kernel trick to handle non-linear boundaries.
t-SNE projects high-dimensional data to 2D/3D by preserving local neighborhoods — great for visualization, but distances between clusters aren't meaningful.
UMAP reduces dimensions while preserving both local and some global structure — faster than t-SNE and often produces more meaningful cluster separations.
Underfitting occurs when a model is too simple to capture the underlying patterns in the data, leading to poor performance even on training data.
Unsupervised learning finds hidden patterns or groupings in data without any labeled examples.
Activation functions introduce nonlinearity into neural networks, enabling them to learn complex patterns beyond simple linear mappings.
Backpropagation computes gradients of the loss with respect to each weight by applying the chain rule backwards through the network.
Batch normalization normalizes layer inputs across a mini-batch, stabilizing training and allowing higher learning rates.
Batch size is the number of training examples processed together in one gradient update; smaller batches add noise that can help generalization.
A bias is a learnable constant added to the weighted sum in a neuron, allowing the activation function to shift left or right for better data fit.
Convolution applies a small filter to an input by sliding it across the data and computing element-wise products, producing a feature map.
A CNN uses learnable filters that slide across spatial data (like images) to detect local features such as edges, textures, and shapes.
The architectural side of diffusion models — U-Net backbones, time-conditioning blocks, attention placement, and the engineering tricks that make denoisers actually train at scale.
Dropout randomly deactivates a fraction of neurons during training, forcing the network to learn redundant representations and reducing overfitting.
An epoch is one complete pass through the entire training dataset; models typically train for many epochs until the loss converges.
Fine-tuning unfreezes some or all layers of a pretrained model and trains them on new data with a small learning rate.
Focal loss down-weights easy examples with a (1-p)^gamma factor, focusing training on hard, misclassified samples — designed for extreme class imbalance.
The forward pass propagates input data through each layer of a neural network to produce a prediction.
GANs train a generator-discriminator pair adversarially; VAEs learn an encoder-decoder with a KL-regularized latent prior. The two pre-diffusion deep generative families and the architectures the generative-AI track builds on.
An LSTM (Long Short-Term Memory) uses forget, input, and output gates to selectively remember or discard information across long sequences.
MSE squares residuals before averaging — it penalizes large errors disproportionately, making outliers dominate the loss for regression tasks.
Mixture of Experts routes each input to a subset of specialized sub-networks (experts), enabling massive model capacity without proportional compute cost.
The ML decision framework guides when to use deep learning versus classical ML based on data size, interpretability needs, and compute budget.
A neural network is a layered system of interconnected nodes (neurons) that learns to map inputs to outputs by adjusting connection weights.
A perceptron is the simplest neural network: a single neuron that computes a weighted sum of inputs, adds a bias, and applies a threshold.
Pooling reduces the spatial dimensions of feature maps by summarizing local regions (e.g., max pooling takes the largest value in each window).
In attention, each token is projected into query (what am I looking for?), key (what do I contain?), and value (what information do I carry?) vectors.
An RNN processes sequential data by maintaining a hidden state that captures information from previous time steps.
ReLU (Rectified Linear Unit) outputs the input directly if positive, otherwise zero; it is the most widely used activation function in deep learning.
A residual (skip) connection adds a layer's input directly to its output, enabling gradient flow through very deep networks and preventing degradation.
Self-attention lets each token in a sequence attend to every other token, capturing context-dependent relationships within the same input.
The sigmoid function squashes any input to a value between 0 and 1, making it useful for probability outputs and gating mechanisms.
Softmax converts a vector of raw scores (logits) into a probability distribution that sums to 1, used as the final layer in classification and attention.
A state space model processes sequences by maintaining a compressed hidden state that evolves linearly, enabling efficient long-range dependency modeling.
The training loop repeatedly performs forward pass, loss computation, backpropagation, and parameter update until the model converges.
Transfer learning reuses a model pretrained on a large dataset and adapts it to a new, often smaller, task-specific dataset.
A Vision Transformer (ViT) splits an image into fixed-size patches, linearly embeds them, and processes the sequence with a standard transformer encoder for image classification.
A weight is a learnable parameter in a neural network that scales an input signal; training adjusts weights via gradient descent to minimize the loss.
Transformers + Generative AI
Alignment is the process of shaping a model's outputs to match human values, intent, and safety constraints — typically via RLHF, DPO, or constitutional methods.
Attention computes a weighted sum of values where the weights reflect how relevant each element is to the current query.
Attention weights are the softmax-normalized scores that determine how much each token attends to every other token, forming an interpretable attention pattern.
BERT is a transformer encoder pretrained with masked language modeling that produces deep bidirectional representations for understanding tasks.
BPE iteratively merges the most frequent pair of tokens to build a vocabulary that balances character-level and word-level granularity.
Causal masking prevents each token from attending to future tokens, ensuring the model generates text left-to-right without peeking ahead.
Chain-of-thought prompting encourages a model to reason step-by-step before answering, dramatically improving performance on math, logic, and multi-step tasks.
CLIP aligns text and image embeddings in a shared space using contrastive learning, enabling zero-shot classification from text descriptions alone.
The context window is the maximum number of tokens a model can process at once; longer contexts require more memory and compute due to attention's quadratic cost.
Contrastive learning trains embeddings by pulling matched pairs together and pushing mismatched pairs apart — no labels needed, just positive/negative pairs.
The embedding dimension is the number of values in each embedding vector; larger dimensions capture more nuance but require more compute and memory.
The encoder-decoder architecture uses an encoder to build a contextual representation of the input and a decoder to generate the output sequence.
In a transformer, the feed-forward network (FFN) is a two-layer MLP applied independently to each position after attention, adding nonlinear capacity.
GPT is a transformer decoder pretrained with causal language modeling that generates text autoregressively, one token at a time.
InfoNCE is a softmax-based contrastive loss that treats one positive against many negatives, maximizing mutual information between paired views.
Layer normalization normalizes activations across the feature dimension for each sample, stabilizing training in transformers where batch sizes may vary.
LoRA (Low-Rank Adaptation) fine-tunes large language models by decomposing weight updates into two small low-rank matrices, training only 0.1-1% of parameters while matching full fine-tuning performance.
Masked language modeling randomly hides tokens in the input and trains the model to predict them from surrounding context.
Multi-head attention runs several attention operations in parallel, each learning to focus on different types of relationships.
Positional encoding adds information about token order to the input embeddings since attention itself has no notion of sequence position.
A process reward model scores each intermediate reasoning step rather than only the final answer, enabling finer-grained training signal for reasoning.
Prompt engineering crafts input text to steer a language model's output through techniques like zero-shot, few-shot, and chain-of-thought prompting.
QLoRA combines 4-bit quantization of the frozen base model with LoRA adapters in fp16, enabling fine-tuning of 7B+ models on a single consumer GPU.
Reasoning models are LLMs trained to perform extended chain-of-thought reasoning before producing a final answer, improving performance on complex tasks.
A reward model is trained on human preference pairs to score outputs, providing the scalar signal that policy optimization (PPO, DPO) maximizes during RLHF.
The supervised fine-tuning pipeline takes instruction-response pairs through dataset preparation, tokenization, LoRA training, and evaluation to customize a pretrained LLM for a specific task.
Test-time compute scales inference by allowing a model to spend more computation (e.g., longer reasoning chains) on harder problems.
A token embedding maps each discrete token ID to a dense, learnable vector that captures its semantic meaning in context.
Tokenization splits raw text into tokens (subwords, words, or characters) that a model can process as numerical input.
The transformer architecture uses stacked self-attention and feed-forward layers with residual connections to process sequences in parallel.
A vision encoder (typically a Vision Transformer like ViT or SigLIP) converts an image into a sequence of feature vectors that can be projected into a language model's embedding space.
A VLM combines a visual encoder, projection layer, and language model to process images alongside text, enabling multimodal understanding and generation.
Visual instruction tuning fine-tunes a VLM on image-text instruction-response pairs, teaching it to follow instructions that require visual understanding.
A vocabulary is the complete set of unique tokens a model can recognize; out-of-vocabulary words must be broken into known subword tokens.
Word embeddings map words to dense vectors in a continuous space where semantically similar words are close together, enabling neural networks to process language.
Word2Vec learns word embeddings by training a shallow neural network to predict context words (Skip-gram) or a target word from context (CBOW).
Zero-shot classification predicts classes the model never saw in training by comparing inputs against text descriptions of candidate labels.
AI watermarking embeds imperceptible markers in generated content (images, text, audio) to enable later detection and attribution of AI-generated media.
An autoencoder compresses input data into a low-dimensional bottleneck (encoding) and then reconstructs it, learning efficient representations.
Autoregressive generation produces output one token at a time, conditioning each new token on all previously generated tokens.
Classifier-free guidance steers generation toward a text prompt by interpolating between conditioned and unconditioned model predictions.
CLIP Score measures text-image alignment by computing cosine similarity between CLIP text and image embeddings; higher scores mean the generated image better matches the prompt.
Denoising is the process of training a neural network to predict and remove noise from corrupted data, which is the core mechanism of diffusion models.
Diffusion models generate data by learning to reverse a gradual noise-addition process, iteratively denoising random noise into coherent samples.
The discriminator in a GAN is a classifier that learns to distinguish real data from the fake data produced by the generator.
Flow matching learns a vector field that transports a simple distribution (noise) to a complex one (data) along straight paths, enabling fast generation.
FID measures the distance between the feature distributions of real and generated images using an Inception network; lower FID means more realistic and diverse outputs.
A GAN pits a generator (creates fake data) against a discriminator (detects fakes) in a game that drives both to improve.
Generative AI ethics covers deepfakes, copyright of training data, consent, bias amplification, and environmental cost — the responsibilities that come with creating synthetic content.
Generative models learn the underlying distribution of training data so they can create new, similar samples rather than just classify existing ones.
The generator in a GAN takes random noise as input and produces synthetic data samples that attempt to fool the discriminator.
Inception Score evaluates generative model outputs by measuring image quality (confident classification) and diversity (spread across classes) using a pretrained Inception network.
The information bottleneck forces a model to compress inputs into a lower-dimensional representation, retaining only the most relevant information for the task.
KL divergence loss in VAEs penalizes the encoder's learned distribution for diverging from a standard normal prior, ensuring a smooth, usable latent space.
Latent diffusion applies the diffusion process in a compressed latent space rather than pixel space, dramatically reducing compute while preserving quality.
Latent space is the compressed, abstract representation space where each point corresponds to a possible data sample.
Mode collapse occurs when a GAN's generator learns to produce only a limited variety of outputs, failing to represent the full diversity of the training data.
Multimodal generation produces outputs across different modalities (image, video, audio, 3D) from a single model conditioned on text or other inputs.
In diffusion models, the neural network learns to predict the noise that was added to a clean sample, enabling step-by-step denoising during generation.
A noise schedule defines how much noise is added at each step of the forward diffusion process, controlling the difficulty of the denoising task.
Nucleus (top-p) sampling restricts token selection to the smallest set of tokens whose cumulative probability exceeds a threshold p, balancing diversity and coherence.
Reconstruction loss measures how well a decoded output matches the original input, serving as the primary training signal for autoencoders.
Score matching trains a model to estimate the gradient of the data distribution's log-probability, guiding the reverse diffusion process.
Temperature scaling adjusts the sharpness of the probability distribution over next tokens, with lower values producing more deterministic output.
Text-to-image generation creates images from natural language descriptions by conditioning a generative model on text embeddings.
A U-Net is an encoder-decoder architecture with skip connections that is the standard backbone for noise prediction in diffusion models.
A VAE maps inputs to a probability distribution in latent space rather than a fixed point, enabling smooth interpolation and generation of new samples.
RL + RAG + AI Agents
A2C is the synchronous actor-critic algorithm where multiple parallel workers compute advantages and update a shared policy in lockstep batches.
A3C runs many actor-learners asynchronously on CPU threads, each updating shared parameters with its own gradients — no replay buffer needed.
Actor-critic methods use two networks: an actor that selects actions and a critic that estimates value, combining policy gradient with value-based learning.
The Bellman equation expresses the value of a state as the immediate reward plus the discounted value of the next state, enabling recursive value computation.
Continuous control RL outputs real-valued actions (torques, velocities) instead of discrete choices — required for robotics, driving, and physics simulation.
A DQN replaces the Q-table with a neural network to handle high-dimensional state spaces like raw pixel inputs.
DPO fine-tunes language models directly from preference pairs without needing a separate reward model, simplifying the RLHF pipeline.
The discount factor (gamma) controls how much an RL agent values future rewards versus immediate ones; gamma near 1 means far-sighted, near 0 means myopic.
Epsilon-greedy picks the best known action most of the time but takes a random action with probability epsilon to ensure exploration.
Experience replay stores past transitions in a buffer and samples random mini-batches for training, breaking temporal correlations and improving stability.
The exploration-exploitation dilemma balances trying new actions to discover better rewards versus repeating known good actions.
IMPALA scales actor-critic to thousands of distributed actors using V-trace off-policy correction, decoupling acting from learning for high throughput.
An MDP formalizes sequential decision-making with states, actions, transition probabilities, and rewards, assuming the Markov property.
Max-entropy RL augments the reward with a policy entropy bonus, encouraging the agent to act as randomly as possible while still solving the task.
Model-based RL learns an internal model of the environment's dynamics, enabling the agent to plan ahead by simulating future states.
MCTS builds a search tree by simulating random rollouts from each state, balancing exploration and exploitation to find the best action.
A policy maps states to actions (or action probabilities) and defines the agent's behavior strategy.
Policy gradient methods directly optimize the policy by computing gradients of expected reward with respect to policy parameters.
PPO constrains policy updates to a trust region using a clipped objective, balancing learning speed with training stability.
Q-learning learns a table of state-action values (Q-values) through trial and error, converging to the optimal policy without needing a model of the environment.
A reward model is a neural network trained on human preference comparisons to predict which of two outputs a human would prefer, enabling RLHF.
The reward signal is a scalar feedback value that tells an RL agent how good its last action was, guiding it to learn which behaviors to repeat.
RLHF (Reinforcement Learning from Human Feedback) fine-tunes language models using a reward model trained on human preference comparisons.
SAC maximizes both reward AND policy entropy, giving continuous-control RL stable exploration without separate epsilon-greedy or noise schedules.
In RL, an agent observes a state, takes an action, and receives a reward that signals how good the action was.
TD3 fixes DDPG's overestimation bias with twin Q-networks, delayed policy updates, and target policy smoothing — a robust deterministic continuous-control baseline.
A value function estimates the expected cumulative reward from a given state (or state-action pair) under a particular policy.
Agentic RAG adds intelligent decision points to retrieval pipelines, allowing the system to route queries, evaluate relevance, and retry with different strategies when retrieval fails.
ANN algorithms (HNSW, IVF, LSH) trade a small amount of accuracy for massive speed gains, enabling billion-scale vector search in milliseconds.
Chunk overlap ensures that context at chunk boundaries is not lost by including shared text between adjacent chunks, improving retrieval quality.
Chunking splits large documents into smaller pieces that fit within embedding model and LLM context windows while preserving meaning.
Cosine distance (1 minus cosine similarity) measures how different two vectors' directions are; it is the primary distance metric for embedding-based retrieval.
An embedding model converts text, images, or other data into dense vectors; popular choices include OpenAI text-embedding-3, Cohere Embed, and open-source models like BGE and E5.
Embeddings are dense vector representations that capture semantic meaning, placing similar items close together in continuous space.
Grounding connects an LLM's responses to verifiable external sources, ensuring outputs are factual and traceable rather than purely generated.
Hallucination is when an LLM generates plausible-sounding but factually incorrect or unsupported information, a key problem that RAG helps mitigate.
Hybrid search combines keyword-based (BM25) and semantic (vector) search to leverage the strengths of both exact matching and meaning-based retrieval.
A knowledge graph stores information as entities and relationships (triples), enabling structured reasoning and multi-hop queries.
Query routing classifies a user's intent and directs the query to the most appropriate retrieval source or strategy, such as vector search, web search, SQL, or no retrieval.
Retrieval-Augmented Generation grounds LLM responses in external knowledge by retrieving relevant documents before generating an answer.
RAG evaluation measures retrieval relevance, answer faithfulness, and end-to-end quality to ensure the system returns accurate, grounded responses.
RAG monitoring tracks retrieval hit rates, latency, cost, and answer quality in production to detect regressions and maintain reliability.
A RAG pipeline retrieves relevant documents from a knowledge base and includes them as context when generating an LLM response.
Reranking uses a cross-encoder or other model to re-score and reorder retrieved documents for higher relevance before generation.
Retrieval selects the most relevant documents or passages from a knowledge base based on a user query, typically using vector similarity.
Retrieval-augmented means grounding a generative model's output in external knowledge fetched at query time, reducing hallucination and enabling up-to-date responses.
Self-RAG trains the model to decide whether to retrieve, evaluate retrieved document relevance, and verify that its response is supported by evidence, using special reflection tokens.
Semantic similarity measures how close in meaning two texts are, typically computed as cosine similarity between their embedding vectors.
A vector database stores and indexes embedding vectors for fast approximate nearest-neighbor search at scale.
Vector similarity measures how close two embeddings are, typically using cosine similarity or dot product, to find semantically related content.
Agent architecture defines the structural design of an AI agent system including the LLM backbone, tool registry, memory modules, and orchestration logic.
Agent benchmarks are standardized test suites that measure an AI agent's ability to complete tasks, use tools, and reason across diverse scenarios.
Agent frameworks (LangChain, CrewAI, AutoGen, Anthropic Agent SDK) provide pre-built components for tool registries, memory, orchestration, and multi-agent coordination.
The agent loop is the observe-think-act cycle where an AI agent perceives its environment, reasons about the next step, and executes an action.
Agent memory systems store short-term context and long-term knowledge so agents can maintain state across interactions.
Agent observability captures every prompt, tool call, retry, and token cost into traces so you can debug nondeterministic loops and attribute failures to a specific step.
Autonomous coding agents take a task description and independently explore codebases, plan changes, write code, run tests, and iterate until the task is complete.
Browser agents automate web interactions using tools like Playwright or Puppeteer, combining LLM reasoning with programmatic DOM manipulation.
Code agents autonomously read codebases, plan changes, edit files, run tests, and iterate on failures to produce working software changes.
Computer use enables AI agents to interact with software through screenshots and mouse/keyboard actions, automating any GUI-based application without APIs.
Constrained decoding enforces output grammar (JSON schema, regex, BNF) at the token-sampling level — function-calling accuracy jumps from ~90% to 100% with it.
CrewAI is a multi-agent framework where role-based agents with distinct personas collaborate through task delegation and crew orchestration.
Distributed tracing stitches spans from many services into a single causal timeline using trace and span IDs, exposing latency and failure across the whole agent stack.
Function calling is a structured protocol where an LLM outputs a JSON schema specifying which function to call with what arguments.
Function calling works by injecting tool schemas into the prompt, then constraining the model to emit a structured JSON call that the runtime parses and dispatches.
Guardrails are safety mechanisms (input/output filters, cost limits, human-in-the-loop) that constrain agent behavior to safe and intended actions.
GUI agents perceive screens as images, reason about visual layouts, and take physical actions (clicks, keystrokes) to interact with graphical user interfaces.
Human-in-the-loop systems require human approval at critical decision points, keeping AI agents safe by preventing irreversible actions without oversight.
LangChain is an agent framework providing composable chains, tool integrations, memory modules, and LangGraph for stateful graph-based orchestration.
Multi-agent systems coordinate multiple specialized AI agents that collaborate, delegate, and communicate to solve complex tasks.
OpenTelemetry is a vendor-neutral tracing spec: traces span across LLM calls, tool calls, and DB queries, making agent debugging tractable.
Parallel tool calls let the model emit multiple independent tool invocations in one turn so the runtime can fan them out concurrently, cutting latency dramatically.
Planning is the ability of an agent to decompose a complex goal into a sequence of sub-tasks and execute them in the right order.
The ReAct pattern interleaves reasoning traces and actions, letting agents think step-by-step before each tool call.
A scratchpad is a working memory buffer where an agent records intermediate reasoning steps, observations, and plans during multi-step task execution.
SWE-bench is the standard benchmark for code agents, testing whether they can resolve real GitHub issues by producing patches that make failing tests pass.
A tool schema is a structured JSON description of a function's name, parameters, and types that tells an LLM what tools are available and how to call them.
Tool use enables an LLM to invoke external functions (APIs, search, code execution) to take actions beyond text generation.
Trajectory evaluation assesses not just the final outcome but the sequence of steps an agent took, checking for efficiency, safety, and correctness.
ML Engineering & Architecture
A/B testing compares two model variants on live traffic to measure which performs better on business metrics before full rollout.
Amazon SageMaker is AWS's end-to-end ML platform providing managed training, endpoints, pipelines, and JumpStart for deploying foundation models.
Azure ML is Microsoft's ML platform with deep Microsoft ecosystem integration and exclusive access to Azure OpenAI Service for enterprise GPT-4 deployment.
Bias mitigation techniques (re-sampling, adversarial debiasing, threshold adjustment) reduce unfair disparities in model predictions across demographic groups.
CI/CD for ML automates model training, testing, validation, and deployment pipelines, ensuring reproducible and reliable model releases.
Cost architecture is the discipline of designing AI systems for economic viability through GPU selection, multi-model routing, token optimization, and caching strategies.
Cost optimization for ML means tuning batch size, cache hit rate, model size, and routing so spend tracks value — often a 10x lever once you measure cost-per-request.
Data drift occurs when the statistical distribution of production data changes from what the model was trained on, degrading performance.
The EU AI Act is a risk-tiered regulation (unacceptable, high, limited, minimal) that mandates documentation, human oversight, and conformity assessments for high-risk AI systems.
Fairness metrics (demographic parity, equalized odds, calibration) quantify whether a model's predictions are equitable across protected demographic groups.
A feature store is a centralized repository that manages, serves, and shares engineered features across ML models and teams, ensuring consistency between training and serving.
Vertex AI is Google Cloud's unified ML platform offering custom training, prediction endpoints, TPU hardware, and BigQuery ML for SQL-based modeling.
GPU selection trades memory bandwidth, VRAM, FLOPs, and price (A100 vs H100 vs L4 vs consumer) — the right pick depends on model size, batch size, and latency budget.
Knowledge distillation trains a small student model to mimic a large teacher model's outputs, transferring performance at a fraction of the compute cost.
An LLM gateway sits between your application and LLM providers, providing a unified API, load balancing, failover, rate limiting, cost tracking, and caching.
LLM routing sends each request to the cheapest model that can handle it — a small classifier or heuristic in front of a model cascade can cut spend 5-10x with no quality loss.
LLM system design layers retrieval, prompt assembly, model routing, guardrails, caching, and evals — the model is just one component in a much larger production stack.
LLMOps extends MLOps with prompt versioning, guardrails, LLM gateways, evaluation pipelines, and cost management specific to large language model workloads.
An ML pipeline automates the end-to-end workflow from data ingestion through feature engineering, training, evaluation, and deployment.
ML security covers prompt injection, model theft, training-data poisoning, and inference-time exfiltration — threats that classical AppSec doesn't catch.
ML system design balances data pipelines, training infra, online/offline serving, monitoring, and rollback — interview-style frameworks force you to reason about all five together.
MLOps applies DevOps practices (CI/CD, versioning, monitoring) to machine learning systems for reliable, reproducible deployments.
A model card is a standardized document accompanying a trained model that details its intended use, performance metrics by demographic group, limitations, and ethical considerations.
Model compression reduces a model's size and compute requirements through techniques like quantization, pruning, and knowledge distillation.
Model drift is the degradation of a deployed model's performance over time as real-world data patterns shift away from the training distribution.
A model registry is a centralized catalog that versions, tracks, and manages trained model artifacts along with their metadata, metrics, and lineage.
Model serving deploys trained models behind APIs (REST, gRPC, streaming) to handle real-time or batch inference requests at scale.
Observability provides visibility into a deployed ML system's health through metrics, logs, traces, and drift detection.
PII handling means detecting, redacting, and avoiding logging personal data before it reaches prompts, embeddings, or training sets — a core requirement under GDPR, HIPAA, and CCPA.
Point-in-time joins reconstruct what a feature looked like AT a specific past moment — essential for training without future leakage from the feature store.
Prompt injection defense layers input sanitization, instruction hierarchies, output filters, and tool sandboxing — no single mitigation is sufficient, only defense in depth.
Prompt versioning tracks changes to system prompts like code — with version control, regression testing, and rollback — because prompt changes alter LLM behavior as much as code changes.
Pruning removes unnecessary weights or neurons from a trained model, reducing size and compute while preserving most of the original performance.
Quantization converts model weights from high-precision (32-bit float) to lower precision (8-bit int or 4-bit) to reduce memory and speed up inference.
Recommendation system design follows a candidate-generation then ranking funnel, with embeddings for recall and gradient-boosted or deep models for precision at the top.
Speculative decoding uses a small draft model to propose multiple tokens that a larger model verifies in parallel, speeding up inference 2-3x.
Training-serving skew is when features are computed differently in training vs serving (e.g., different timezones, units, or fallbacks) — a silent killer of model quality in production.