# datarekha — full content map > Every published lesson and essay on https://datarekha.com. datarekha — free, interactive tutorials for the modern data and AI stack: Python, SQL, Git & the command line, DSA, NumPy, Pandas, data visualization, machine learning, time series, recommender systems, deep learning, MLOps, PySpark, and generative & agentic AI — plus GATE DA exam prep. ## Python Master Python the way professionals use it today: clean syntax, modern type hints, asyncio for high-throughput LLM apps, Pydantic for safe data, FastAPI for serving, and the engineering practices that ship. ### Core Language - [Getting Started](https://datarekha.com/python/getting-started/) - [Syntax & Style](https://datarekha.com/python/syntax-and-style/) - [Variables & Types](https://datarekha.com/python/variables-and-types/) - [Numbers](https://datarekha.com/python/numbers/) - [Strings](https://datarekha.com/python/strings/) - [Lists](https://datarekha.com/python/lists/) - [Tuples](https://datarekha.com/python/tuples/) - [Sets](https://datarekha.com/python/sets/) - [Dictionaries](https://datarekha.com/python/dictionaries/) - [Control Flow](https://datarekha.com/python/control-flow/) - [Functions](https://datarekha.com/python/functions/) - [Comprehensions](https://datarekha.com/python/comprehensions/) ### Pythonic Mid-Level - [Iterators](https://datarekha.com/python/iterators/) - [Generators](https://datarekha.com/python/generators/) - [Decorators](https://datarekha.com/python/decorators/) - [Context Managers](https://datarekha.com/python/context-managers/) - [Errors & Exceptions](https://datarekha.com/python/errors-and-exceptions/) - [Modules & Packages](https://datarekha.com/python/modules-and-packages/) - [Environments & packaging: venv, uv, pex](https://datarekha.com/python/venv-uv-pex/) - [File I/O](https://datarekha.com/python/file-io/) - [pathlib](https://datarekha.com/python/pathlib/) - [Regex](https://datarekha.com/python/regex/) - [datetime & timezones](https://datarekha.com/python/datetime/) - [Logging](https://datarekha.com/python/logging/) ### OOP & Modern Python - [Classes & Instances](https://datarekha.com/python/classes/) - [Inheritance vs Composition](https://datarekha.com/python/inheritance/) - [Dunder Methods](https://datarekha.com/python/dunder-methods/) - [dataclasses](https://datarekha.com/python/dataclasses/) - [Type Hints Deep Dive](https://datarekha.com/python/type-hints/) ### Concurrency & Async - [The GIL](https://datarekha.com/python/gil/) - [Threading](https://datarekha.com/python/threading/) - [Multiprocessing](https://datarekha.com/python/multiprocessing/) - [Asyncio](https://datarekha.com/python/asyncio/) - [Async patterns for LLM apps](https://datarekha.com/python/async-llm-patterns/) ### Data Validation & APIs - [Pydantic v2](https://datarekha.com/python/pydantic/) - [Pydantic for LLM outputs](https://datarekha.com/python/pydantic-llm-outputs/) - [FastAPI](https://datarekha.com/python/fastapi/) ### Python for LLM Apps - [Tokenization](https://datarekha.com/python/tokenization/) - [OpenAI & Anthropic SDKs](https://datarekha.com/python/openai-anthropic-sdks/) - [Streaming responses](https://datarekha.com/python/streaming/) - [Embeddings](https://datarekha.com/python/embeddings/) ## NumPy NumPy is the array engine underneath Pandas, scikit-learn, PyTorch, and JAX. Learn vectorization, broadcasting, and the linear algebra you'll use every day. ### Fundamentals - [Why NumPy](https://datarekha.com/numpy/why-numpy/) - [The ndarray](https://datarekha.com/numpy/ndarray/) - [Array creation](https://datarekha.com/numpy/creation/) - [Dtypes deep dive](https://datarekha.com/numpy/dtypes/) - [Indexing & slicing](https://datarekha.com/numpy/indexing/) - [Reshape, ravel, transpose](https://datarekha.com/numpy/reshape/) ### Vectorization - [Broadcasting](https://datarekha.com/numpy/broadcasting/) - [Universal functions](https://datarekha.com/numpy/ufuncs/) - [Aggregations & axis](https://datarekha.com/numpy/aggregations/) - [Boolean masks](https://datarekha.com/numpy/boolean-masks/) ### Linear Algebra - [dot, matmul, @](https://datarekha.com/numpy/matmul/) - [np.linalg toolbox](https://datarekha.com/numpy/linalg/) - [einsum — one mental model](https://datarekha.com/numpy/einsum/) - [Random & reproducibility](https://datarekha.com/numpy/random/) ## Pandas Read, clean, reshape, join, and analyze tabular data. Avoid the silent bugs that bite everyone. Learn the patterns that scale to millions of rows. ### Getting Started - [Series](https://datarekha.com/pandas/series/) - [DataFrame basics](https://datarekha.com/pandas/dataframe-basics/) - [Reading data](https://datarekha.com/pandas/reading-data/) - [Selection: loc vs iloc](https://datarekha.com/pandas/selection/) - [Missing data](https://datarekha.com/pandas/missing-data/) ### Transforming Data - [GroupBy](https://datarekha.com/pandas/groupby/) - [Merge & join](https://datarekha.com/pandas/merge-join/) - [pivot, melt, stack](https://datarekha.com/pandas/reshape/) - [Time series](https://datarekha.com/pandas/time-series/) - [Method chaining](https://datarekha.com/pandas/method-chaining/) ### Performance & Pitfalls - [Memory optimization](https://datarekha.com/pandas/memory/) - [SettingWithCopyWarning — fixed](https://datarekha.com/pandas/settingwithcopy/) - [When to switch to Polars](https://datarekha.com/pandas/polars-intro/) ## Storytelling with Visualisation Don't just plot data — make it persuade. Build the visualizations a data scientist is paid for (loss curves, confusion matrices, distributions, regressions), then learn the craft of data storytelling: choosing the right chart, guiding the eye, annotating for meaning, and shaping a narrative leaders act on. ### Matplotlib - [Why visualization matters](https://datarekha.com/visualization/why-viz/) - [Figure & Axes](https://datarekha.com/visualization/figure-and-axes/) - [Line & scatter plots](https://datarekha.com/visualization/line-scatter/) - [Subplots & GridSpec](https://datarekha.com/visualization/subplots/) - [ML-specific plots](https://datarekha.com/visualization/ml-plots/) ### Seaborn - [Distributions](https://datarekha.com/visualization/seaborn-distributions/) - [Categorical plots](https://datarekha.com/visualization/seaborn-categorical/) - [Heatmaps & pairplot](https://datarekha.com/visualization/seaborn-heatmaps/) ### Storytelling - [Choosing the right chart](https://datarekha.com/visualization/choosing-the-right-chart/) - [The narrative arc of a chart](https://datarekha.com/visualization/narrative-arc/) - [Annotation & guiding the eye](https://datarekha.com/visualization/annotation-and-focus/) - [Colour & accessibility for clarity](https://datarekha.com/visualization/color-for-clarity/) ## Business Analytics The analytics they teach in a top MBA — free, and from scratch. Turn raw numbers into decisions: read a P&L, work out unit economics (CAC, LTV), segment customers, debug the funnel, weigh choices with expected value and decision trees, forecast demand, and tell the story that changes the room. Every business term is defined the first time it appears — no finance background assumed, beginner to advanced. ### Foundations - [What Business Analytics Is](https://datarekha.com/business-analytics/what-is-business-analytics/) - [Descriptive → Prescriptive](https://datarekha.com/business-analytics/four-types/) - [Metrics vs KPIs](https://datarekha.com/business-analytics/metrics-and-kpis/) ### Business & Financial Literacy - [Revenue, Cost & Profit](https://datarekha.com/business-analytics/revenue-cost-profit/) - [Reading a P&L](https://datarekha.com/business-analytics/income-statement/) - [Break-Even & Contribution Margin](https://datarekha.com/business-analytics/break-even/) - [Unit Economics: CAC & LTV](https://datarekha.com/business-analytics/unit-economics/) ### Descriptive & Customer Analytics - [Averages That Lie](https://datarekha.com/business-analytics/averages-that-lie/) - [Segmentation & RFM](https://datarekha.com/business-analytics/segmentation-rfm/) - [Funnel Analysis](https://datarekha.com/business-analytics/funnel-analysis/) - [Cohorts, Retention & Churn](https://datarekha.com/business-analytics/cohort-retention/) - [Customer Lifetime Value](https://datarekha.com/business-analytics/customer-lifetime-value/) ### Decision Analysis - [Expected Value](https://datarekha.com/business-analytics/expected-value/) - [Decision Trees](https://datarekha.com/business-analytics/decision-trees-business/) - [Sensitivity & What-If](https://datarekha.com/business-analytics/sensitivity-analysis/) - [Monte Carlo Simulation](https://datarekha.com/business-analytics/monte-carlo-business/) ### Forecasting - [Trend & Seasonality](https://datarekha.com/business-analytics/forecasting-intro/) - [Smoothing & Forecast Error](https://datarekha.com/business-analytics/smoothing-and-accuracy/) ### Prescriptive, Experiments & Communication - [Optimization & Constraints](https://datarekha.com/business-analytics/optimization-intro/) - [A/B Testing for Decisions](https://datarekha.com/business-analytics/ab-testing-business/) - [Storytelling with Data](https://datarekha.com/business-analytics/storytelling-with-data/) ## SQL From SELECT to window functions, recursive CTEs, and the analytics patterns you'll actually be paid to write. Postgres-first with Snowflake/BigQuery/Redshift notes. ### Foundations - [SELECT basics](https://datarekha.com/sql/select-basics/) - [WHERE & filtering](https://datarekha.com/sql/where/) - [ORDER BY, LIMIT, DISTINCT](https://datarekha.com/sql/order-limit/) - [Aggregates & GROUP BY](https://datarekha.com/sql/aggregates/) - [CASE expressions](https://datarekha.com/sql/case-expressions/) - [NULLs done right](https://datarekha.com/sql/nulls/) ### Joins - [INNER JOIN](https://datarekha.com/sql/inner-join/) - [LEFT, RIGHT, FULL](https://datarekha.com/sql/outer-joins/) - [Anti-joins](https://datarekha.com/sql/anti-joins/) ### Advanced Query Building - [Subqueries](https://datarekha.com/sql/subqueries/) - [CTEs (WITH)](https://datarekha.com/sql/ctes/) - [Recursive CTEs](https://datarekha.com/sql/recursive-ctes/) - [Window functions](https://datarekha.com/sql/window-functions/) - [Ranking functions](https://datarekha.com/sql/ranking/) ### Analytics Patterns - [Top-N per group](https://datarekha.com/sql/top-n-per-group/) - [Deduplication](https://datarekha.com/sql/deduplication/) - [Cohort analysis](https://datarekha.com/sql/cohort-analysis/) - [Sessionization](https://datarekha.com/sql/sessionization/) ### Data Platforms & Pipelines - [OLTP vs OLAP](https://datarekha.com/sql/oltp-vs-olap/) - [Dimensional Modeling](https://datarekha.com/sql/dimensional-modeling/) - [Slowly Changing Dimensions](https://datarekha.com/sql/slowly-changing-dimensions/) - [Warehouse, Lake & Lakehouse](https://datarekha.com/sql/warehouse-lake-lakehouse/) - [Columnar Storage & Parquet](https://datarekha.com/sql/columnar-storage/) - [ETL vs ELT](https://datarekha.com/sql/etl-vs-elt/) - [Change Data Capture (CDC)](https://datarekha.com/sql/change-data-capture/) - [Reverse ETL](https://datarekha.com/sql/reverse-etl/) - [Orchestration: Airflow & DAGs](https://datarekha.com/sql/data-orchestration/) ## PySpark Understand the cluster, the DAG, the Catalyst optimizer, and the shuffle that ate your job. Learn PySpark the way platform engineers actually run it. ### Big Data Background - [What 'big data' actually means](https://datarekha.com/pyspark/what-is-big-data/) - [Hadoop overview](https://datarekha.com/pyspark/hadoop-overview/) - [HDFS architecture](https://datarekha.com/pyspark/hdfs/) - [The Spark ecosystem](https://datarekha.com/pyspark/spark-ecosystem/) ### Spark Architecture - [Driver & executors](https://datarekha.com/pyspark/driver-executors/) - [Jobs → stages → tasks](https://datarekha.com/pyspark/jobs-stages-tasks/) - [DAG & lazy evaluation](https://datarekha.com/pyspark/lazy-evaluation/) - [Shuffles](https://datarekha.com/pyspark/shuffles/) ### DataFrames - [DataFrame intro](https://datarekha.com/pyspark/dataframe-intro/) - [Schemas](https://datarekha.com/pyspark/schemas/) - [Joins in Spark](https://datarekha.com/pyspark/spark-joins/) - [Window functions](https://datarekha.com/pyspark/spark-windows/) - [Pandas UDFs](https://datarekha.com/pyspark/pandas-udfs/) ### Internals & Optimization - [Catalyst optimizer](https://datarekha.com/pyspark/catalyst/) - [Reading execution plans](https://datarekha.com/pyspark/explain-plans/) - [Adaptive Query Execution](https://datarekha.com/pyspark/aqe/) - [Partitioning](https://datarekha.com/pyspark/partitioning/) - [Skew & salting](https://datarekha.com/pyspark/skew/) ### Databricks in Production - [Databricks platform overview](https://datarekha.com/pyspark/databricks-intro/) - [Delta Lake & MERGE](https://datarekha.com/pyspark/delta-lake/) - [Jobs, Asset Bundles, scheduling](https://datarekha.com/pyspark/databricks-jobs/) - [MLflow + Unity Catalog serving](https://datarekha.com/pyspark/databricks-mlflow/) ## Math for ML The math that actually shows up in machine learning — explained with numpy, code, and the geometric intuition that finally makes it click. ### Linear Algebra - [Why linear algebra matters](https://datarekha.com/math-for-ml/why-linalg/) - [Vectors](https://datarekha.com/math-for-ml/vectors/) - [Norms & distances](https://datarekha.com/math-for-ml/norms-and-distances/) - [Matrices as transformations](https://datarekha.com/math-for-ml/matrices/) - [Matrix multiplication](https://datarekha.com/math-for-ml/matrix-multiplication/) - [Tensor operations](https://datarekha.com/math-for-ml/tensor-operations/) - [Linear systems & RREF](https://datarekha.com/math-for-ml/linear-systems-rref/) - [Rank, independence & basis](https://datarekha.com/math-for-ml/rank-independence-basis/) - [Orthogonality & least squares](https://datarekha.com/math-for-ml/orthogonality-least-squares/) - [Eigenvalues & eigenvectors](https://datarekha.com/math-for-ml/eigenvalues/) - [Singular Value Decomposition](https://datarekha.com/math-for-ml/svd/) - [PCA from scratch](https://datarekha.com/math-for-ml/pca/) ### Calculus & Optimization - [Derivatives & tangents](https://datarekha.com/math-for-ml/derivatives/) - [Partial derivatives](https://datarekha.com/math-for-ml/partial-derivatives/) - [Gradient descent](https://datarekha.com/math-for-ml/gradient-descent/) - [Backpropagation foundations](https://datarekha.com/math-for-ml/backprop/) - [Jacobian, Hessian & Taylor](https://datarekha.com/math-for-ml/jacobian-hessian-taylor/) - [Convexity](https://datarekha.com/math-for-ml/convexity/) - [Lagrange multipliers](https://datarekha.com/math-for-ml/lagrange-multipliers/) ### Probability & Statistics - [What is probability](https://datarekha.com/math-for-ml/probability-basics/) - [Bayes theorem](https://datarekha.com/math-for-ml/bayes/) - [Distributions you should know](https://datarekha.com/math-for-ml/distributions/) - [Sampling methods](https://datarekha.com/math-for-ml/sampling-methods/) - [Stochastic processes](https://datarekha.com/math-for-ml/stochastic-processes/) - [Covariance & correlation](https://datarekha.com/math-for-ml/covariance/) - [The multivariate Gaussian](https://datarekha.com/math-for-ml/multivariate-gaussian/) - [Central limit theorem](https://datarekha.com/math-for-ml/clt/) - [Estimation & confidence intervals](https://datarekha.com/math-for-ml/estimation-ci/) - [Hypothesis testing](https://datarekha.com/math-for-ml/hypothesis-testing/) - [A/B testing](https://datarekha.com/math-for-ml/ab-testing/) - [Maximum likelihood & MAP](https://datarekha.com/math-for-ml/mle-map/) - [Entropy & information theory](https://datarekha.com/math-for-ml/entropy-information/) - [KL Divergence](https://datarekha.com/math-for-ml/kl-divergence/) - [Simpson's Paradox](https://datarekha.com/math-for-ml/simpsons-paradox/) ### Numerical & Applied Math - [Numerical stability](https://datarekha.com/math-for-ml/numerical-stability/) - [The Fourier transform](https://datarekha.com/math-for-ml/fourier-transform/) - [Graph theory](https://datarekha.com/math-for-ml/graph-theory/) ## Machine Learning End-to-end ML workflow with scikit-learn, XGBoost, LightGBM, and the honest engineering practices that prevent silent failures in production. ### Foundations - [What ML actually is](https://datarekha.com/ml/what-is-ml/) - [The scikit-learn API](https://datarekha.com/ml/sklearn-api/) - [Feature engineering & encoding](https://datarekha.com/ml/feature-engineering/) - [Train/val/test & CV](https://datarekha.com/ml/train-test-split/) - [Bias–variance & learning curves](https://datarekha.com/ml/bias-variance/) - [Curse of Dimensionality](https://datarekha.com/ml/curse-of-dimensionality/) ### Regression - [Linear regression](https://datarekha.com/ml/linear-regression/) - [L1, L2, Elastic Net](https://datarekha.com/ml/regularization/) ### Classification - [Logistic regression](https://datarekha.com/ml/logistic-regression/) - [K-nearest neighbors](https://datarekha.com/ml/knn/) - [Naive Bayes](https://datarekha.com/ml/naive-bayes/) - [Support vector machines](https://datarekha.com/ml/svm/) - [Class imbalance](https://datarekha.com/ml/class-imbalance/) ### Trees & Boosting - [Bagging, boosting & stacking](https://datarekha.com/ml/ensembles/) - [Decision trees](https://datarekha.com/ml/decision-trees/) - [Random forests](https://datarekha.com/ml/random-forest/) - [XGBoost, LightGBM, CatBoost](https://datarekha.com/ml/xgboost/) - [SHAP & feature importance](https://datarekha.com/ml/shap/) ### Evaluation - [Metrics that matter](https://datarekha.com/ml/metrics/) - [Data leakage](https://datarekha.com/ml/data-leakage/) - [Hyperparameter tuning](https://datarekha.com/ml/hyperparameter-tuning/) - [Feature selection](https://datarekha.com/ml/feature-selection/) - [Model selection & nested CV](https://datarekha.com/ml/model-selection/) - [Model Calibration](https://datarekha.com/ml/calibration/) - [AutoML in practice](https://datarekha.com/ml/automl/) ### Unsupervised - [K-means clustering](https://datarekha.com/ml/kmeans-clustering/) - [DBSCAN & hierarchical](https://datarekha.com/ml/clustering-density/) - [PCA & dimensionality reduction](https://datarekha.com/ml/pca/) - [t-SNE & UMAP](https://datarekha.com/ml/tsne-umap/) - [Gaussian mixture models](https://datarekha.com/ml/gmm/) - [Anomaly detection](https://datarekha.com/ml/anomaly-detection/) ### Responsible ML - [Interpretability: SHAP vs LIME](https://datarekha.com/ml/interpretability/) - [Fairness & bias in ML](https://datarekha.com/ml/fairness/) ## Deep Learning Neural networks the way you'll build them today — PyTorch, autograd and backprop from scratch, the training stack that actually matters, CNNs and RNNs, and deep generative models (VAEs, GANs, diffusion). Language models and transformers live in their own NLP & Transformers section. ### Foundations - [PyTorch quickstart](https://datarekha.com/deep-learning/pytorch-quickstart/) - [Autograd](https://datarekha.com/deep-learning/autograd/) - [Backprop by hand](https://datarekha.com/deep-learning/backprop-from-scratch/) - [The training loop](https://datarekha.com/deep-learning/training-loop/) - [Activation functions](https://datarekha.com/deep-learning/activations/) - [Softmax](https://datarekha.com/deep-learning/softmax/) - [Loss Functions](https://datarekha.com/deep-learning/loss-functions/) ### Training - [Weight initialization](https://datarekha.com/deep-learning/weight-init/) - [Vanishing & exploding gradients](https://datarekha.com/deep-learning/grad-problems/) - [SGD → Adam → AdamW](https://datarekha.com/deep-learning/optimizers/) - [Learning-rate schedules](https://datarekha.com/deep-learning/lr-schedules/) - [Batch size ↔ learning rate](https://datarekha.com/deep-learning/batchsize-lr/) - [Overfitting & bias–variance](https://datarekha.com/deep-learning/overfitting-bias-variance/) - [Dropout, BN, LN](https://datarekha.com/deep-learning/regularization-dl/) - [Mixed precision](https://datarekha.com/deep-learning/mixed-precision/) - [Activation checkpointing](https://datarekha.com/deep-learning/activation-checkpointing/) - [Multi-GPU: DDP & FSDP](https://datarekha.com/deep-learning/distributed-training/) - [Pipeline parallelism](https://datarekha.com/deep-learning/pipeline-parallelism/) ### Architectures - [Convolutional neural networks](https://datarekha.com/deep-learning/cnns/) - [RNNs & LSTMs](https://datarekha.com/deep-learning/rnns-lstms/) ### Generative models - [GANs, VAEs & Diffusion](https://datarekha.com/deep-learning/generative-models/) - [VAEs from scratch](https://datarekha.com/deep-learning/vae-from-scratch/) - [GANs from scratch](https://datarekha.com/deep-learning/gans-from-scratch/) - [Diffusion models (DDPM)](https://datarekha.com/deep-learning/diffusion-ddpm/) - [Latent diffusion & Stable Diffusion](https://datarekha.com/deep-learning/latent-diffusion/) - [Flow matching & rectified flow](https://datarekha.com/deep-learning/flow-matching/) - [Evaluating generative models](https://datarekha.com/deep-learning/generative-eval/) - [Video, 3D & audio generation](https://datarekha.com/deep-learning/video-3d-audio-generation/) ## NLP & Transformers Natural language processing the way it actually evolved: classical text features and embeddings, the neural sequence models before attention, the transformer built from the ground up, the foundation models and LLMs that followed, and how transformers extended to vision and multimodal. ### Classical NLP - [Text preprocessing](https://datarekha.com/nlp/text-processing/) - [Bag-of-words & TF-IDF](https://datarekha.com/nlp/bow-tfidf/) - [word2vec: CBOW & skip-gram](https://datarekha.com/nlp/word2vec/) - [GloVe & fastText](https://datarekha.com/nlp/glove-fasttext/) - [Information retrieval & BM25](https://datarekha.com/nlp/information-retrieval/) - [Topic modeling & LDA](https://datarekha.com/nlp/topic-modeling/) - [Sequence labeling: NER & POS](https://datarekha.com/nlp/sequence-labeling/) - [Text classification: CNN & RNN](https://datarekha.com/nlp/text-classification-cnn-rnn/) - [Language models before transformers](https://datarekha.com/nlp/pre-transformer-textgen/) - [Natural language inference](https://datarekha.com/nlp/nli/) - [Multilingual NLP](https://datarekha.com/nlp/multilingual-nlp/) - [Entity linking & knowledge graphs](https://datarekha.com/nlp/entity-linking-kg/) ### Neural NLP (pre-transformer) - [Sequence-to-sequence models](https://datarekha.com/nlp/seq2seq/) - [Attention (the RNN era)](https://datarekha.com/nlp/rnn-attention/) - [Neural machine translation](https://datarekha.com/nlp/neural-machine-translation/) - [Text summarization](https://datarekha.com/nlp/text-summarization/) - [Question answering](https://datarekha.com/nlp/question-answering/) - [Dialogue systems](https://datarekha.com/nlp/dialogue-systems/) ### Transformer architecture - [Tokenization & BPE](https://datarekha.com/nlp/tokenization/) - [Self-attention](https://datarekha.com/nlp/self-attention/) - [Multi-head attention](https://datarekha.com/nlp/multi-head/) - [Positional encodings & RoPE](https://datarekha.com/nlp/positional-encodings/) - [Inside the transformer block](https://datarekha.com/nlp/transformer-block/) - [The Transformer Architecture](https://datarekha.com/nlp/the-transformer/) - [FlashAttention](https://datarekha.com/nlp/flash-attention/) - [Sparse & sub-quadratic attention](https://datarekha.com/nlp/sparse-attention/) - [Differential attention](https://datarekha.com/nlp/differential-attention/) ### Foundation models & LLMs - [BERT, GPT, T5](https://datarekha.com/nlp/bert-gpt-t5/) - [Anatomy of a modern LLM](https://datarekha.com/nlp/modern-llm-anatomy/) - [Pretraining LLMs](https://datarekha.com/nlp/pretraining/) - [Scaling laws](https://datarekha.com/nlp/scaling-laws/) - [Multi-token prediction](https://datarekha.com/nlp/multi-token-prediction/) - [Mixture of Experts](https://datarekha.com/nlp/moe/) - [Frontier LLM walkthrough: DeepSeek-V3](https://datarekha.com/nlp/frontier-llm-walkthrough/) - [Hugging Face transformers](https://datarekha.com/nlp/huggingface/) - [LoRA & QLoRA fine-tuning](https://datarekha.com/nlp/lora/) ### Vision & multimodal - [Vision Transformers (ViT)](https://datarekha.com/nlp/vision-transformers/) - [CLIP: contrastive vision-language](https://datarekha.com/nlp/clip-contrastive/) - [Vision-language model architectures](https://datarekha.com/nlp/vlm-architectures/) - [VLM model families](https://datarekha.com/nlp/vlm-model-families/) - [Unified multimodal models](https://datarekha.com/nlp/unified-multimodal/) - [Omni & embodied models](https://datarekha.com/nlp/omni-embodied/) - [Video & document understanding](https://datarekha.com/nlp/video-document-understanding/) - [Multimodal RAG](https://datarekha.com/nlp/multimodal-rag/) ## MLOps The lifecycle, Docker, CI/CD, MLflow, FastAPI/BentoML serving, monitoring, and the incident-response playbook the textbook skips. ### Lifecycle - [The real ML lifecycle](https://datarekha.com/mlops/ml-lifecycle/) - [Establishing baselines](https://datarekha.com/mlops/baselines/) - [Data-centric AI](https://datarekha.com/mlops/data-centric/) - [Data contracts & quality](https://datarekha.com/mlops/data-contracts/) ### Tooling - [MLflow experiment tracking](https://datarekha.com/mlops/mlflow/) - [Data & model versioning](https://datarekha.com/mlops/data-versioning/) - [Model registry & promotion](https://datarekha.com/mlops/model-registry/) - [Testing ML & the ML Test Score](https://datarekha.com/mlops/testing-ml/) - [Docker for ML](https://datarekha.com/mlops/docker-for-ml/) - [CI/CD with GitHub Actions](https://datarekha.com/mlops/github-actions/) - [Pipeline orchestration](https://datarekha.com/mlops/orchestration/) ### Serving & Monitoring - [Serving with FastAPI](https://datarekha.com/mlops/fastapi-serving/) - [BentoML & Ray Serve](https://datarekha.com/mlops/bentoml/) - [Batch vs real-time inference](https://datarekha.com/mlops/batch-vs-realtime/) - [Deployment Strategies](https://datarekha.com/mlops/deployment-strategies/) - [A/B testing & experimentation](https://datarekha.com/mlops/ab-testing/) - [Training-Serving Skew](https://datarekha.com/mlops/training-serving-skew/) - [Drift & monitoring](https://datarekha.com/mlops/drift/) - [Retraining & continual learning](https://datarekha.com/mlops/retraining/) - [Incident response](https://datarekha.com/mlops/incident-response/) - [LLMOps — operating LLMs](https://datarekha.com/mlops/llmops/) ### Platform & Infrastructure - [The cloud: AWS, Azure & GCP](https://datarekha.com/mlops/cloud-platforms/) - [Kubeflow Pipelines](https://datarekha.com/mlops/kubeflow/) - [Kubernetes for ML](https://datarekha.com/mlops/kubernetes-for-ml/) - [Feature stores (Feast, Tecton)](https://datarekha.com/mlops/feature-stores/) - [Cost & FinOps for ML/GPUs](https://datarekha.com/mlops/ml-cost-finops/) - [Responsible-AI ops](https://datarekha.com/mlops/responsible-ai-ops/) - [ML security (MLSecOps)](https://datarekha.com/mlops/ml-security/) ## Generative AI What an LLM is and isn't, the autoregressive loop, structured outputs, RAG that doesn't break, evals that mean something, and self-hosting at the edge of the GPU. ### Foundations - [What an LLM is](https://datarekha.com/gen-ai/what-is-an-llm/) - [The autoregressive loop](https://datarekha.com/gen-ai/autoregressive-loop/) - [Sampling: temperature, top-k, top-p](https://datarekha.com/gen-ai/sampling/) - [Reasoning models & test-time compute](https://datarekha.com/gen-ai/reasoning-models/) - [Structured outputs](https://datarekha.com/gen-ai/structured-outputs/) - [Constrained decoding](https://datarekha.com/gen-ai/constrained-decoding/) - [Mixture of Experts](https://datarekha.com/gen-ai/mixture-of-experts/) - [Multimodal (vision & audio) LLMs](https://datarekha.com/gen-ai/multimodal-llms/) - [Pretraining data: curation & dedup](https://datarekha.com/gen-ai/pretraining-data/) - [Alignment: SFT, RLHF & DPO](https://datarekha.com/gen-ai/alignment-rlhf/) - [Direct Preference Optimization (DPO)](https://datarekha.com/gen-ai/dpo/) - [Constitutional AI & RLAIF](https://datarekha.com/gen-ai/constitutional-ai/) ### Prompting & Tools - [Prompt patterns that work](https://datarekha.com/gen-ai/prompt-patterns/) - [Few-shot & chain-of-thought](https://datarekha.com/gen-ai/few-shot-cot/) - [Function/tool calling](https://datarekha.com/gen-ai/tool-calling/) ### RAG & Adaptation - [Embeddings](https://datarekha.com/gen-ai/embeddings-vec/) - [Sentence embeddings: SBERT](https://datarekha.com/gen-ai/sentence-embeddings/) - [Vector databases](https://datarekha.com/gen-ai/vector-dbs/) - [RAG basics](https://datarekha.com/gen-ai/rag-basics/) - [Chunking for RAG](https://datarekha.com/gen-ai/rag-chunking/) - [Advanced RAG](https://datarekha.com/gen-ai/advanced-rag/) - [Vectorless retrieval (PageIndex)](https://datarekha.com/gen-ai/vectorless-retrieval/) - [RAG evaluations](https://datarekha.com/gen-ai/rag-evals/) - [Fine-tune vs RAG: the decision](https://datarekha.com/gen-ai/finetune-vs-rag/) - [Fine-tuning: LoRA & QLoRA](https://datarekha.com/gen-ai/fine-tuning/) ### Evaluation & Safety - [LLM evals & LLM-as-judge](https://datarekha.com/gen-ai/llm-evals/) - [Hallucination & grounding](https://datarekha.com/gen-ai/hallucination-grounding/) - [Prompt injection & guardrails](https://datarekha.com/gen-ai/prompt-injection/) - [Guardrails & output validation](https://datarekha.com/gen-ai/guardrails/) - [Llama Guard: safety classification](https://datarekha.com/gen-ai/llama-guard/) - [Reward hacking & Goodhart's law](https://datarekha.com/gen-ai/reward-hacking/) - [Red-teaming LLMs](https://datarekha.com/gen-ai/red-teaming/) - [A taxonomy of jailbreaks](https://datarekha.com/gen-ai/jailbreak-taxonomy/) - [Watermarking AI content](https://datarekha.com/gen-ai/llm-watermarking/) - [Differential privacy for LLMs](https://datarekha.com/gen-ai/differential-privacy-llm/) - [Bias & fairness in LLMs](https://datarekha.com/gen-ai/llm-bias-fairness/) ### Frontier safety - [Mesa-optimization & inner alignment](https://datarekha.com/gen-ai/mesa-optimization/) - [Evidence for deceptive alignment](https://datarekha.com/gen-ai/deceptive-alignment-evidence/) - [AI control](https://datarekha.com/gen-ai/ai-control/) - [Scalable oversight](https://datarekha.com/gen-ai/scalable-oversight/) - [Frontier safety frameworks](https://datarekha.com/gen-ai/frontier-safety-frameworks/) - [Recursive self-improvement](https://datarekha.com/gen-ai/recursive-self-improvement/) - [Model welfare](https://datarekha.com/gen-ai/model-welfare/) ### Operations - [KV cache & continuous batching](https://datarekha.com/gen-ai/kv-cache/) - [KV cache offloading & memory tiers](https://datarekha.com/gen-ai/kv-cache-offloading/) - [Cost & latency engineering](https://datarekha.com/gen-ai/llm-cost-latency/) - [Inference metrics: TTFT, ITL & goodput](https://datarekha.com/gen-ai/inference-metrics/) - [Model routing & cascades](https://datarekha.com/gen-ai/model-routing/) - [Self-hosting with vLLM](https://datarekha.com/gen-ai/self-hosting/) - [Disaggregated serving (prefill/decode)](https://datarekha.com/gen-ai/disaggregated-serving/) - [Quantization](https://datarekha.com/gen-ai/quantization/) - [GGUF & running LLMs locally](https://datarekha.com/gen-ai/gguf-local-models/) - [Distillation](https://datarekha.com/gen-ai/distillation/) - [Speculative Decoding](https://datarekha.com/gen-ai/speculative-decoding/) ### Systems Design at Scale - [Async vs sync — handling concurrency](https://datarekha.com/gen-ai/async-vs-sync/) - [System design boundaries](https://datarekha.com/gen-ai/system-design-boundaries/) - [Load balancing LLM inference](https://datarekha.com/gen-ai/load-balancing/) - [Rate limiting & denial-of-wallet](https://datarekha.com/gen-ai/rate-limiting/) - [Caching: exact, semantic & prompt](https://datarekha.com/gen-ai/caching/) - [AI gateways](https://datarekha.com/gen-ai/ai-gateways/) - [Queues & batch pipelines](https://datarekha.com/gen-ai/message-queues/) - [Circuit breakers & resilience](https://datarekha.com/gen-ai/circuit-breakers/) - [LLM serving ops](https://datarekha.com/gen-ai/llm-serving-ops/) ## Agentic AI Where Generative AI builds the model layer, Agentic AI builds autonomous systems on top of it: the patterns (reflection, tool use, planning, multi-agent), the protocols (MCP, A2A), the orchestration frameworks and SDKs, and the production concerns for agents that actually work. ### Foundations - [What agentic AI means](https://datarekha.com/agentic-ai/what-is-agentic/) - [Agentic design patterns](https://datarekha.com/agentic-ai/design-patterns/) - [ReAct, Plan-Execute, Reflexion](https://datarekha.com/agentic-ai/planning-patterns/) - [ReWOO: plan-execute without observation](https://datarekha.com/agentic-ai/rewoo/) - [HTN & evolutionary planning](https://datarekha.com/agentic-ai/htn-planning/) - [Reflection](https://datarekha.com/agentic-ai/reflection/) - [Tree of Thoughts](https://datarekha.com/agentic-ai/tree-of-thoughts/) - [Skill libraries & sleep-time compute](https://datarekha.com/agentic-ai/skill-libraries/) - [Self-improving agents](https://datarekha.com/agentic-ai/self-improving-agents/) - [Tools — defining, calling, validating](https://datarekha.com/agentic-ai/tools/) - [AGENTS.md, Skills & Tools](https://datarekha.com/agentic-ai/agents-md-skills-tools/) - [The Agent Harness](https://datarekha.com/agentic-ai/agent-harness/) - [Model Context Protocol (MCP)](https://datarekha.com/agentic-ai/mcp-intro/) - [Advanced MCP primitives](https://datarekha.com/agentic-ai/mcp-advanced-primitives/) - [MCP gateways & registries](https://datarekha.com/agentic-ai/mcp-gateways/) - [MCP vs A2A vs ACP vs ANP](https://datarekha.com/agentic-ai/agent-protocols/) - [A2A — Agent2Agent Protocol](https://datarekha.com/agentic-ai/a2a/) - [How agents authenticate each other](https://datarekha.com/agentic-ai/agent-auth/) ### Multi-agent systems - [Multi-agent: supervisor & swarm](https://datarekha.com/agentic-ai/multi-agent-orchestration/) - [Multi-agent debate & voting](https://datarekha.com/agentic-ai/multi-agent-debate/) - [Group chat & the blackboard pattern](https://datarekha.com/agentic-ai/group-chat-orchestration/) - [Agent negotiation & economies](https://datarekha.com/agentic-ai/agent-negotiation/) - [Generative agents: simulations](https://datarekha.com/agentic-ai/generative-agents/) - [Why multi-agent systems fail](https://datarekha.com/agentic-ai/multi-agent-failures/) ### Multi-agent theory - [Consensus & Byzantine fault tolerance](https://datarekha.com/agentic-ai/mas-consensus/) - [Multi-agent reinforcement learning](https://datarekha.com/agentic-ai/marl/) - [Swarm intelligence & optimization](https://datarekha.com/agentic-ai/swarm-optimization/) - [Theory of mind for agents](https://datarekha.com/agentic-ai/theory-of-mind/) ### Orchestration frameworks (LangChain, LangGraph, LlamaIndex) - [Models, prompts, parsers](https://datarekha.com/agentic-ai/langchain-models/) - [Chains & LCEL](https://datarekha.com/agentic-ai/langchain-chains/) - [RAG with LangChain](https://datarekha.com/agentic-ai/langchain-rag/) - [Build agents from scratch](https://datarekha.com/agentic-ai/langgraph-intro/) - [Nodes, edges, state](https://datarekha.com/agentic-ai/langgraph-state/) - [Persistence & streaming](https://datarekha.com/agentic-ai/langgraph-persistence/) - [Human-in-the-loop](https://datarekha.com/agentic-ai/langgraph-hitl/) - [Indexes, query engines & retrievers](https://datarekha.com/agentic-ai/llamaindex-intro/) - [Event-driven Workflows](https://datarekha.com/agentic-ai/llamaindex-workflows/) - [FunctionAgent & ReActAgent](https://datarekha.com/agentic-ai/llamaindex-agents/) - [LlamaParse — document parsing](https://datarekha.com/agentic-ai/llamaparse/) ### Agent SDKs & runtimes - [Agents, handoffs & guardrails](https://datarekha.com/agentic-ai/openai-agents-sdk/) - [MAF overview & first agent](https://datarekha.com/agentic-ai/maf-overview/) - [Adding tools](https://datarekha.com/agentic-ai/maf-tools/) - [Workflows](https://datarekha.com/agentic-ai/maf-workflows/) - [Middleware & guardrails](https://datarekha.com/agentic-ai/maf-middleware/) - [Install & first agent](https://datarekha.com/agentic-ai/adk-intro/) - [Multi-tool agent](https://datarekha.com/agentic-ai/adk-multi-tool/) - [Workflow patterns](https://datarekha.com/agentic-ai/adk-workflows/) - [Deployment](https://datarekha.com/agentic-ai/adk-deployment/) - [CrewAI — role-based crews](https://datarekha.com/agentic-ai/crewai/) - [Claude Agent SDK](https://datarekha.com/agentic-ai/claude-agent-sdk/) - [AutoGen: conversational multi-agent](https://datarekha.com/agentic-ai/autogen/) - [Agent runtimes: Agno & Mastra](https://datarekha.com/agentic-ai/agent-runtimes/) ### Agents in Production - [Agent Memory](https://datarekha.com/agentic-ai/agent-memory/) - [Context engineering](https://datarekha.com/agentic-ai/context-engineering/) - [Agent Security](https://datarekha.com/agentic-ai/agent-security/) - [Token theft & runtime authorization](https://datarekha.com/agentic-ai/agent-credential-security/) - [MCP tool poisoning & supply-chain security](https://datarekha.com/agentic-ai/mcp-security/) - [Evaluating agents](https://datarekha.com/agentic-ai/agent-evaluation/) - [Agent benchmarks & eval-driven dev](https://datarekha.com/agentic-ai/agent-benchmarks/) - [Observability & tracing](https://datarekha.com/agentic-ai/agent-observability/) - [OpenTelemetry for GenAI](https://datarekha.com/agentic-ai/otel-genai/) - [Cost & latency control](https://datarekha.com/agentic-ai/agent-cost-control/) - [Durable execution for agents](https://datarekha.com/agentic-ai/durable-execution/) - [Agent safety controls](https://datarekha.com/agentic-ai/agent-safety-controls/) - [The coding-agent workbench](https://datarekha.com/agentic-ai/agent-workbench/) ### Frameworks & Tooling - [Mem0 — a memory layer for agents](https://datarekha.com/agentic-ai/mem0/) - [FastMCP — build MCP servers fast](https://datarekha.com/agentic-ai/fastmcp/) - [Code execution with MCP](https://datarekha.com/agentic-ai/code-execution-mcp/) - [Firecrawl — web data for LLMs & RAG](https://datarekha.com/agentic-ai/firecrawl/) - [Computer-use & browser agents](https://datarekha.com/agentic-ai/computer-use/) - [Voice agents (realtime)](https://datarekha.com/agentic-ai/voice-agents/) ## Data Structures & Algorithms Data structures and algorithms, taught for data science and AI — not for whiteboard trivia. From Big-O and binary search to trees, graphs, dynamic programming, and the probabilistic structures (Bloom filters, MinHash-LSH) that power real dedup and retrieval. Python throughout, every idea animated. ### Foundations - [Why DSA for Data Science](https://datarekha.com/dsa/why-dsa/) - [Big-O & Complexity](https://datarekha.com/dsa/big-o/) - [Recursion & the Call Stack](https://datarekha.com/dsa/recursion/) - [Python Built-ins & Their Cost](https://datarekha.com/dsa/python-builtins-cost/) ### Searching - [Linear Search](https://datarekha.com/dsa/linear-search/) - [Binary Search](https://datarekha.com/dsa/binary-search/) - [Search Patterns](https://datarekha.com/dsa/search-patterns/) ### Sorting - [Bubble, Insertion & Selection](https://datarekha.com/dsa/sorting-basics/) - [Merge Sort & Divide-and-Conquer](https://datarekha.com/dsa/merge-sort/) - [Quicksort & Partitioning](https://datarekha.com/dsa/quicksort/) - [Timsort, Stability & sorted()](https://datarekha.com/dsa/sorting-in-practice/) ### Core Data Structures - [Arrays vs Linked Lists](https://datarekha.com/dsa/arrays-vs-linked-lists/) - [Stacks, Queues & Deques](https://datarekha.com/dsa/stacks-and-queues/) - [Hash Tables & Dicts](https://datarekha.com/dsa/hash-tables/) - [Heaps & Priority Queues](https://datarekha.com/dsa/heaps/) ### Trees - [Trees & Traversals](https://datarekha.com/dsa/trees-and-traversals/) - [Binary Search Trees](https://datarekha.com/dsa/binary-search-trees/) - [Tries (Prefix Trees)](https://datarekha.com/dsa/tries/) - [Balanced Trees & B-Trees](https://datarekha.com/dsa/balanced-trees/) ### Graphs - [Graph Representations](https://datarekha.com/dsa/graph-representations/) - [Graph Traversal: BFS & DFS](https://datarekha.com/dsa/bfs-dfs/) - [Shortest Paths (Dijkstra)](https://datarekha.com/dsa/shortest-paths/) - [Graphs for ML & Knowledge Graphs](https://datarekha.com/dsa/graphs-for-ml/) ### Algorithmic Techniques - [Two Pointers & Sliding Window](https://datarekha.com/dsa/two-pointers-sliding-window/) - [Divide & Conquer](https://datarekha.com/dsa/divide-and-conquer/) - [Greedy Algorithms](https://datarekha.com/dsa/greedy/) - [Dynamic Programming](https://datarekha.com/dsa/dynamic-programming/) - [Backtracking](https://datarekha.com/dsa/backtracking/) ### DSA for Data Science - [When O(n²) Kills Your DataFrame](https://datarekha.com/dsa/complexity-on-dataframes/) - [Vectorization vs Loops](https://datarekha.com/dsa/vectorization-vs-loops/) - [Sampling & Reservoir Sampling](https://datarekha.com/dsa/reservoir-sampling/) - [Bloom Filters, HyperLogLog & MinHash-LSH](https://datarekha.com/dsa/probabilistic-structures/) ## GATE DA An exam-first track for GATE Data Science & Artificial Intelligence. Ten roadmaps across the full syllabus — Probability & Statistics, Linear Algebra, Calculus, Python & Algorithms, Databases & Warehousing, Machine Learning, AI, and General Aptitude — each taught from first principles to exactly the depth GATE asks, drilled with real previous-year questions, NAT practice, and full mock tests. ### Orientation - [How GATE DA Works](https://datarekha.com/gate-da/orientation/) ### Probability & Statistics - [Counting: Permutations & Combinations](https://datarekha.com/gate-da/counting/) - [Mean, Median, Mode & z-scores](https://datarekha.com/gate-da/descriptive-stats/) - [Sample Space, Events & Axioms](https://datarekha.com/gate-da/prob-axioms/) - [Independent vs Mutually Exclusive](https://datarekha.com/gate-da/independence-vs-exclusive/) - [Conditional & Total Probability](https://datarekha.com/gate-da/conditional-probability/) - [Bayes' Theorem](https://datarekha.com/gate-da/bayes-theorem/) - [Random Variables, PMF & CDF](https://datarekha.com/gate-da/random-variables-pmf/) - [Expectation, Variance & SD](https://datarekha.com/gate-da/expectation-variance/) - [Uniform, Bernoulli & Binomial](https://datarekha.com/gate-da/discrete-distributions/) - [Continuous RVs: PDF, CDF & Uniform](https://datarekha.com/gate-da/continuous-rv-pdf/) - [Exponential & Poisson](https://datarekha.com/gate-da/exponential-poisson/) - [Normal & Standard Normal](https://datarekha.com/gate-da/normal-distribution/) - [Joint, Marginal & Conditional Distributions](https://datarekha.com/gate-da/joint-conditional/) - [Covariance, Correlation & Total Expectation](https://datarekha.com/gate-da/covariance-correlation/) - [Central Limit Theorem & Confidence Intervals](https://datarekha.com/gate-da/clt-confidence/) - [z-test, t-test & chi-squared test](https://datarekha.com/gate-da/hypothesis-tests/) ### Linear Algebra - [Vectors, Matrices & Special Forms](https://datarekha.com/gate-da/vectors-matrices/) - [Vector Spaces & Subspaces](https://datarekha.com/gate-da/vector-spaces-subspaces/) - [Independence, Span, Basis & Dimension](https://datarekha.com/gate-da/linear-independence-basis/) - [Systems of Equations & Gaussian Elimination](https://datarekha.com/gate-da/linear-systems/) - [Rank, Nullity & Solution Sets](https://datarekha.com/gate-da/rank-nullity/) - [Determinants & Their Properties](https://datarekha.com/gate-da/determinant/) - [Inverse & Invertibility](https://datarekha.com/gate-da/matrix-inverse/) - [Eigenvalues & Eigenvectors](https://datarekha.com/gate-da/eigenvalues/) - [Eigen-properties & Transforms](https://datarekha.com/gate-da/eigen-properties/) - [Orthogonality & Orthogonal Matrices](https://datarekha.com/gate-da/orthogonal-matrices/) - [Projections & Idempotent Matrices](https://datarekha.com/gate-da/projections-idempotent/) - [Quadratic Forms & Definiteness](https://datarekha.com/gate-da/quadratic-forms/) - [LU Decomposition](https://datarekha.com/gate-da/lu-decomposition/) - [Partition (Block) Matrices](https://datarekha.com/gate-da/partition-matrices/) - [Singular Value Decomposition](https://datarekha.com/gate-da/svd/) - [Always-True Synthesis Drills](https://datarekha.com/gate-da/linalg-always-true/) ### Calculus & Optimization - [Functions of One Variable](https://datarekha.com/gate-da/functions-graphs/) - [Limits & One-Sided Limits](https://datarekha.com/gate-da/limits-intro/) - [Limit Techniques](https://datarekha.com/gate-da/limit-techniques/) - [L'Hopital's Rule](https://datarekha.com/gate-da/lhopital/) - [Continuity](https://datarekha.com/gate-da/continuity/) - [Differentiability](https://datarekha.com/gate-da/differentiability/) - [Product, Quotient & Chain Rule](https://datarekha.com/gate-da/differentiation-rules/) - [Taylor & Maclaurin Series](https://datarekha.com/gate-da/taylor-series/) - [Critical Points & Monotonicity](https://datarekha.com/gate-da/critical-points/) - [Maxima, Minima & the 2nd-Derivative Test](https://datarekha.com/gate-da/maxima-minima/) - [Optimization on a Closed Interval](https://datarekha.com/gate-da/global-optimization/) - [Convexity & Single-Variable Optimization](https://datarekha.com/gate-da/convexity/) - [Lipschitz & One-Insight Problems](https://datarekha.com/gate-da/calc-insight-problems/) ### Programming, Data Structures & Algorithms - [Python for GATE: Types & Slicing](https://datarekha.com/gate-da/python-essentials/) - [Lists, Tuples, Dicts, Sets & Gotchas](https://datarekha.com/gate-da/python-collections/) - [Functions, Scope & the Mutable-Default Trap](https://datarekha.com/gate-da/python-functions-scope/) - [Recursion & Tracing](https://datarekha.com/gate-da/recursion/) - [Reading Pseudocode & Predicting Output](https://datarekha.com/gate-da/pseudocode-tracing/) - [Big-O: Best, Average & Worst Case](https://datarekha.com/gate-da/complexity/) - [Linear & Binary Search](https://datarekha.com/gate-da/searching/) - [Bubble, Insertion & Selection Sort](https://datarekha.com/gate-da/basic-sorts/) - [Merge Sort & Quicksort](https://datarekha.com/gate-da/divide-conquer-sorts/) - [Stacks, Queues & Deques](https://datarekha.com/gate-da/stacks-queues/) - [Linked Lists](https://datarekha.com/gate-da/linked-lists/) - [Hash Tables & Linear Probing](https://datarekha.com/gate-da/hash-tables/) - [Trees, Traversals & Reconstruction](https://datarekha.com/gate-da/trees-traversals/) - [Graph Theory & Representations](https://datarekha.com/gate-da/graph-theory-intro/) - [BFS, DFS, Topological Sort & Shortest Path](https://datarekha.com/gate-da/graph-algorithms/) ### Database Management & Warehousing - [The Relational Model](https://datarekha.com/gate-da/relational-model/) - [ER Model & Mapping to Relations](https://datarekha.com/gate-da/er-model/) - [Keys & Integrity Constraints](https://datarekha.com/gate-da/keys-constraints/) - [Relational Algebra I](https://datarekha.com/gate-da/relational-algebra-1/) - [Joins & Division](https://datarekha.com/gate-da/relational-algebra-2/) - [Tuple Relational Calculus](https://datarekha.com/gate-da/tuple-calculus/) - [SQL: Computing Results by Hand](https://datarekha.com/gate-da/sql-queries/) - [Functional Dependencies & Closure](https://datarekha.com/gate-da/functional-dependencies/) - [Finding Candidate Keys from FDs](https://datarekha.com/gate-da/candidate-keys/) - [Normal Forms: 1NF to BCNF](https://datarekha.com/gate-da/normalization/) - [Lossless-Join vs Dependency-Preservation](https://datarekha.com/gate-da/decomposition/) - [File Organization & Indexing](https://datarekha.com/gate-da/indexing/) - [Normalization, Discretization, Sampling, Compression](https://datarekha.com/gate-da/data-transformation/) - [Star vs Snowflake Schemas](https://datarekha.com/gate-da/warehouse-schemas/) - [Concept Hierarchies & Measures](https://datarekha.com/gate-da/olap-measures/) ### Machine Learning - [Supervised vs Unsupervised; Train/Test](https://datarekha.com/gate-da/ml-foundations/) - [Simple Linear Regression](https://datarekha.com/gate-da/simple-linear-regression/) - [Multiple Linear Regression](https://datarekha.com/gate-da/multiple-linear-regression/) - [Gradient Descent (One Step)](https://datarekha.com/gate-da/gradient-descent-step/) - [Ridge Regression & Regularization](https://datarekha.com/gate-da/ridge-regression/) - [The Bias-Variance Trade-off](https://datarekha.com/gate-da/bias-variance/) - [Cross-Validation: k-fold, LOO, Stratified](https://datarekha.com/gate-da/cross-validation/) - [Confusion Matrix, Precision, Recall, ROC](https://datarekha.com/gate-da/classification-metrics/) - [Logistic Regression](https://datarekha.com/gate-da/logistic-regression/) - [k-Nearest Neighbours](https://datarekha.com/gate-da/knn/) - [Naive Bayes](https://datarekha.com/gate-da/naive-bayes/) - [Linear Discriminant Analysis](https://datarekha.com/gate-da/lda/) - [Support Vector Machines](https://datarekha.com/gate-da/svm/) - [Decision Trees: Entropy, Gini & Info Gain](https://datarekha.com/gate-da/decision-trees/) - [Perceptron & the Update Rule](https://datarekha.com/gate-da/perceptron/) - [Multi-Layer Perceptron & Activations](https://datarekha.com/gate-da/mlp/) - [Backpropagation (One Step)](https://datarekha.com/gate-da/backprop-step/) - [k-means & k-medoid Clustering](https://datarekha.com/gate-da/kmeans/) - [Hierarchical Clustering & Linkage](https://datarekha.com/gate-da/hierarchical-clustering/) - [PCA & Dimensionality Reduction](https://datarekha.com/gate-da/pca-dimred/) ### Artificial Intelligence - [Problem-Solving as Search](https://datarekha.com/gate-da/search-intro/) - [BFS, DFS, UCS & IDDFS](https://datarekha.com/gate-da/uninformed-search/) - [Heuristics & Admissibility](https://datarekha.com/gate-da/heuristics-admissibility/) - [A* Search](https://datarekha.com/gate-da/a-star/) - [Adversarial Search: Minimax](https://datarekha.com/gate-da/minimax/) - [Alpha-Beta Pruning](https://datarekha.com/gate-da/alpha-beta/) - [Propositional Logic](https://datarekha.com/gate-da/propositional-logic/) - [First-Order & Predicate Logic](https://datarekha.com/gate-da/predicate-logic/) - [Bayesian Networks & Joint Factorization](https://datarekha.com/gate-da/bayesian-networks/) - [Exact Inference: Variable Elimination](https://datarekha.com/gate-da/exact-inference/) - [Approximate Inference: Sampling](https://datarekha.com/gate-da/approximate-inference/) ### General Aptitude - [General Aptitude: The 15 Marks](https://datarekha.com/gate-da/ga-overview/) - [Verbal Ability](https://datarekha.com/gate-da/verbal-ability/) - [Reading Comprehension & Narrative](https://datarekha.com/gate-da/reading-comprehension/) - [Quantitative Aptitude](https://datarekha.com/gate-da/quantitative-aptitude/) - [Data Interpretation](https://datarekha.com/gate-da/data-interpretation/) - [Analytical & Logical Reasoning](https://datarekha.com/gate-da/analytical-reasoning/) - [Spatial Aptitude](https://datarekha.com/gate-da/spatial-aptitude/) ### The Exam Lab — PYQs & Mock Tests - [GATE DA 2024 — Solved Walkthrough](https://datarekha.com/gate-da/pyq-2024/) - [GATE DA 2025 — Solved Walkthrough](https://datarekha.com/gate-da/pyq-2025/) - [GATE DA 2026 — Solved Walkthrough](https://datarekha.com/gate-da/pyq-2026/) - [PYQs by Topic](https://datarekha.com/gate-da/pyq-by-topic/) - [Timed Mock 1 (mixed)](https://datarekha.com/gate-da/mock-full-1/) - [Timed Mock 2 (mixed)](https://datarekha.com/gate-da/mock-full-2/) - [Subject Mini-Mocks](https://datarekha.com/gate-da/subject-mini-mocks/) - [Formula & Trap Revision Sheets](https://datarekha.com/gate-da/revision-sheets/) ## Git Git is the universal tool for tracking code and collaborating. Learn the mental model (the three trees), the everyday cycle (stage, commit, branch, merge), how to work with remotes and pull requests, and — crucially — how to undo almost anything without panic. ### Git Fundamentals - [Why version control](https://datarekha.com/git/why-version-control/) - [Install & first-time config](https://datarekha.com/git/install-and-config/) - [The three trees: working, staging, repo](https://datarekha.com/git/the-three-trees/) - [Staging & commits](https://datarekha.com/git/staging-and-commits/) - [Viewing history: log, diff, show](https://datarekha.com/git/viewing-history/) - [Ignoring files with .gitignore](https://datarekha.com/git/gitignore/) ### Branching & Merging - [Branches](https://datarekha.com/git/branches/) - [Merging](https://datarekha.com/git/merging/) - [Resolving merge conflicts](https://datarekha.com/git/merge-conflicts/) - [Rebase vs merge](https://datarekha.com/git/rebase-vs-merge/) - [Stashing work in progress](https://datarekha.com/git/stash/) ### Remotes & Collaboration - [Remotes: fetch, pull, push](https://datarekha.com/git/remotes-push-pull/) - [The GitHub flow & pull requests](https://datarekha.com/git/github-flow-prs/) ### Undoing & Recovery - [Undoing changes: restore, reset, revert](https://datarekha.com/git/undoing-changes/) - [reflog & recovering lost work](https://datarekha.com/git/reflog-and-recovery/) ## Command Line The command line is where data and AI work actually happens — running scripts, wrangling files, inspecting servers. Learn the practical Unix shell: navigation, finding and filtering text, pipes, permissions, processes, and enough scripting to automate the boring parts. ### Shell Basics - [What is the shell?](https://datarekha.com/cli/what-is-the-shell/) - [Navigating the filesystem](https://datarekha.com/cli/navigating-the-filesystem/) - [Working with files & directories](https://datarekha.com/cli/files-and-directories/) - [Viewing files: cat, less, head, tail](https://datarekha.com/cli/viewing-files/) ### Finding & Filtering - [Searching with grep](https://datarekha.com/cli/grep/) - [Finding files with find](https://datarekha.com/cli/find/) - [Pipes & redirection](https://datarekha.com/cli/pipes-and-redirection/) - [Text processing: sort, uniq, wc, cut](https://datarekha.com/cli/text-processing/) ### Power Tools - [Permissions & sudo](https://datarekha.com/cli/permissions/) - [Processes & jobs](https://datarekha.com/cli/processes-and-jobs/) - [Environment variables & PATH](https://datarekha.com/cli/environment-and-path/) ### Beyond the Basics - [ssh, scp & curl](https://datarekha.com/cli/ssh-and-curl/) - [Shell scripting basics](https://datarekha.com/cli/shell-scripting/) - [Productivity: aliases, history, xargs](https://datarekha.com/cli/productivity/) ## Time Series Time series breaks the i.i.d. assumptions of ordinary ML: order matters, observations correlate with their own past, and you can't shuffle. Learn to decompose, test for stationarity, and forecast with the classical workhorses (AR, MA, ARIMA, SARIMA, SARIMAX, VAR) and modern tools (Prophet) — with honest, leakage-free evaluation. ### Foundations - [Why time series is different](https://datarekha.com/time-series/why-time-series-is-different/) - [Trend, seasonality & decomposition](https://datarekha.com/time-series/components-and-decomposition/) - [Stationarity, ADF & differencing](https://datarekha.com/time-series/stationarity-and-differencing/) - [ACF & PACF](https://datarekha.com/time-series/acf-and-pacf/) ### Classical Models - [Autoregression (AR)](https://datarekha.com/time-series/autoregression-ar/) - [Moving average (MA)](https://datarekha.com/time-series/moving-average-ma/) - [ARIMA](https://datarekha.com/time-series/arima/) - [SARIMA (seasonal)](https://datarekha.com/time-series/sarima/) - [SARIMAX (exogenous regressors)](https://datarekha.com/time-series/sarimax/) - [VAR (multivariate)](https://datarekha.com/time-series/var-multivariate/) ### Modern & Practical - [Exponential smoothing & Holt-Winters](https://datarekha.com/time-series/exponential-smoothing/) - [Prophet](https://datarekha.com/time-series/prophet/) - [Lag & rolling features](https://datarekha.com/time-series/feature-engineering-for-time-series/) - [Evaluating forecasts (walk-forward)](https://datarekha.com/time-series/evaluating-forecasts/) ## Recommender Systems Recommender systems are among the highest-leverage ML in production. Learn content-based and collaborative filtering, similarity and matrix factorization, the implicit-vs-explicit feedback distinction, ranking metrics (precision@k, NDCG), the cold-start problem, and modern hybrid and neural approaches. ### Foundations - [Why recommenders matter](https://datarekha.com/recsys/why-recommenders/) - [The utility matrix](https://datarekha.com/recsys/the-utility-matrix/) - [Content-based filtering](https://datarekha.com/recsys/content-based-filtering/) ### Collaborative Filtering - [User-based collaborative filtering](https://datarekha.com/recsys/user-based-cf/) - [Item-based collaborative filtering](https://datarekha.com/recsys/item-based-cf/) - [Similarity metrics](https://datarekha.com/recsys/similarity-metrics/) - [Matrix factorization (SVD, ALS)](https://datarekha.com/recsys/matrix-factorization/) ### Production Concerns - [Implicit vs explicit feedback](https://datarekha.com/recsys/implicit-vs-explicit/) - [Evaluating recommenders (precision@k, NDCG)](https://datarekha.com/recsys/evaluating-recommenders/) - [The cold-start problem](https://datarekha.com/recsys/cold-start/) - [Hybrid & neural recommenders](https://datarekha.com/recsys/hybrid-and-neural/) ## Learning paths - [Data Analyst](https://datarekha.com/paths/data-analyst/): Answer real business questions with data — SQL, pandas, charts that tell the story, and the analytics sense to turn numbers into decisions. - [Data Engineer](https://datarekha.com/paths/data-engineer/): Python + SQL + Spark, with the warehouse knowledge to glue them together. - [ML Engineer](https://datarekha.com/paths/ml-engineer/): Build, train, and deploy models — the skillset most teams actually need. - [AI / LLM App Builder](https://datarekha.com/paths/ai-app-builder/): Ship LLM-powered products. Async Python, RAG, agents, evals. - [Data Scientist](https://datarekha.com/paths/data-scientist/): From SQL to statistical rigor to communicating results that change decisions. - [AI Engineer](https://datarekha.com/paths/ai-engineer/): Build AI products from first principles — neural nets, transformers, LLMs, RAG and agents, all the way to shipping them in production. - [Business Analyst](https://datarekha.com/paths/business-analyst/): Turn data into decisions leaders act on — unit economics, funnels, forecasting, and the story that lands. - [MLOps / Platform](https://datarekha.com/paths/mlops-platform/): Docker, CI/CD, MLflow, serving, Kubernetes. The glue that runs production ML. - [Research-leaning](https://datarekha.com/paths/research-leaning/): Math, PyTorch, transformers — for people building the next architecture. ## Blog (275 essays) - [apply() is a for loop in disguise](https://datarekha.com/blog/apply-is-a-for-loop-in-disguise/): Rewriting a Python loop as .apply() makes the code shorter and almost never makes it faster, because .apply() is the same loop with a nicer costume. Here is the ladder that does make it faster. - [MCP went stateless — what server authors have to change](https://datarekha.com/blog/mcp-went-stateless/): The 2026-07-28 revision deleted the initialize handshake and the session header, replaced server-initiated requests with a retry pattern, and put Roots, Sampling and Logging on a twelve-month clock. - [Simpson's paradox is already in your dashboard](https://datarekha.com/blog/simpsons-paradox-in-your-dashboard/): The new checkout converts better on desktop and better on mobile, and worse overall. Both statements are arithmetically correct, and one of them is about to be presented to your leadership team. - [The small files problem eats your read throughput](https://datarekha.com/blog/small-files-problem/): A 400 GB table that takes forty minutes to scan is not a 400 GB problem. It is a 1.2-million-file problem, and every one of those files charges the same fixed toll. - [The shuffle is the bill](https://datarekha.com/blog/the-shuffle-is-the-bill/): Two Spark jobs read the same data and write the same answer. One costs six times more. The difference is almost always a wide transformation nobody noticed. - [Why your index isn't being used](https://datarekha.com/blog/why-your-index-isnt-being-used/): You built the index. The planner ignored it. Five query shapes silently disable an index, and four of them are things you wrote without thinking. - [Activation checkpointing makes GPU memory a scheduling decision](https://datarekha.com/blog/activation-checkpointing-memory-is-not-free/): Large-model training is constrained by more than weights. Activation checkpointing changes which forward tensors survive, trading recomputation for a smaller peak-memory footprint. - [RAG poisoning is an evidence-integrity problem](https://datarekha.com/blog/rag-poisoning-evidence-integrity/): A retrieval system can reason perfectly from corrupted evidence. Defending RAG means governing what enters the corpus, preserving provenance, isolating tenants, and treating retrieved text as untrusted data. - [Six system-design boundaries that prevent category mistakes](https://datarekha.com/blog/six-system-design-boundaries/): Stateless vs stateful, Lambda vs ECS, database vs cache, queue vs stream, retrieval vs reranking, and monitoring vs tracing—explained as operational contracts. - [Token theft in AI agents is an architecture failure](https://datarekha.com/blog/token-theft-ai-agents/): Prompt injection gets the attention, but credentials turn a confused model into an authenticated attacker. The fix is to keep tokens out of model context and authorize every action at runtime. - [How vLLM actually serves a 7B model](https://datarekha.com/blog/how-vllm-serves-a-7b-model/): Follow one request through vLLM — the scheduler, the KV-cache blocks, prefill vs decode, and what happens when 90,000 tokens of cache no longer fit. - [The vector-search memory wall: why HNSW eats RAM, and how quantization cuts the bill 32×](https://datarekha.com/blog/vector-search-memory-wall/): HNSW is fast because the whole graph lives in RAM — which is exactly why it gets expensive. At 100M vectors you're paying for ~600GB of memory before you serve a single query. Here's the math, and how binary quantization plus reranking is rewriting the cost model in 2026. - [MHA → MQA → GQA → MLA: the attention efficiency ladder](https://datarekha.com/blog/attention-efficiency-ladder/): MHA, MQA, GQA, MLA — every rung shrinks the KV cache that bottlenecks LLM inference. What each step gives up to make models cheaper to run. - [AutoML raised the floor, not the ceiling](https://datarekha.com/blog/automl-raised-the-floor-not-the-ceiling/): AutoGluon now tops the AutoML benchmark and beats rivals given a fraction of the time. That makes a strong baseline cheap — but the features and framing that actually win are exactly what AutoML can't automate. - [Context engineering: why your agent gets dumber as its context grows](https://datarekha.com/blog/context-engineering-replaced-prompt-engineering/): For multi-step agents the job shifted from writing the perfect prompt to curating the smallest high-signal set of tokens at every step. Because of context rot, more context literally makes agents worse. - [Don't auto-ship retrained models: collapse, feedback, and the challenger gate](https://datarekha.com/blog/dont-auto-ship-retrained-models-collapse/): Retraining can produce a worse model — from bad data, a pipeline bug, or a model quietly learning from its own outputs. Champion-challenger is how you automate retraining without ever shipping a regression. - [Feature engineering still beats the algorithm (even after TabPFN)](https://datarekha.com/blog/feature-engineering-still-beats-the-algorithm/): Tree-based models remain state-of-the-art on tabular data, and the biggest gains come from the features, not the model. Even as a Nature-published foundation model finally challenges gradient boosting, the data-centric lesson holds. - [The GPU isn't the bottleneck: why LLM serving is a memory problem](https://datarekha.com/blog/llm-serving-is-memory-bound/): During generation the GPU spends most of its time moving the KV cache, not doing math. Whoever wastes the least memory serves the most users — which is why PagedAttention and continuous batching changed everything. - [Loading a model file can run code: MLSecOps in 2026](https://datarekha.com/blog/loading-a-model-file-runs-code-mlsecops/): Downloading a model and calling load() is as dangerous as running a random shell script. Real malicious models have shipped on public hubs — here's the ML attack surface and the defenses that belong in your pipeline. - [MCP won the tool-integration war — now comes the hard part](https://datarekha.com/blog/mcp-agent-interoperability-wars/): The Model Context Protocol became the USB-C of AI tools, and once OpenAI, Google, and Microsoft all adopted it the integration wars ended. 2026 is about making it enterprise-grade: stateless HTTP, a registry, apps, and long-running tasks. - [Most of your traffic is easy: cut LLM bills 40–85% with routing](https://datarekha.com/blog/model-routing-cut-llm-bills/): Real query traffic is mostly simple, yet teams send everything to the most expensive model. Routing easy queries to cheap models, escalating only the hard ones, and caching repeats captures most of the quality at a fraction of the cost. - [Most predictions don't need real-time (and batch is 100x cheaper)](https://datarekha.com/blog/most-predictions-dont-need-real-time/): The default mental model of 'serving a model' is a live API answering in milliseconds. For most use cases that's the expensive wrong choice — and the hybrid precompute-to-Redis pattern gives you batch economics with real-time latency. - [Peeking is why your A/B test lies (and CUPED is the fix)](https://datarekha.com/blog/peeking-is-why-your-ab-test-lies/): Watching a live experiment and stopping the moment it looks significant can push your false-positive rate from 5% to over 26%. The discipline — and the variance-reduction trick — that make online tests trustworthy. - [Prompt injection is the SQL injection of the AI era](https://datarekha.com/blog/prompt-injection-sql-injection-of-ai/): Both attacks come from the same root cause — the system can't separate trusted instructions from untrusted data. In agents it becomes a confused-deputy problem, and a single filter won't save you. - [Running an LLM on your laptop: GGUF, llama.cpp, and the Q-soup](https://datarekha.com/blog/running-llms-on-your-laptop/): A 7B model now fits on a laptop. GGUF, llama.cpp, and quantization tiers like Q4_K_M — decoded, so running LLMs locally stops being intimidating. - [Most ML failures are silent: the case for data contracts](https://datarekha.com/blog/silent-ml-failures-data-contracts/): An ML pipeline rarely crashes when the data goes wrong — it keeps serving confidently wrong predictions. Data contracts make a schema or semantics breach fail loudly at the source, before it poisons a retraining job. - [You can't be fair three ways — and the EU AI Act clock is ticking](https://datarekha.com/blog/you-cant-be-fair-three-ways-eu-ai-act/): A landmark result proves demographic parity, equalized odds, and calibration can't all hold when base rates differ. With high-risk obligations applying from August 2026, fairness is now an engineering pipeline, not a footnote. - [Your GPUs are mostly idle: FinOps for the AI era](https://datarekha.com/blog/your-gpus-are-mostly-idle-finops/): AI spending is heading past $2 trillion while production GPU fleets often run under 50% utilization. The biggest lever on an ML bill isn't a cheaper price — it's the idle silicon you're already paying for. - [Your t-SNE plot is lying to you (three ways)](https://datarekha.com/blog/your-tsne-plot-is-lying-to-you/): t-SNE and UMAP reveal clusters PCA hides — but cluster sizes, the gaps between clusters, and even the shapes are often artifacts. How to read these plots without fooling yourself, and when to reach for UMAP instead. - [AI's real bottleneck isn't intelligence — it's electricity](https://datarekha.com/blog/ais-real-bottleneck-is-electricity/): AI's hardest 2026 limit isn't chips or money — it's electricity. Why data-center power is the bottleneck, and how inference makes every AI query an energy cost. - [Attention is O(n²) — and Mamba's linear escape](https://datarekha.com/blog/attention-is-quadratic-mamba-linear-escape/): Attention costs O(n²), so long context gets expensive fast. State-space models like Mamba scale linearly — and 2026's winning architectures are hybrids of both. - [Beyond next-token: world models and the next paradigm](https://datarekha.com/blog/beyond-next-token-world-models/): World models predict the next state of the world, not the next token — making them simulators agents can plan inside. The two camps racing past LLMs in 2026. - [Diffusion language models: when AI writes text all at once](https://datarekha.com/blog/diffusion-language-models-text-all-at-once/): Diffusion language models generate text all at once, refining a masked sequence over a few parallel steps — hitting 1,000+ tokens/sec versus left-to-right LLMs. - [Reading a model's mind: sparse autoencoders explained](https://datarekha.com/blog/reading-a-models-mind-sparse-autoencoders/): Sparse autoencoders pull human-readable features out of an LLM's tangled activations — the breakthrough tool of mechanistic interpretability. - [o3-level reasoning on your laptop: how distillation works](https://datarekha.com/blog/reasoning-distillation-o3-on-your-laptop/): Reasoning distillation trains a small model on a big model's chains of thought — putting o3-level reasoning on a laptop, and beating bigger models. - [RLHF is being replaced: how DPO teaches models what good means](https://datarekha.com/blog/rlhf-to-dpo-how-models-learn-what-good-means/): RLHF aligned chat models with a reward model and a fragile RL loop. DPO drops both, learning the same preferences directly from chosen-vs-rejected pairs. - [The big-model era is ending: the rise of small models](https://datarekha.com/blog/the-big-model-era-is-ending-small-language-models/): Small language models fine-tuned for a task now beat giants on it — on your laptop or phone, cheaper and private. Why bigger isn't always better in 2026. - [Why your AI can't learn after training: catastrophic forgetting](https://datarekha.com/blog/why-ai-cant-learn-after-training-catastrophic-forgetting/): A trained model's weights are frozen, and fine-tuning erases old skills — catastrophic forgetting. Why continual learning is AI's open problem in 2026. - [Test-time compute: why thinking longer beats thinking bigger](https://datarekha.com/blog/why-thinking-longer-beats-thinking-bigger/): Test-time compute lets a model think before answering, so a small reasoning model can beat a far larger one. How inference-time scaling works. - [A/B testing in practice: sample size, p-values, and the traps](https://datarekha.com/blog/ab-testing-pitfalls-sample-size-and-p-values/): A/B testing done wrong wastes months of effort. Master p-values, sample size, and the six traps — peeking, SRM, and more — before your next experiment. - [Cohort analysis: how to actually read a retention curve](https://datarekha.com/blog/cohort-analysis-reading-retention-curves/): Cohort analysis reveals what aggregate retention metrics hide — learn to build a cohort table, read a retention curve, and spot product-market fit signals. - [Evaluating forecasts: MAE, RMSE, MAPE, and honest backtesting](https://datarekha.com/blog/evaluating-forecasts-mae-rmse-mape-backtesting/): A practical guide to forecast accuracy using MAE RMSE MAPE and MASE, plus rolling-origin backtesting to avoid self-deception in time series. - [find and xargs: bulk file operations without fear](https://datarekha.com/blog/find-and-xargs-bulk-file-operations/): Master the find command and xargs for safe, efficient bulk file operations: handle spaces in filenames, batch deletes, renames, and parallel processing. - [The forecasting baselines that quietly beat fancy models](https://datarekha.com/blog/forecasting-baselines-that-beat-fancy-models/): Why forecasting baselines like the naive forecast and seasonal-naive outperform complex models—and how to pick the right one before you build anything fancy. - [Funnel analysis: finding exactly where users drop off](https://datarekha.com/blog/funnel-analysis-finding-where-users-drop-off/): Master funnel analysis to pinpoint conversion leaks, prioritize fixes by impact, and turn step-by-step drop-off data into real growth. - [git bisect: find the commit that broke it in log(n) steps](https://datarekha.com/blog/git-bisect-find-bugs-in-log-n-steps/): Use git bisect to find the exact commit that introduced a regression or bug with binary search over history — O(log n) instead of O(n). - [Branching strategies that scale: trunk-based vs Git Flow vs GitHub Flow](https://datarekha.com/blog/git-branching-strategies-trunk-gitflow-github-flow/): Compare every major branching strategy: trunk-based development, Git Flow, and GitHub Flow — and know which fits your release cadence. - [Git merge vs rebase: when to use which (without wrecking history)](https://datarekha.com/blog/git-merge-vs-rebase-when-to-use-which/): Git merge vs rebase both integrate branches but produce different histories. Learn when each is right, the golden rule, and how to recover when things go wrong. - [Git's three trees: the mental model that makes Git click](https://datarekha.com/blog/git-three-trees-working-staging-head/): Understand git's working directory, staging area, and HEAD so every git command finally makes sense — no more mystery, no more fear. - [grep, sed, awk: the text-processing trio worth mastering](https://datarekha.com/blog/grep-sed-awk-text-processing-trio/): grep sed awk command line text processing explained: when to use each tool, real recipes, regex fundamentals, and how pipelines compose all three. - [LTV and CAC: the unit economics every analyst should model](https://datarekha.com/blog/ltv-and-cac-unit-economics-for-analysts/): Master LTV and CAC unit economics: correct formulas, cohort methods, payback periods, and the pitfalls that make most models wrong. - [North Star metrics: the one number that actually moves a business](https://datarekha.com/blog/north-star-metrics-that-move-the-business/): What a north star metric is, how to choose one, and why a single well-chosen number beats a dashboard of 40 KPIs. - [Stationarity, differencing, and why ARIMA needs a flat series](https://datarekha.com/blog/stationarity-differencing-and-arima/): Understand stationarity, why differencing transforms a trending series, and how the d in ARIMA(p,d,q) bridges raw data to a forecastable model. - [Decomposition: reading trend, seasonality, and residual](https://datarekha.com/blog/time-series-decomposition-trend-seasonality-residual/): A practical guide to time series decomposition — separating trend, seasonality, and residual to reveal what a signal is actually doing. - [Understanding $PATH: how the shell actually finds your commands](https://datarekha.com/blog/understanding-path-how-the-shell-finds-commands/): Demystify the PATH environment variable and 'command not found': how the shell searches, why order matters, and how to manage it safely. - [Undoing things in Git: reset, revert, restore, and reflog](https://datarekha.com/blog/undoing-things-in-git-reset-revert-restore-reflog/): A practical guide to undo in git: when to reach for reset revert reflog restore or amend, and how to recover commits you thought were gone forever. - [Unix file permissions: rwx, chmod, and the octal that confuses everyone](https://datarekha.com/blog/unix-file-permissions-chmod-octal-explained/): Understand Unix file permissions end-to-end: read the ls -l string, master chmod octal and symbolic modes, chown, umask, and special bits. - [Pipes and redirection: how Unix composes small sharp tools](https://datarekha.com/blog/unix-pipes-and-redirection-composing-small-tools/): How unix pipes and redirection wire stdin stdout and stderr into composable data pipelines — and why that one-liner on your terminal is a tiny distributed system. - [Why you can't shuffle a time series: splits and leakage](https://datarekha.com/blog/why-you-cant-shuffle-time-series-train-test-split/): Random k-fold on a time series leaks the future into training. Learn the correct time-based train test split, rolling-origin CV, and how to avoid leakage. - [Memory poisoning: when your agent remembers a lie](https://datarekha.com/blog/agent-memory-poisoning/): Persistent agent memory is a delayed-action injection vector. Untrusted content read in one session gets written to long-term memory and silently steers a clean session later — sometimes for a different user. Here is how the attack works, the 2024-2026 research, and why the only real fix is treating every memory write as untrusted input. - [The silent revenue drop: how drift actually breaks production models](https://datarekha.com/blog/how-drift-breaks-production-models/): Drift does not crash your service or page your on-call. It quietly degrades a model for weeks while every dashboard stays green, until finance asks why a revenue line is bleeding. This is the operational war story the KS-test tutorials skip. - [Why your model made that prediction: SHAP in production](https://datarekha.com/blog/shap-in-production/): SHAP is the most-used model explainability library on earth, and most teams misread it. A field guide to what Shapley values actually compute, where TreeSHAP beats KernelSHAP by orders of magnitude, and the four ways SHAP quietly lies to you. - [Training-serving skew: the bug feature stores exist to kill](https://datarekha.com/blog/training-serving-skew/): The model scores 0.95 offline and dies in production. Almost always the cause is one bug: training-serving skew, where the feature the model learned offline is computed differently online — or worse, was joined from the future. Here's the bug, why your holdout set can't catch it, and the three fixes that actually work. - [Why agents need permissions: the lethal trifecta and least privilege](https://datarekha.com/blog/why-agents-need-permissions/): Prompt injection has no reliable fix at the model layer. Simon Willison's lethal trifecta and OWASP's Excessive Agency say the same thing: agent security must be designed at the system layer, with least privilege. - [A/B testing is a sample-size problem wearing a statistics costume](https://datarekha.com/blog/ab-testing-sample-size/): Most A/B-test failures aren't bad statistics — they're underpowered tests that never had a chance of seeing the effect they were designed to find. - [Accuracy lies on imbalanced data](https://datarekha.com/blog/accuracy-lies-on-imbalanced-data/): A model that never flags a single fraud transaction can score 99% accuracy — and that number is not wrong, it is just completely useless. - [Active listening: the skill most people skip](https://datarekha.com/blog/active-listening/): Most people listen to reply, not to understand — and it costs them rework, trust, and credibility they never see leaving. - [The AI velocity paradox: why faster code means working weekends](https://datarekha.com/blog/ai-velocity-paradox/): AI writes code in minutes, but review, testing, and deployment still run at human speed — and the AI velocity paradox is landing on engineers as weekends. - [Asking for a promotion](https://datarekha.com/blog/asking-for-promotion/): Promotions are given for work you are already doing at the next level, not as a reward for time served — and most people lose them by waiting for someone else to notice. - [Async etiquette: working across time zones](https://datarekha.com/blog/async-etiquette/): Distributed teams that default to async ship faster — but only if everyone writes as if the reader is asleep when they send it. - [Attention, explained without the matrices](https://datarekha.com/blog/attention-without-matrices/): Self-attention is a soft dictionary lookup: every word asks a question, every other word posts a label, and the answer is a weighted average of what each word actually contains. - [Why the average customer does not exist](https://datarekha.com/blog/average-customer-myth/): The mean is a liar on skewed data, and almost all business data is skewed — here is how to stop building products for a customer who never existed. - [Avoiding burnout before it avoids you](https://datarekha.com/blog/avoiding-burnout/): Burnout is not a single bad week — it is a slow structural collapse across three dimensions, and by the time most people name it, they have already lost months they cannot get back. - [Backprop is the chain rule with good bookkeeping](https://datarekha.com/blog/backprop-is-the-chain-rule/): Backpropagation is not a mysterious learning algorithm — it is systematic calculus, applied backward through a network, made cheap by refusing to compute the same number twice. - [Bayes' theorem is just updating beliefs with evidence](https://datarekha.com/blog/bayes-updating-beliefs/): A 99%-accurate test sounds iron-clad until you realize that, for rare diseases, a positive result is probably wrong — and Bayes explains exactly why. - [Always beat the baseline first](https://datarekha.com/blog/beat-the-baseline/): A 0.91 F1 score is impressive until you discover a constant predictor scores 0.90 — which means your model's only real contribution is the gap between those two numbers. - [Beating procrastination: the two-minute rule and friends](https://datarekha.com/blog/beating-procrastination/): Procrastination is not a time-management failure — it is an emotion-regulation problem, and shrinking the first step until it is laughably small is the only lever that reliably breaks the cycle. - [The bias-variance tradeoff, drawn from scratch](https://datarekha.com/blog/bias-variance-drawn/): Model error is not one thing — it is the sum of two competing forces, and the art of machine learning is finding the narrow valley between them. - [When O(n squared) quietly kills your data pipeline](https://datarekha.com/blog/big-o-quietly-kills-pipelines/): An O(n squared) operation is invisible at a thousand rows and catastrophic at a million — and it almost always reaches production disguised as clean-looking code. - [Binary search is everywhere once you see it](https://datarekha.com/blog/binary-search-is-everywhere/): Binary search is not a data structure trick — it is a way of thinking about any monotonic question, and once you internalize it, you see it lurking inside problems that look nothing like sorted arrays. - [Presenting to executives: lead with the answer](https://datarekha.com/blog/bluf-executive-comms/): Executives decide in the first 30 seconds — bury the recommendation and you lose the room before you have made a single argument. - [Broadcasting is the NumPy idea that takes a week to click](https://datarekha.com/blog/broadcasting-clicks/): Broadcasting — NumPy's rule for combining arrays of different shapes by silently stretching size-1 dimensions — looks like magic until you see the geometry, and then you can never unsee it. - [Building a track record people remember](https://datarekha.com/blog/building-track-record/): Careers are not built on busyness — they are built on a handful of shipped, visible outcomes that compound into a reputation others can point to. - [Categoricals: the Pandas dtype that pays for itself](https://datarekha.com/blog/categoricals-pay-for-themselves/): A column of repeated country codes that looks like strings is silently eating ten times the memory it needs — and making every groupby slower than it has to be. - [The chart you reach for is an argument, not a default](https://datarekha.com/blog/chart-is-an-argument/): Every chart type encodes a claim about your data — and reaching for the wrong one doesn't just look bad, it actively misleads the people making decisions. - [Cohorts, not totals: how a flat dashboard hides a dying product](https://datarekha.com/blog/cohorts-not-totals/): A steady active-user count can mask catastrophic churn — and the only way to see the rot is to stop looking at totals and start looking at cohorts. - [Correlation isn't causation — but here's what it actually is](https://datarekha.com/blog/correlation-isnt-causation-but/): Pearson's r is a precise, fragile number: it measures linear co-movement on a scale from -1 to 1, and almost everything interesting about causality lies in what it cannot see. - [Cross-functional work: speaking other teams' languages](https://datarekha.com/blog/cross-functional/): The colleague who moves initiatives forward fastest is rarely the most expert person in the room — they are the one who translates. - [Cross-validation: a score you didn't overfit to](https://datarekha.com/blog/cross-validation-a-score-you-can-trust/): A single train/test split gives you one lucky or unlucky number; k-fold cross-validation gives you five honest ones — and the variance between them tells you as much as the mean. - [Decorators are just functions that wrap functions](https://datarekha.com/blog/decorators-wrap-functions/): The @ symbol is pure syntactic sugar for a pattern you already know: pass a function in, get a smarter function back. - [Deep work in an open office](https://datarekha.com/blog/deep-work/): Knowledge work rewards focus, but the modern office is engineered to destroy it — here is a practical system for reclaiming your output. - [Delegation: letting go without losing control](https://datarekha.com/blog/delegation/): Most new leaders either micromanage every keystroke or throw ownership over the wall and hope — both fail the team, and both fail the leader. - [Difficult conversations: a playbook](https://datarekha.com/blog/difficult-conversations/): The conversation you keep postponing is already costing you — here is a four-step structure that ends avoidance and actually moves things forward. - [Giving direction without micromanaging](https://datarekha.com/blog/direction-not-micromanaging/): The manager who explains the destination and trusts the route gets better work, faster — and keeps the people worth keeping. - [Disagree and commit: the decision discipline](https://datarekha.com/blog/disagree-and-commit/): Teams that re-litigate every decision after the fact pay a tax on execution that no amount of being right can recoup. - [Disagreeing without being disagreeable](https://datarekha.com/blog/disagreeing-well/): You can fight the idea without fighting the person — and the difference between the two is mostly a matter of technique, not temperament. - [Eigenvectors: the directions a matrix doesn't turn](https://datarekha.com/blog/eigenvectors-directions-that-dont-turn/): Most vectors get rotated when a matrix acts on them — eigenvectors are the stubborn exceptions, and that stubbornness is exactly why they run machine learning. - [Writing email that gets read and acted on](https://datarekha.com/blog/email-that-gets-read/): Most work email fails because the ask is buried in paragraph three — here is how to front-load the decision and get a response in one round-trip. - [Expected value: how professionals make peace with uncertainty](https://datarekha.com/blog/expected-value-decisions/): The number you should optimize for isn't the most likely outcome — it's the probability-weighted average of all outcomes, and ignoring that difference is the hidden tax on every bad business decision. - [EXPLAIN: reading the plan your database hands you](https://datarekha.com/blog/explain-reading-the-query-plan/): Every SQL query is secretly a program your database compiles; EXPLAIN shows you that program, and once you can read it, a 30-second query becomes a 30-millisecond one. - [Feature scaling: the step KNN and gradient descent never forgive](https://datarekha.com/blog/feature-scaling-knn-never-forgives/): When one feature spans dollars and another spans years, the dollar column dominates every distance calculation and every gradient update — silently wrecking models that otherwise look fine. - [Giving feedback that lands: the SBI model](https://datarekha.com/blog/feedback-that-lands/): Vague feedback is not kind — it is noise dressed up as a conversation, and the SBI model (Situation, Behavior, Impact) is the antidote. - [Finding a mentor (and being worth mentoring)](https://datarekha.com/blog/finding-a-mentor/): Good mentorship is earned through low-cost, specific asks and ruthless follow-through — not assigned by HR or requested with a vague 'will you mentor me?' - [Your first 90 days in a new job](https://datarekha.com/blog/first-90-days/): The first quarter shapes how you are seen for years — listen and map before you opine, earn credibility through small visible wins, and diagnose before you ever prescribe. - [The conversion funnel is a multiplication problem](https://datarekha.com/blog/funnel-multiplication/): Overall conversion is the product of every step rate — not a vague average — and that single fact tells you exactly where to spend your next dollar. - [Comprehensions, generators, and the art of not building the list](https://datarekha.com/blog/generators-dont-build-the-list/): The gap between a list comprehension and a generator expression is just two characters, but at ten million rows it is the difference between a program that breathes and one that chokes. - [GroupBy is a three-act play: split, apply, combine](https://datarekha.com/blog/groupby-split-apply-combine/): The split-apply-combine model is the single mental frame that makes Pandas GroupBy, SQL GROUP BY, and every variant of agg/transform/filter finally cohere. - [Hash tables: O(1) until they don't](https://datarekha.com/blog/hash-tables-o1-until-they-collide/): A hash table promises constant-time lookup in the average case — but that asterisk hides a story about collisions, load factors, and adversarial keys that every practitioner should understand. - [Imposter syndrome: naming it and moving past it](https://datarekha.com/blog/imposter-syndrome/): Feeling like a fraud at work is nearly universal among capable people — and the antidote is not confidence, it is evidence. - [Indexes: the data structure your WHERE clause is begging for](https://datarekha.com/blog/indexes-your-where-clause-wants/): A single missing index turned a 12-millisecond query into a 4-second crawl — not because the database broke, but because it had no choice but to read every row. - [How to get buy-in: the influence playbook](https://datarekha.com/blog/influence-buy-in/): A great idea with no buy-in dies in the meeting it was supposed to win — here is how to pre-wire the room so the vote is a formality. - [Leading without authority](https://datarekha.com/blog/leading-without-authority/): The most consequential moves in your career will be made without a single direct report — here is how to make them land. - [Managing conflict on a team](https://datarekha.com/blog/managing-conflict/): Unaddressed conflict does not disappear — it goes underground, where it costs far more than the argument you were avoiding. - [Manage your energy, not just your time](https://datarekha.com/blog/managing-energy/): A full calendar is not the same as full capacity — learning to match the right work to the right hour is the leverage move that most time-management advice misses. - [Managing up: making your manager's job easier](https://datarekha.com/blog/managing-up/): Managing up is not sucking up — it is the deliberate practice of reducing your manager's uncertainty about you, so trust accumulates instead of eroding. - [MCP vs A2A vs ACP vs ANP: the agent protocol stack](https://datarekha.com/blog/mcp-a2a-acp-anp-agent-protocol-stack/): Four acronyms, one stack. MCP connects an agent to its tools; A2A, ACP, and ANP connect agents to each other — differing only by how open the world is, from the enterprise intranet to the decentralized agentic web. - [MCP isn't enough: who lets your agents talk to each other?](https://datarekha.com/blog/mcp-isnt-enough-agents-talking-to-agents/): MCP solved the agent-to-tool problem and solved it well. But the moment one agent needs to hand work to another agent it does not own, MCP runs out of road — and that is exactly the gap A2A and ACP were built to fill. - [How to run a meeting people don't dread](https://datarekha.com/blog/meeting-people-dont-dread/): Most meetings are status updates in disguise — learn the three legitimate reasons to gather, and a decision framework that turns calendar dread into momentum. - [Your Pandas merge silently 10x'd the rows — here's why](https://datarekha.com/blog/merge-exploded-the-rows/): A join between two tables where the key is not unique on one side silently multiplies rows for every matching pair, and pandas will not warn you unless you tell it to. - [MLOps is a loop, not a pipeline](https://datarekha.com/blog/mlops-is-a-loop/): Shipping a model is not the finish line — it is the starting gun for a feedback loop that runs as long as the model serves traffic, and the teams that forget this find out when a customer calls. - [Net revenue retention: the one number investors obsess over](https://datarekha.com/blog/net-revenue-retention/): NRR reveals whether your existing customers are worth more or less than they were a year ago — and a single number above 100% changes everything about how you can grow. - [Networking for people who hate networking](https://datarekha.com/blog/networking-for-introverts/): Networking is not collecting contacts — it is building a small number of genuine relationships before you need them, and the introverts who understand this tend to do it better. - [Building trust as a new manager](https://datarekha.com/blog/new-manager-trust/): The fastest way to lose your team in your first 90 days is to prove yourself by changing everything — here is the slower, harder, more durable path. - [Note-taking that actually helps you think](https://datarekha.com/blog/note-taking/): Notes you never reread are just expensive transcription — here is how to build a system that generates ideas, not just archives them. - [NULL is not a value, and that wrecks your WHERE clause](https://datarekha.com/blog/null-is-not-a-value/): NULL means unknown, so every comparison involving it yields unknown — not false — and that silent third outcome is responsible for more wrong query results than any other SQL trap. - [Office politics for honest people](https://datarekha.com/blog/office-politics/): Politics is just how decisions and resources get allocated among people — and navigating it with integrity is a learnable skill, not a moral compromise. - [One-hot encoding and the curse of high cardinality](https://datarekha.com/blog/one-hot-and-the-curse-of-cardinality/): One-hot encoding a zip code column turns 42,000 rows into a sparse desert — thousands of nearly-empty columns that starve your model of signal while drowning it in noise. - [One-on-ones that aren't a waste of time](https://datarekha.com/blog/one-on-ones/): Most 1:1s quietly die because managers treat them as a status meeting and reports let them, but reclaiming one hour a week can change the entire arc of someone's career. - [Overfitting is memorizing the answer key](https://datarekha.com/blog/overfitting-is-memorizing/): A model that aces its training data but collapses on new data has not learned anything — it has memorized noise, and the gap between its training score and its test score is the confession. - [p-values are not the probability you are right](https://datarekha.com/blog/p-values-not-what-you-think/): A p-value of 0.04 does not mean there is a 96 percent chance your variant wins — it means something far stranger, and knowing the difference is what separates analysts who ship good decisions from analysts who ship confident noise. - [Method chaining: writing pandas like a pipeline, not a pile](https://datarekha.com/blog/pandas-method-chaining/): Chaining assign, query, groupby, and agg into one readable pipeline beats a pile of intermediate variables — it reads top to bottom like a recipe, kills stale-variable bugs, and sidesteps the SettingWithCopy trap. - [The performance review: making your case](https://datarekha.com/blog/performance-review/): Your manager cannot remember everything you did — your job is to arrive with evidence, not hope. - [Your personal brand at work](https://datarekha.com/blog/personal-brand/): Your reputation is built in the moments you are not watching — and most people are either invisible or noisy, with very few landing in the narrow band that actually earns trust and opportunity. - [Prioritization: telling urgent from important](https://datarekha.com/blog/prioritization-eisenhower/): Busy is not the same as effective — the Eisenhower Matrix exposes the one quadrant where real careers are built, and why almost everyone starves it. - [Psychological safety: what it is and how to build it](https://datarekha.com/blog/psychological-safety/): The team that never disagrees in meetings is not your best team — it is your most dangerous one. - [Public speaking without the panic](https://datarekha.com/blog/public-speaking/): Stage fright is just energy without a container — once you know how to structure a talk and practice it out loud, the nerves stop being the enemy and start doing the work for you. - [The mutable default argument, and other Python footguns](https://datarekha.com/blog/python-mutable-default-trap/): Python evaluates default argument values exactly once, at function definition time, which means a mutable default is a shared object that silently accumulates state across every call. - [Quiet quitting to quiet cracking: a field guide to disengagement](https://datarekha.com/blog/quiet-cracking-field-guide/): Quiet quitting, quiet cracking, boreout, conscious unbossing — work keeps inventing words for checking out. A field guide to what each signals. - [RAG in one diagram: retrieve, augment, generate](https://datarekha.com/blog/rag-in-one-diagram/): The cleanest mental model for retrieval-augmented generation: why pasting your docs into a prompt beats hoping the LLM already knows them, and the two failure modes that kill every RAG system in production. - [How to read a P&L in sixty seconds](https://datarekha.com/blog/read-a-pnl/): The income statement is the one page every business speaks fluently, and once you know the grammar you can judge a company before your coffee gets cold. - [CTEs turned my unreadable query into something I can follow](https://datarekha.com/blog/reading-ctes/): A common table expression is less a feature than a cognitive tool — it lets you read a complex query from top to bottom, in the order you actually think, instead of inside-out from the deepest parenthesis. - [Reading the room](https://datarekha.com/blog/reading-the-room/): The same message can land perfectly or detonate silently — the difference is rarely the words you chose, it is whether you read the room before you opened your mouth. - [How to receive feedback without getting defensive](https://datarekha.com/blog/receiving-feedback/): The instinct to defend yourself when criticized is perfectly human — and it is the single habit most reliably separating people who plateau from people who compound. - [Regularization is a tax on complexity](https://datarekha.com/blog/regularization-is-a-tax-on-complexity/): Your model will always overfit given enough rope — regularization is the mechanism that prices complexity so the model only grows elaborate when the data actually demands it. - [Remote work that does not tank your career](https://datarekha.com/blog/remote-career/): Out of sight becomes out of mind faster than you think — but visibility is a skill you can build deliberately, even from a spare bedroom. - [Running a retrospective that changes things](https://datarekha.com/blog/retrospectives/): Most retros are theater — same complaints, different quarter — because the team conflates venting with deciding and leaves without a single named owner. - [Negotiating your salary (and why you must)](https://datarekha.com/blog/salary-negotiation/): The raise you fail to negotiate in year one quietly compounds into a six-figure gap by mid-career — and no one will hand it back to you. - [Saying no without burning bridges](https://datarekha.com/blog/saying-no-gracefully/): Every yes you give carelessly is a debt you will pay with your credibility — learning to decline well is not a career risk, it is what makes your yeses worth anything. - [SettingWithCopyWarning, finally explained](https://datarekha.com/blog/settingwithcopy-explained/): The most-Googled pandas warning is not about copying — it is about whether the memory you are writing to is the DataFrame you think it is. - [Sharing credit (and why it makes you look better)](https://datarekha.com/blog/sharing-credit/): Hoarding the spotlight is the fastest way to ensure no one wants to shine it on you again. - [Standard deviation, explained without the formula](https://datarekha.com/blog/standard-deviation-by-archers/): Two archers with identical averages and completely different groupings reveal everything you need to know about spread, punishment for outliers, and why the formula does what it does. - [The STAR method: answering behavioral interviews](https://datarekha.com/blog/star-method-interviews/): Behavioral questions separate candidates who did interesting work from those who can articulate what they did and why it mattered — and STAR is the structural difference. - [The art of the status update](https://datarekha.com/blog/status-update-art/): A well-written status update is not a chore — it is the single cheapest act that earns you trust, autonomy, and the benefit of the doubt when things go sideways. - [Storytelling at work: the structure that makes people care](https://datarekha.com/blog/storytelling-for-work/): Data persuades the head; story moves people to act — and once you learn the four-beat narrative arc, you will never give a flat project update again. - [Switching jobs gracefully](https://datarekha.com/blog/switching-jobs/): How you leave a job is remembered longer than most of what you did there, and the industry is far smaller than it looks from the inside. - [Taming Slack and email](https://datarekha.com/blog/taming-the-firehose/): Every notification is someone else's priority quietly colonizing your calendar — here is the system to take it back. - [Temperature, top-p, top-k: the three knobs on an LLM](https://datarekha.com/blog/temperature-top-p-top-k/): Every LLM call hides a small probability lottery behind its confident prose — temperature, top-k, and top-p are the rules of that lottery, and most practitioners tune them without understanding what they are reshaping. - [The agentic web: how ANP wants to be the HTTP of agents](https://datarekha.com/blog/the-agentic-web-anp-decentralized-identifiers/): MCP, A2A, and ACP wire agents to tools and to each other inside the enterprise. ANP aims further: an open, decentralized network where any agent can find and trust any other across the internet, with no central authority — using W3C Decentralized Identifiers, the did:wba method, and schema.org self-descriptions. - [The axis argument everyone gets backwards](https://datarekha.com/blog/the-axis-argument/): Axis in NumPy and Pandas names the dimension you destroy, not the one you keep — and once that clicks, every aggregation you write becomes obvious. - [The art of the handoff](https://datarekha.com/blog/the-handoff/): Most dropped balls happen not because people are careless but because the seam between two people was never properly closed. - [Time-blocking: designing your week on purpose](https://datarekha.com/blog/time-blocking/): A calendar full of back-to-back meetings is not fate — it is an accidental design decision you can undo in forty minutes on a Friday afternoon. - [Transfer learning: standing on a pretrained model's shoulders](https://datarekha.com/blog/transfer-learning-shoulders/): You do not train from scratch in 2026 — you inherit a model's years of learned representations and spend your compute budget on the narrow task that actually matters. - [Two pointers: the trick that turns O(n squared) into O(n)](https://datarekha.com/blog/two-pointers-on2-to-on/): Most array pair problems feel like they need a nested loop until you notice that sorting gives you a monotonic structure you can exploit to skip the entire inner loop. - [Type hints are documentation that can't go stale](https://datarekha.com/blog/type-hints-docs-that-cant-rot/): A docstring lies without consequence, but a type hint that disagrees with the code is caught by your editor before you even save the file. - [Unit economics is the only growth math that matters](https://datarekha.com/blog/unit-economics-growth-math/): Whether pouring money into growth is brilliant or fatal comes down to one ratio — and most people compute it wrong. - [The weekly review: the habit that compounds](https://datarekha.com/blog/weekly-review/): Most people run their week reactively and never look up — a 30-minute weekly review is the only place where strategy actually meets the calendar. - [Does wellbeing spending actually work? The case against wellbeing-washing](https://datarekha.com/blog/wellbeing-spending-work/): Companies pour tens of billions into mindfulness apps and resilience courses, but in controlled trials most wellbeing programs show no benefit. - [Why everything looks normal: the central limit theorem](https://datarekha.com/blog/why-everything-looks-normal/): The bell curve colonizes measurement not because the world is Gaussian but because averaging destroys the shape of almost any distribution. - [Why neural networks need activation functions](https://datarekha.com/blog/why-neural-nets-need-activations/): Without a nonlinear activation, stacking a thousand layers is mathematically identical to stacking one — and every straight-line model in history could have told you that. - [Why Python is slow — and the times it actually matters](https://datarekha.com/blog/why-python-is-slow/): A tight Python loop over a million numbers can be 100x slower than C, but that rarely matters — until it suddenly, catastrophically does. - [Why we normalize: batch norm, intuitively](https://datarekha.com/blog/why-we-normalize-batchnorm/): Internal covariate shift is not a subtle bug — it is the reason deep networks used to need weeks of careful babysitting, and batch norm is why that era quietly ended. - [Window functions changed how I write SQL](https://datarekha.com/blog/window-functions-changed-sql/): The leap from GROUP BY to window functions is the single biggest level-up an analyst makes — and the intuition behind OVER, PARTITION BY, and LAG is simpler than most tutorials admit. - ['40% fear AI will take their job': what the data actually says](https://datarekha.com/blog/ai-job-fear-vs-data/): Four in ten workers fear AI will take their job, and some cuts are real — but they rarely pay off, and the forecast still points to a net job gain. - [The $8.9 trillion problem: inside the global engagement crisis](https://datarekha.com/blog/engagement-crisis-numbers/): Only a fifth of the world's workers are engaged, and the lost productivity runs to $8.9 trillion — but the headline hides what engaged even means. - [The four-day week, backed by the biggest trial yet](https://datarekha.com/blog/four-day-week/): The largest four-day-week trial found burnout falling sharply and output holding — but only because firms redesigned the work first. The evidence. - [The thinning bottom rung: AI and the vanishing entry-level job](https://datarekha.com/blog/ai-entry-level-rung/): AI is best at the repetitive work juniors once learned the craft on, so the entry-level rung is wearing thin. What the data shows and how to stay hireable. - [The collapsing middle: why managers are cracking first](https://datarekha.com/blog/manager-collapse/): The clearest signal in 2025 workplace data is not that employees are struggling — it is that managers are cracking faster, and the damage flows downhill. - [The two-minute interruption: focus, surveillance, and always-on work](https://datarekha.com/blog/always-on-knowledge-worker/): For coding and data work, focus is the scarce resource — yet the workday shreds it every two minutes with pings, overtime, and monitoring. - [Money on the brain: how financial stress steals focus at work](https://datarekha.com/blog/financial-stress-at-work/): Financial stress is the quiet undercurrent beneath much of what we call burnout, following people to work as distraction and lost sleep. What helps, in order. - [Boreout: the burnout that comes from too little](https://datarekha.com/blog/boreout/): Boreout is burnout's overlooked twin — chronic under-stimulation that breeds the same fatigue and cynicism, and quietly hits skilled people hardest. - [The lonely org chart: workplace loneliness in the hybrid era](https://datarekha.com/blog/workplace-loneliness/): Workplace loneliness carries real health and retention costs, and remote work dismantled the job's social fabric — hitting early-career staff hardest. - [The agent harness — the code around the model that actually makes an agent](https://datarekha.com/blog/agent-harness/): The LLM is the engine, but the harness is the car. Most of an agent product's real value lives in the scaffolding wrapped around the model — the loop runner, tool dispatcher, context manager, permission gate, and the dozen other things that turn a stateless completion API into something that can work for twenty minutes unsupervised. - [Conscious unbossing: why Gen Z is turning down the promotion](https://datarekha.com/blog/conscious-unbossing/): Gen Z is declining the step into management, and the data says conscious unbossing is less a failure of ambition than a rational read of a quietly broken job. - [Denial of wallet: the attack that bankrupts your AI app](https://datarekha.com/blog/denial-of-wallet/): Classic DoS tries to take you down. Denial-of-wallet keeps you up and runs your token bill to five figures by lunch. Why request limits don't save you. - [Sleep: the performance lever nobody optimizes](https://datarekha.com/blog/sleep-performance-lever/): For coding, analysis, and exam prep, sleep quietly sets the ceiling on everything else — yet always-on work erodes it first, and the fix is workload design. - [The supervisor-worker pattern: when one agent isn't enough](https://datarekha.com/blog/supervisor-worker-pattern-production/): Anthropic's orchestrator-worker pattern is the only multi-agent topology that consistently ships. Here's how to recognise when you actually need it, what the LangGraph supervisor implementation looks like in practice, and the failure modes nobody warns you about. - [Operator, Claude Computer Use, and Project Mariner: the browser agent shootout](https://datarekha.com/blog/operator-vs-claude-computer-use-vs-mariner/): Three browser agents shipped within twelve months — each with a different abstraction over the browser. Here's how the screenshot-and-click, DOM-and-accessibility-tree, and Chrome-extension approaches stack up on WebVoyager, OSWorld, latency, cost, and real-world reliability. - [996 and the fetishization of overwork](https://datarekha.com/blog/overwork-996/): 996 — nine to nine, six days a week — is lionized again in startups, but the hours data and WHO death toll check the urge to confuse long with serious. - [Surviving 10,000 concurrent requests to your LLM API](https://datarekha.com/blog/surviving-10k-concurrent-llm-requests/): An LLM request spends 99% of its life waiting. Design around that one fact and 10k concurrent users stops being scary. - [The Big Stay: why nobody's quitting, and why that's worse](https://datarekha.com/blog/the-big-stay/): A falling quit rate looks like loyalty, but the Big Stay can mean the opposite — people who want out but feel trapped, fraying quietly at their desks. - [The three kinds of memory production agents actually use](https://datarekha.com/blog/agent-memory-architectures/): Working memory, episodic memory, semantic memory — the cognitive science taxonomy that every agent memory startup borrows from. Here's what each one means in practice, what Letta, Mem0, and Zep actually ship, and why most production agents only need the cheapest one. - [Cache the question, not just the bytes](https://datarekha.com/blog/cache-the-question-not-the-bytes/): Your embedding API answers the same query a thousand times a day. Three caches cut LLM cost and latency — and one of them can hand back a confidently wrong answer. - [The recognition gap: the highest-ROI lever teams ignore](https://datarekha.com/blog/recognition-gap/): Managers think they give feedback and praise constantly; reports barely feel it. That recognition gap is the cheapest, highest-return lever most teams ignore. - [What actually re-engages people when the perks don't](https://datarekha.com/blog/what-reengages-people/): Ping-pong tables and meditation apps do not move engagement. What the evidence says re-engages people, ranked by leverage, for data and engineering leads. - [50,000 documents, one summarization pipeline](https://datarekha.com/blog/fifty-thousand-document-pipeline/): You can't loop 50k LLM calls inside a request. The shape that works — a queue, a pool of workers, and the boring reliability details that decide whether it finishes. - [The five patterns that ship real agents in 2026](https://datarekha.com/blog/five-patterns-real-agents/): Anthropic's December 2024 paper became the production reference for agent design. Two years on, here's which patterns actually survived contact with shipped products — and why the simple ones won. - [Psychological safety: the precondition every wellbeing program forgets](https://datarekha.com/blog/psychological-safety-precondition/): Before any wellbeing program can work, people must feel safe enough to speak — and most teams fail that psychological-safety test before anyone admits it. - [Is sitting the new smoking? The desk-bound body of data work](https://datarekha.com/blog/sedentary-desk-body/): Coding and analysis are some of the most sedentary work ever invented. What sitting does to the body, why 'the new smoking' overstates it, and what helps. - [Why ReAct lost — and structured planning won](https://datarekha.com/blog/why-react-lost-to-structured-planning/): The 2023 ReAct paper defined an era of agent design. Its Thought-Action-Observation loop is also why so many agents burn tokens, loop in circles, and time out on long tasks. Here's how Plan-and-Solve, ReWOO, and LLMCompiler displaced it in production — and the concrete numbers that explain why. - [The right to disconnect: a global map of after-hours work](https://datarekha.com/blog/right-to-disconnect/): Right-to-disconnect laws now let workers ignore the boss after hours — France, Australia, Ireland — while the US has none. What the split means for teams. - [The return-to-office fight, weighed honestly](https://datarekha.com/blog/rto-backlash/): Return-to-office mandates became a wellbeing flashpoint: the office aids connection and mentorship, but blanket rules read as control and push people out. - [Tool selection at 1000 tools: routing techniques that ship](https://datarekha.com/blog/tool-selection-at-scale/): Cramming hundreds of MCP tools into your system prompt destroys both latency and accuracy. Vector retrieval, hierarchical menus, RAG-on-tools, and code mode each take a different bet. Here are the numbers, the production deployments, and the pattern that's winning. - [Where your Python packages actually live](https://datarekha.com/blog/where-your-python-packages-live/): venv isolates them, uv makes installing them almost free, and pex bundles them into one file you can throw at any machine. A field guide to three tools and the one question they each answer. - [Browser agents in production: Manus, BrowserBase, and Stagehand](https://datarekha.com/blog/browser-agents-in-production/): Headless browser agents looked like science fiction a year ago. Today they cost real money, fail real ways, and are mostly an infrastructure play, not a model play. Here's where they work, where they don't, and which layer of the stack is actually winning. - [The caregiving squeeze: work and the sandwich generation](https://datarekha.com/blog/caregiving-squeeze/): Caring for children and ageing parents at once is quietly pushing experienced people, especially women, to downshift or leave as office mandates collide. - [Edge AI in practice: Vercel AI SDK + Cloudflare Workers AI](https://datarekha.com/blog/edge-ai-vercel-cloudflare/): Some inference belongs at the edge — the user's nearest POP — not in a central GPU cluster. The Vercel AI SDK and Cloudflare Workers AI made that practical. Here's where edge wins, how the cold-start tricks work, and what the streaming-from-the-edge architecture looks like. - [Neurodiversity at work: the talent case beyond accommodation](https://datarekha.com/blog/neurodiversity-at-work/): Autism, ADHD, and dyslexia are common in technical fields, yet work is built around a neurotypical default. Stop bolting on accommodation — design for it. - [The eval loop that actually ships agents](https://datarekha.com/blog/the-eval-loop-that-actually-ships-agents/): Every team that ships AI agents reliably has built roughly the same eval system: a golden set kept honest by humans, an LLM-judge they don't fully trust, a regression dashboard that gates merges, and a culture of 'no win on the eval, no merge.' Here's what that loop actually looks like in practice. - [Evals that actually work: beyond the LLM-as-judge trap](https://datarekha.com/blog/evals-that-actually-work/): LLM-as-judge evaluators are the second most popular eval pattern in 2026. They are also the most over-trusted. The eval pipelines at the teams shipping the fastest agents look almost nothing like the ones described in vendor blog posts — and the difference matters. - [Self-correction without infinite loops: agent stopping criteria that actually work](https://datarekha.com/blog/self-correction-without-infinite-loops/): Reflection loops promised agents that fix their own mistakes. In production they more often produce agents that 'improve' working code into garbage, or worse, loop forever. Here's what the teams shipping real agents do instead. - [When not to use RAG](https://datarekha.com/blog/when-not-to-use-rag/): RAG is the default answer to 'how do I give my LLM custom knowledge?' — and for a wide class of problems, it's the wrong answer. Long-context prompt caching, fine-tuning, and in-context learning each beat RAG in regimes where the costs and assumptions actually pencil out. Here's the decision tree. - [The workplace health gap: menstruation, fertility, and menopause](https://datarekha.com/blog/womens-health-workplace/): Menstruation, fertility, and menopause quietly shape the careers of much of the workforce, and the silence around them pushes experienced women out the door. - [Claude Code, Cursor, and Aider — three answers to the same question](https://datarekha.com/blog/claude-code-vs-cursor-vs-aider/): Three coding agents, three different bets on autonomy, context, and where the human belongs in the loop. The interesting part isn't which one wins — it's which assumptions each one refused to compromise on. - [Replit Agent's architecture, two years in](https://datarekha.com/blog/replit-agent-architecture/): Replit Agent launched in September 2024 and turned a nine-year-old IDE into a $150M-ARR business. The architecture is unfashionably explicit — plan, confirm, execute, checkpoint — and the bet that explicit checkpoints beat full autonomy is paying off. Here's how it actually works. - [MCP is the USB-C of AI tools, finally](https://datarekha.com/blog/mcp-the-usb-c-of-ai-tools/): Anthropic shipped the Model Context Protocol in late 2024 as a small, JSON-RPC-shaped spec for connecting LLM clients to tools and data sources. Eighteen months later, it's the most adopted open protocol in the AI space — and the hype is, for once, an undercount. - [v0 by Vercel: how prompt-to-UI actually works](https://datarekha.com/blog/v0-by-vercel-dissected/): v0 makes 'build me a dashboard' produce real Next.js + shadcn/ui code that ships. The trick wasn't a smarter model — it was a narrow constraint, a streaming preview loop, and an opinionated component library acting as scaffolding. Here's the architecture, the competitive landscape, and why most clones missed the point. - [AI SREs in production: Resolve.ai, Cleric, Parity](https://datarekha.com/blog/ai-sres-in-production/): A new category of on-call agent is being shipped into real production environments — agents that watch alerts, gather evidence, and propose remediations. Most of them are deliberately read-only. The architecture is converging, the MTTR numbers are real, and PagerDuty is responding from the incumbent side. Here's what's actually working. - [Speculative decoding in the wild: how labs cut latency by 2-3x](https://datarekha.com/blog/speculative-decoding-in-the-wild/): A small fast model proposes, the big slow model verifies. Across Medusa, EAGLE, and draft-model approaches, speculative decoding is the latency-reduction lever that frontier labs reach for when they can't make the model itself any smaller. - [Why multi-agent swarms keep failing to ship](https://datarekha.com/blog/why-multi-agent-swarms-fail/): Two years after AutoGen and CrewAI promised teams of cooperating AI agents, the production scoreboard is brutal: orchestrator-workers ships, agent teams mostly don't. The reasons are structural, not stylistic — and they explain why every serious agent team has quietly converged on a much more boring shape. - [Getting tool calling to 99% reliability in production](https://datarekha.com/blog/tool-calling-reliability-99-percent/): Most production agent failures are not model failures. They are tool-call failures — the model picked the right tool but wrote the wrong arguments, or hallucinated an argument that doesn't exist. The fix is unglamorous and mostly about schema design. - [Voice agents at scale: the Vapi, Retell, Bland.ai engineering](https://datarekha.com/blog/voice-agents-at-scale/): Voice agents are the unsexy success story of the agent era. Underneath the marketing they're all the same five-box pipeline — STT, LLM, TTS, turn-taker, telephony — fighting for the same 500ms latency budget. Here's how the three biggest platforms actually build it, what each one optimizes for, and where the real cost goes. - [Devin's architecture, anatomised](https://datarekha.com/blog/devin-architecture-anatomy/): Cognition's launch demo promised a 'fully autonomous software engineer.' The product that actually ships is more interesting — a planner-executor split running in a sandboxed VM, with explicit memory windows, hard pruning rules, and a shockingly disciplined view of where the model is allowed to be creative. - [We built the same agent three times: MAF, LangGraph, and ADK](https://datarekha.com/blog/maf-vs-langgraph-vs-adk/): Three frameworks, one problem: an invoice-processing agent that ingests PDFs, validates against a database, asks a human when uncertain, and writes back to an ERP. What each framework made easy. What each one made painful. - [Sierra's customer-service playbook](https://datarekha.com/blog/sierra-customer-service-playbook/): Bret Taylor and Clay Bavor built the highest-profile agent company by making three opinionated bets — every brand needs its own AI, agents must run inside the brand's workflows, and pricing should track outcomes. Two years on, the bets are paying off in ways the industry is still copying. - [AutoGPT to 2026: what survived](https://datarekha.com/blog/autogpt-to-2026-what-survived/): Three years after AutoGPT briefly broke GitHub's star counter, almost nothing in its original form has shipped. The interesting question is what *did* survive — and it's a sharper, more honest answer than the discourse of 2023 ever got close to. - [Self-RAG and Corrective RAG, the loops that actually help](https://datarekha.com/blog/self-rag-and-crag/): Two papers from 2023 argued RAG should be reflective: retrieve, judge, re-query if the evidence is bad. By 2026 the practitioner verdict is in — Self-RAG and CRAG actually do help, but only on the queries that need them, and the latency cost is real. - [Bedrock, Vertex, Foundry: pick the one whose spirit matches yours](https://datarekha.com/blog/bedrock-vertex-foundry-comparison/): Every comparison of the three hyperscaler AI platforms is a feature matrix that nobody reads twice. The actual decision is about which company's spirit your team can live with for the next five years — and that's a different question. - [Continuous batching: the one trick that made LLM serving 10x cheaper](https://datarekha.com/blog/continuous-batching-explained/): Static batching wastes GPUs by padding to the longest sequence and waiting for stragglers. Continuous batching reschedules every iteration, evicts finished requests, and admits new ones mid-stream. Here's why that single shift bought a 10-23x throughput win. - [How Cursor's Composer actually works](https://datarekha.com/blog/how-cursor-composer-actually-works/): Multi-file edits feel atomic in Cursor not because the model got smarter, but because the team built a stack of careful workarounds — speculative diffs, a separate Apply Model, and an indexer that stays one step ahead of you. Here's the engineering. - [Computer-use latency engineering: getting browser agents under a second](https://datarekha.com/blog/computer-use-latency-engineering/): A naive browser-use loop is 4-8 seconds per step. Production systems run at 600ms. The gap is closed by half a dozen techniques — differential screenshots, prompt caching, batched actions, vision-model routing — each of which sounds boring until you measure the difference. - [Google's Agent Development Kit, and when to reach for it](https://datarekha.com/blog/google-adk-when-to-reach-for-it/): ADK is Google's bet on agent infrastructure: a thin SDK that takes Gemini's strengths — tool calling, grounding, multimodality — and makes them deployable to Vertex AI Agent Engine in one command. It is less framework than LangGraph, more framework than calling the model directly, and uniquely useful inside Google Cloud. - [Late interaction, or why ColBERT keeps coming back](https://datarekha.com/blog/late-interaction-retrieval/): Single-vector dense retrieval crushes one nuance per chunk into one point in space. Late-interaction models like ColBERT keep a vector per token and decide similarity at query time. The math is beautiful. The storage cost is brutal. Here's when it's worth it. - [Sub-agents, handoffs, supervisors — pick exactly one](https://datarekha.com/blog/sub-agents-vs-handoffs-vs-supervisors/): Three topologies dominate multi-agent systems in 2026, and teams keep mixing them in ways that break debuggability. Sub-agents are parallel scoped work that returns to a parent. Handoffs are baton-passing with no return. Supervisors are explicit central routers. They are not interchangeable. Here's the framework for picking, and the failure modes when you don't. - [Prompt caching: the 90% cost cut explained](https://datarekha.com/blog/agent-prompt-caching-economics/): Anthropic, OpenAI, DeepSeek and Google all ship prompt caching now, but the pricing models diverge sharply. For a tool-using agent with a long system prompt, getting the cache pattern right is the difference between a viable product and a P&L disaster. - [Cloud Run is the most underrated platform for AI agents](https://datarekha.com/blog/cloud-run-gemini-serverless-agents/): Everyone deploys agents on GKE or EC2. The teams quietly shipping the fastest, cheapest production agents have moved to Cloud Run + Gemini + Firestore — and the reasons are not what you'd guess from the marketing pages. - [Hybrid search, when one retriever isn't enough](https://datarekha.com/blog/hybrid-search-at-scale/): Pure vector search misses exact identifiers. Pure BM25 misses paraphrases. Every serious production RAG stack — Notion, Perplexity, Vespa, Glean — runs both and fuses the results. Here's the math, the latency budget, and the production knobs that matter. - [vLLM vs TGI vs SGLang: choosing your inference server in 2026](https://datarekha.com/blog/vllm-vs-tgi-vs-sglang/): Three open-source serving stacks, three different bets. vLLM optimises raw throughput. TGI optimises ease and HuggingFace integration. SGLang optimises structured generation and prefix-cache reuse. Here's how to pick. - [Long-horizon agent failure modes: context rot, drift, looping](https://datarekha.com/blog/long-horizon-agent-failure-modes/): An agent that handles ten turns gracefully will likely collapse at fifty. The reasons aren't bugs — they're emergent properties of how transformers handle growing context. Here's a field guide to how agents disintegrate, with the public failure stories that mapped the territory. - [Microsoft Agent Framework, six months in](https://datarekha.com/blog/microsoft-agent-framework-production/): Microsoft consolidated Semantic Kernel and AutoGen into a single Agent Framework in late 2025. Half a year later, the picture is clear: MAF is the Azure-native option for shops that already speak C# and .NET, and its workflow/agent split is the most pragmatic in the industry. - [Coding agents in 2026: Cursor, Devin, Sweep, Aider, Claude Code compared](https://datarekha.com/blog/coding-agents-2026/): Two years after Devin launched and froze the term 'AI software engineer' in the popular imagination, here's where everyone actually landed. The dominant tools didn't converge — they specialized, and the ones that won did so by picking a workflow lane and dominating it. - [Contextual Retrieval, two years on](https://datarekha.com/blog/contextual-retrieval-explained/): Anthropic's September 2024 trick — prepend a sentence of context to each chunk before embedding — quietly became the new RAG default. Here's why a 49% retrieval-error reduction held up, what the numbers actually say, and when you still shouldn't bother. - [Deep research agents explained: Perplexity, GPT Deep Research, Gemini Deep Research](https://datarekha.com/blog/deep-research-agents-explained/): Deep Research was OpenAI's first agent product to actually ship, and it landed in a market where Google had already been live for months and Perplexity had built the search-citation pipeline the others were chasing. The three converged on similar capabilities but radically different architectures. - [How Anthropic serves a hundred million tokens a second](https://datarekha.com/blog/how-anthropic-serves-tokens-at-scale/): The frontier labs and their serving partners — Anthropic, OpenAI, Together AI, Fireworks — hide an arsenal of inference optimisations behind the simple-looking chat endpoint. Here's the hierarchy, what each layer bought, and the public numbers behind it. - [Agentic data analysis: PandasAI, Hex Magic, Julius — and why it's harder than it looks](https://datarekha.com/blog/agentic-data-analysis/): 'Just talk to your data' has been the cleanest agentic AI demo for two years. The shipped reality is much narrower than the demos suggest, because the gap between answering a question and answering it cheaply, safely, and correctly is enormous. Here's where the production line lives. - [LangGraph is what you reach for when the agent has to remember](https://datarekha.com/blog/langgraph-for-long-running-workflows/): By mid-2026 LangGraph is the default orchestration layer for stateful, long-running, human-in-the-loop agents. Not because of the API — because of the checkpoints, the interrupts, and the fact that the state outlives the request. - [The agent observability stack: LangSmith, Langfuse, Helicone, Arize](https://datarekha.com/blog/agent-observability-stack/): You can't ship agents without observability. The 2026 stack has settled into three layers — traces, evals, drift — and five vendors who each won by being unmistakably the best at one of them. Here's who picks which, and why. - [Agents for legal, finance, healthcare — the high-stakes pattern](https://datarekha.com/blog/agents-for-legal-finance-healthcare/): Three industries where hallucination is malpractice. The agent companies winning in legal, finance, and healthcare have converged on the same shape — scoped tasks, retrieval over generation, mandatory human checkpoints, audit logging by default. Here's what that pattern looks like in production at Harvey, Hebbia, Abridge, and Suki. - [Why XGBoost is still winning in 2026](https://datarekha.com/blog/why-xgboost-still-winning-2026/): Twelve years after the original paper, and despite a parade of transformer-based challengers, gradient-boosted trees remain the default for tabular data at most enterprises. Here's why the boring answer keeps winning — and what TabPFN, CatBoost, and LightGBM actually changed. - [MLOps platform consolidation: Databricks, Snowflake AI, SageMaker](https://datarekha.com/blog/mlops-platform-consolidation/): The MLOps landscape of 2023 — a dozen point tools, three feature stores, four monitoring vendors, two training frameworks — has collapsed. By 2026 the workload lives on Databricks, Snowflake Cortex, SageMaker Unified Studio, or Vertex. Here's what each platform actually does, what got swept under, and who wins which workload. - [Feature stores in 2026: Tecton, Feast, Hopsworks — death and rebirth](https://datarekha.com/blog/feature-stores-2026/): The feature store hype cycle went peak (2021), trough (2023, 'just use dbt'), and into a quieter rebirth as the data-for-AI layer for both classical ML and LLM agents. Tecton sold to Databricks. Feast survives as the open-source baseline. Hopsworks redefined itself as an AI lakehouse. Here's what the modern feature store actually is in 2026. - [The vector database shakeout: Pinecone, Weaviate, Qdrant, Chroma, pgvector](https://datarekha.com/blog/vector-db-shakeout-2026/): The pure-play vector DB category isn't dead, but it's smaller than the 2023 hype suggested. Postgres ate the low end, Pinecone owns serverless ops, Qdrant is the open-source cost winner, and Weaviate's hybrid search is its real moat. Here's the 2026 picture by the numbers. - [Embeddings in 2026: Voyage, Cohere v4, OpenAI text-embedding-3, mxbai, BGE](https://datarekha.com/blog/embeddings-2026-shootout/): The embedding model market split clean. Proprietary models (Voyage 3, Cohere v4, OpenAI v3) own the quality top; open-source (mxbai, BGE-M3, Jina v3, E5) own cost and self-host. Matryoshka rewrote the cost economics. Here's how to actually choose. - [Reranking at scale: cross-encoders, ColBERT, mxbai](https://datarekha.com/blog/reranking-at-scale/): Retrieve-then-rerank is the single biggest accuracy improvement in production RAG. Three approaches dominate — cross-encoders, late interaction, API rerankers. Here's what each costs, what each wins, and the latency budget that decides between them. - [Distributed training: FSDP vs DeepSpeed vs Megatron in production](https://datarekha.com/blog/distributed-training-fsdp-vs-deepspeed/): For serious pretraining or fine-tuning, you pick from three: FSDP2 (PyTorch native), DeepSpeed (ZeRO stages), or Megatron-LM (NVIDIA, 3D parallel). The frontier labs have made their bets — Llama 3 went Megatron, FSDP2 is the open-source default under 70B, and DeepSpeed survives where ZeRO offload is necessary. Here's how to choose. - [Mixture of experts in production: Mixtral, DeepSeek, Llama 4](https://datarekha.com/blog/mixture-of-experts-production/): MoE went from research curiosity in 2021 to production default in 2025. The new frontier-model template is sparse, with 5-15% active parameters per token. Here's how the serving infrastructure caught up, what vLLM and SGLang actually do with experts, and the cost math that makes MoE the future. - [Quantization in production: GPTQ, AWQ, GGUF, FP8 — what to ship](https://datarekha.com/blog/quantization-in-production/): 16-bit serving is dead for most production workloads. Here's how to pick between weight-only post-training quantization, activation-aware quantization, and the FP8 native path — without measuring it wrong. - [ML platform build vs buy: a decision framework for 2026](https://datarekha.com/blog/ml-platform-build-vs-buy/): Most teams default to one of three answers — Databricks, SageMaker, or 'we'll roll our own.' All three are wrong for the wrong team. Here's how to pick by team size, model variety, and latency budget — with the war stories that explain why. - [Model monitoring in 2026: from accuracy to behavior drift](https://datarekha.com/blog/model-monitoring-2026/): Classical ML monitoring tracks accuracy decay. LLM monitoring tracks something stranger — the model itself silently changing underneath you. Here's what production observability looks like when the failure modes don't fit the dashboards you built five years ago. - [LLM recommenders: Netflix, Spotify, and the post-collaborative-filtering era](https://datarekha.com/blog/llm-recommenders/): Recommendation systems are absorbing LLMs, but almost never the way Twitter expects. Netflix and Spotify both run hybrid stacks — classical CF and content-based ranking as the workhorse, LLMs at the edges for explanation, cold start, and conversation. Pure LLM-as-recommender doesn't survive contact with YouTube-scale latency or freshness. - [Multi-hop RAG without the hallucinations](https://datarekha.com/blog/multi-hop-rag-without-hallucinations/): Single-hop RAG works until your users start asking questions that require synthesis. Naive multi-hop hallucinates intermediate facts. Here's the working architecture — explicit decomposition, iterative retrieval, self-verification — with the production examples from Harvey and Hebbia that actually ship it. - [GraphRAG: when knowledge graphs beat vector search](https://datarekha.com/blog/graphrag-when-graphs-beat-vectors/): Microsoft's GraphRAG paper showed that building a knowledge graph from documents and querying community summaries beats vector RAG on global questions. Two years on, the receipts are mixed — the technique works, but the indexing bill is what most teams remember. - [Agentic RAG: when the agent decides whether to retrieve](https://datarekha.com/blog/agentic-rag-the-agent-decides/): Naive RAG retrieves on every query. Agentic RAG turns retrieval into a tool the agent calls when the answer isn't already obvious — and the production wins are about latency and accuracy at once, not either alone. - [Long-context vs RAG: the 2026 verdict](https://datarekha.com/blog/long-context-vs-rag-2026/): Gemini's 2M-token context, GPT-5's million, Claude's 200K. The argument that long context would kill RAG turned out wrong — but for reasons more interesting than 'cost is high'. Here's where the equilibrium actually settled. - [PDF parsing remains unsolved: LlamaParse, Reducto, Unstructured, Marker](https://datarekha.com/blog/pdf-parsing-unsolved/): Two years into the production RAG era, the single biggest blocker for most enterprise deployments isn't the LLM, the vector store, or the retrieval algorithm. It's whether your PDF parser got the table right. The vendors have multiplied; the problem hasn't been solved. - [RAG evaluation in production: Ragas, Phoenix, Braintrust](https://datarekha.com/blog/rag-evaluation-in-production/): RAG evaluation is harder than LLM evaluation. Retrieval and generation fail for different reasons and need different metrics. Two years after Ragas formalized the four-metric core, the tooling has split into three camps — here's what each one actually buys you. - [Fine-tuning vs RAG: the settled debate of 2026](https://datarekha.com/blog/fine-tuning-vs-rag-2026/): Three years of Twitter brawling about whether to fine-tune or retrieve has ended in a boring, useful answer: RAG for knowledge, fine-tuning for behaviour, and both when you actually need both. Here's the decision table production teams actually use. - [KV cache management: paged attention, prefix caching, LMCache](https://datarekha.com/blog/kv-cache-management/): The KV cache is the dominant memory bottleneck in LLM serving, and three ideas — PagedAttention, prefix caching, and cross-instance LMCache — have rewired how it's managed. Here's how each layer earns its place in production. - [NVIDIA Dynamo, vLLM, SGLang: serving stacks at scale](https://datarekha.com/blog/nvidia-dynamo-vllm-sglang/): NVIDIA's Dynamo (GTC 2025) reframes LLM serving around prefill/decode disaggregation. vLLM, SGLang and TensorRT-LLM all sit underneath. Here's how the four-layer stack actually works, what the throughput numbers really mean, and who picks which. - [Inference routing: sending each query to the cheapest model that can answer it](https://datarekha.com/blog/inference-router-patterns/): By 2026 the biggest lever on inference cost isn't quantisation or batching — it's deciding which model touches each query. Four routing patterns, three rounds of vendor consolidation, and a real case study where a customer support agent cut spend 80% with no measurable quality drop. - [Serverless LLM platforms: Modal, Together AI, Fireworks, Replicate](https://datarekha.com/blog/modal-together-fireworks-serverless/): Four platforms, four different bets on what serverless inference should be. Modal is the GPU-as-Python-function. Together is the model marketplace. Fireworks is the speed obsessive. Replicate is the prosumer API. Here's who picks which, and the cost numbers behind each. - [Structured outputs engineering: JSON mode, function calling, constrained decoding](https://datarekha.com/blog/structured-outputs-engineering/): Three families of techniques get LLMs to return parseable data. One of them is a guarantee. The other two are negotiations. Here's when each one earns its keep — and the production regression that nobody warns you about. - [CrewAI vs LangGraph vs AutoGen: the ecosystem reality of 2026](https://datarekha.com/blog/crewai-vs-langgraph-vs-autogen/): Three years into the agent framework era, only two of those three names belong in the same sentence in 2026. Here's the actual usage picture — stars, downloads, who's running what in production, and where each one quietly wins. - [DSPy: declarative prompting in production](https://datarekha.com/blog/dspy-declarative-prompting-production/): Stanford's DSPy proposes 'programming, not prompting' — declare a signature, compose modules, let an optimizer write the prompt. The pitch is irresistible; the production reality is more selective. Where DSPy actually ships, and why most teams quietly keep their prompts. - [Pydantic AI: typed agents for the Python ecosystem](https://datarekha.com/blog/pydantic-ai-typed-agents/): The Pydantic team built the framework most FastAPI engineers were quietly wishing for. Schema-first, model-agnostic, async-native — the agent framework that feels like Python production code instead of a research demo. - [Inspect AI: the UK AISI's eval framework everyone copied](https://datarekha.com/blog/inspect-ai-evals-framework/): A government safety institute released an MIT-licensed eval framework in 2024. By 2026 it's the de facto standard at Anthropic, OpenAI, DeepMind, and the enterprise teams that take evals seriously. Here's why it won — and what the alternatives still get right. ## Frequently asked questions ### Python **Do I need to know math to start learning Python?** No. Python's core syntax — variables, loops, functions, lists, and dictionaries — needs nothing beyond basic arithmetic. Math only matters later for specific domains like data science, and even then the Python itself stays simple. Start with the syntax and add math when a project demands it. **What's the difference between a list and a tuple in Python?** A list is mutable (you can add, remove, or change items) and uses square brackets; a tuple is immutable (fixed once created) and uses parentheses. Use a list when the collection will change, and a tuple for fixed records or as dictionary keys, where immutability is required. **Why is my Python code slow — is the GIL to blame?** For CPU-bound work, the Global Interpreter Lock (GIL) stops threads from running Python bytecode in true parallel, so threading won't help — use multiprocessing or vectorised libraries like NumPy. For I/O-bound work the GIL is released during waits, so threads or asyncio do help. Most 'slow Python' is actually unvectorised or algorithmic, not the GIL. **When should I use a list comprehension instead of a for loop?** Use a comprehension when you're building a new list by transforming or filtering an iterable — it's more concise and usually faster. Stick with a regular for loop when the body has side effects, multiple statements, or complex logic, where a comprehension would hurt readability. **What's the difference between == and is in Python?** `==` checks whether two values are equal; `is` checks whether two names point to the exact same object in memory. Use `==` for value comparison (the common case) and reserve `is` for identity checks like `x is None`. ### NumPy **Why use NumPy instead of plain Python lists?** NumPy stores data in contiguous, typed arrays and runs operations in optimised C, so element-wise math on large arrays is often 10–100× faster than Python loops and uses far less memory. It's the foundation Pandas, scikit-learn, and PyTorch are built on. **What is broadcasting in NumPy?** Broadcasting is how NumPy applies an operation between arrays of different shapes without copying data — it virtually stretches the smaller array to match the larger one. For example, subtracting a 1D row of column means from a 2D matrix works per-column without a loop, as long as the trailing dimensions are compatible. **What does the axis argument mean in NumPy?** `axis` names the dimension the operation collapses along. For a 2D array, `axis=0` reduces down the rows (one result per column) and `axis=1` reduces across the columns (one result per row). The common mistake is reading 'axis=0' as 'rows' when it actually aggregates over them. **What's the difference between a NumPy view and a copy?** Basic slicing returns a view — a window into the same memory — so changing the slice changes the original array. Fancy indexing (with a list or boolean mask) returns a copy. Call `.copy()` when you need an independent array to avoid surprising in-place mutations. **Should I ever use a Python loop over a NumPy array?** Rarely. Prefer vectorised operations, broadcasting, and built-in functions, which run in C and are far faster. Reach for a loop only when the logic genuinely can't be vectorised, and even then consider tools like Numba. ### Pandas **What's the difference between loc and iloc in Pandas?** `loc` selects by label (index and column names); `iloc` selects by integer position. Use `loc` when you know the row index or column name, and `iloc` when you want the Nth row or column regardless of its label. **How do I avoid the SettingWithCopyWarning?** That warning means you may be assigning to a copy of a slice, so the change might not stick. Do the selection and assignment in a single `.loc` call — e.g. `df.loc[df.x > 0, 'y'] = 1` — or take an explicit `.copy()` first if you intend to work on a separate frame. **When should I use apply versus a vectorised operation?** Prefer vectorised operations and built-in methods — they run in optimised C and are far faster than `apply`, which loops in Python. Use `apply` only for genuinely custom row/column logic that can't be expressed with vectorised functions. **What's the difference between merge, join, and concat?** `merge` (and the similar `join`) combine frames by matching key columns, like a SQL join. `concat` stacks frames along an axis — rows on top of each other or columns side by side — without matching keys. Use merge for relational joins and concat for appending or aligning by index. **Why did my groupby explode the number of rows?** That usually happens when you merge before aggregating — a one-to-many join multiplies rows, and a later sum double-counts. Aggregate to the right grain first, or confirm your join keys are unique, before combining tables. ### Storytelling with Visualisation **When should I use Matplotlib versus Seaborn?** Seaborn is built on Matplotlib and is faster for common statistical charts (distributions, categories, correlations) with attractive defaults. Drop to Matplotlib when you need fine-grained control over a custom figure. In practice you plot with Seaborn and tweak with Matplotlib. **What's the difference between a figure and axes in Matplotlib?** The figure is the whole canvas; axes are the individual plot areas inside it, each with its own x/y coordinates. One figure can hold many axes (subplots). Understanding this split is the key to building multi-panel charts cleanly. **Which chart should I use for my data?** Match the chart to the question: line for trends over time, bar for comparing categories, scatter for relationships between two numeric variables, histogram for one variable's distribution, and box or violin for comparing distributions across groups. Avoid pie charts beyond a few categories. **How do I make charts that work in both light and dark mode?** Avoid hard-coded colors; use a palette tied to your theme and keep sufficient contrast against either background. Test the figure on both backgrounds, and choose colors that stay distinguishable for color-blind readers. **Why does my plot look cramped or get cut off when saved?** Labels often overflow the default bounding box. Call `plt.tight_layout()` (or save with `bbox_inches='tight'`) to fit everything, and set an explicit figure size for the medium you're targeting. ### Business Analytics **What's the difference between revenue, profit, and margin?** Revenue is total money from sales; profit is what's left after costs; margin is profit as a percentage of revenue. A business can have high revenue and still lose money if costs exceed it — which is why margin, not revenue, tells you whether the model actually works. **What are CAC and LTV, and why do they matter together?** CAC (Customer Acquisition Cost) is what you spend to win a customer; LTV (Lifetime Value) is the total profit that customer brings. The business is healthy when LTV comfortably exceeds CAC — a common benchmark is roughly 3:1 — otherwise you lose money on every customer you acquire. **What is a break-even analysis?** Break-even is the point where total revenue equals total cost, so profit is zero. It tells you how many units you must sell, or what price you must charge, to cover fixed and variable costs before you start making money — essential for pricing and go/no-go decisions. **What is RFM segmentation?** RFM scores customers on Recency (how recently they bought), Frequency (how often), and Monetary value (how much) to group them into actionable segments like loyal, at-risk, or new. It's a simple, powerful way to target retention and marketing without a complex model. **Why can the average customer be misleading?** Averages hide skew. If a few large customers dominate, the mean misrepresents the typical one, and decisions based on it misfire. Look at the median and the full distribution — segments and percentiles usually tell a truer story than a single average. ### SQL **What's the difference between WHERE and HAVING?** `WHERE` filters individual rows before grouping; `HAVING` filters groups after `GROUP BY` has aggregated them. Use `WHERE` for row conditions and `HAVING` for conditions on aggregates like `COUNT(*) > 5`. **When should I use a window function instead of GROUP BY?** Use a window function when you need an aggregate alongside the original rows — a running total, a rank within each group, or each row's share of its group's total — without collapsing the rows. `GROUP BY` is for when you only want one summary row per group. **What's the difference between an INNER JOIN and a LEFT JOIN?** An INNER JOIN keeps only rows that match in both tables; a LEFT JOIN keeps every row from the left table and fills NULLs where the right has no match. Use LEFT JOIN when you want to keep all records from your primary table even when related data is missing. **Why is my SQL query slow?** Usually it's missing indexes on join or filter columns, functions wrapped around indexed columns (which disable the index), or returning far more rows than needed. Read the query plan with EXPLAIN, index the columns you filter and join on, and avoid `SELECT *` on wide tables. **What is a CTE and when should I use one?** A CTE (Common Table Expression, the `WITH` clause) names a subquery so you can reference it like a temporary table. Use it to break a complex query into readable steps, or recursively to walk hierarchies like org charts. It mainly improves readability. ### PySpark **When do I actually need Spark instead of Pandas?** Reach for Spark when your data is too large for one machine's memory or you need a cluster to process it in parallel — typically tens of gigabytes and up. For data that fits comfortably in RAM, Pandas (or Polars) is simpler and faster; Spark's distributed overhead only pays off at scale. **What does lazy evaluation mean in Spark?** Spark doesn't run transformations as you write them — it builds a plan and only executes when an action (like `count`, `collect`, or `write`) is called. This lets its Catalyst optimiser reorder and combine steps, but it also means errors can surface only at the action. **What's the difference between a transformation and an action in Spark?** Transformations (`select`, `filter`, `join`, `groupBy`) describe what to compute and return a new DataFrame lazily; actions (`count`, `show`, `collect`, `write`) trigger execution and return results. Nothing runs until an action is called. **Why is my Spark job slow or running out of memory?** The usual cause is data skew or wide shuffles — joins and groupBy operations that move data across the cluster. Check for skewed keys, avoid `collect()` on large data, cache reused DataFrames, and let Adaptive Query Execution (AQE) tune partitions. **What's the difference between the Spark driver and executors?** The driver runs your program and builds the execution plan; executors are the worker processes across the cluster that run tasks on partitions of the data. Pulling too much data back to the driver (e.g. `collect()`) is a common source of out-of-memory errors. ### Math for ML **How much math do I really need for machine learning?** Enough to reason, not to derive everything from scratch: linear algebra (vectors, matrices, dot products), the basics of calculus (gradients and the chain rule), and probability and statistics (distributions, expectation, Bayes). You can start applying models with less and deepen the math as you go. **Why is linear algebra so important for ML?** Data is represented as vectors and matrices, and nearly every model — from linear regression to neural networks — is built on matrix multiplication. Linear algebra is the language that makes these operations fast and lets you reason about transformations, projections, and dimensionality. **What is a gradient, intuitively?** A gradient is the vector of partial derivatives that points in the direction of steepest increase of a function. Training follows the negative gradient downhill to reduce the loss — that's gradient descent — and the gradient's size tells you how steep the slope is at the current point. **What's the difference between probability and statistics?** Probability reasons forward — given a known model, how likely is an outcome. Statistics reasons backward — given observed data, what model or parameters likely produced it. ML uses both: probability to define models, statistics to fit and evaluate them. **What is Bayes' theorem used for?** Bayes' theorem updates a prior belief into a posterior after seeing evidence, by weighing how likely the evidence is under each hypothesis. It underpins spam filters and medical-test interpretation, and it explains why a positive result on a rare-condition test can still mean low actual risk. ### Machine Learning **Do neural networks always beat traditional ML?** No. On most tabular data, gradient-boosted trees (XGBoost, LightGBM, CatBoost) match or beat neural networks with less tuning and far less data. Deep learning dominates for images, text, and audio, but for structured business data, classical models are usually the stronger and simpler choice. **What's the difference between training, validation, and test sets?** You fit the model on the training set, tune hyperparameters on the validation set, and report final performance once on the untouched test set. Keeping the test set truly held out is what makes your reported accuracy honest rather than optimistic. **Why is my model 99% accurate but useless?** Accuracy is misleading on imbalanced data — a model that always predicts the majority class can score 99% while catching none of the rare cases that matter. Use metrics suited to the problem, like precision, recall, F1, or AUC, and read the confusion matrix. **What is data leakage and why is it dangerous?** Data leakage is when information unavailable at prediction time sneaks into training — like scaling using the whole dataset before splitting, or a feature derived from the target. It produces great validation scores that collapse in production, making it one of the most costly silent bugs in ML. **When should I use XGBoost versus a random forest?** Random forests are robust and need little tuning, so they make a strong baseline. Gradient boosting (XGBoost and friends) usually reaches higher accuracy but is more sensitive to hyperparameters and overfitting. Start with a random forest, then try boosting to squeeze out more performance. ### Deep Learning **What does PyTorch's autograd actually do?** Autograd records the operations in your forward pass as a graph, then automatically computes gradients of the loss with respect to every parameter by applying the chain rule backward. That's what lets you train with `loss.backward()` without deriving gradients by hand. **Why do neural networks need activation functions?** Without a non-linear activation, stacking layers just composes linear functions, which collapses to a single linear model no matter how deep. Activations like ReLU add non-linearity, letting the network approximate complex, curved decision boundaries. **What's the difference between SGD, Adam, and AdamW?** SGD updates weights using the raw gradient (optionally with momentum). Adam adapts the step size per parameter using running estimates of the gradient and its variance, often training faster. AdamW fixes how Adam handles weight decay for better regularisation, and is the common default for transformers. **What loss function should I use?** Use cross-entropy for classification — it heavily penalises confident wrong predictions — and mean squared error (or a robust variant like Huber) for regression. The loss must match the output layer, for example softmax outputs paired with cross-entropy. **What is a transformer and why did it change everything?** A transformer is an architecture built on self-attention, which lets every token directly weigh every other token regardless of distance, and processes a whole sequence in parallel rather than step by step like an RNN. That parallelism and long-range modeling are what made modern large language models possible. ### MLOps **What is MLOps, in one sentence?** MLOps is the practice of reliably deploying, monitoring, and maintaining machine-learning models in production — applying DevOps discipline (version control, CI/CD, automation, monitoring) to the messier reality of data and models that drift over time. **Why do models that work in a notebook fail in production?** Common causes are training/serving skew (production data or preprocessing differs from training), data drift over time, environment and dependency differences, and no monitoring to catch the decline. Reproducible pipelines and Docker containers close most of these gaps. **What is model drift and how do I detect it?** Drift is when the live data (data drift) or the input–target relationship (concept drift) changes from what the model trained on, quietly degrading accuracy. Detect it by monitoring input distributions and prediction quality over time, and retrain or alert when they shift beyond a threshold. **Why use Docker for machine learning?** Docker packages your code, libraries, and system dependencies into one image that runs identically on your laptop, in CI, and in production. That eliminates 'it works on my machine' failures, which are especially common in ML because of heavy, version-sensitive dependencies. **What does MLflow do?** MLflow tracks experiments — logging parameters, metrics, and artifacts so you can compare runs — and provides a model registry to version and stage models for deployment. It's the system of record that keeps ML work reproducible instead of scattered across notebooks. ### Generative AI **What actually is a large language model?** An LLM is a neural network (a transformer) trained to predict the next token in text. From that single objective, at scale, it learns grammar, facts, reasoning patterns, and style, then generates by predicting one token at a time. It doesn't look things up — it produces statistically likely continuations. **What is RAG and why use it?** RAG (Retrieval-Augmented Generation) retrieves relevant documents and feeds them into the model's context so it answers from your data instead of only its training. It reduces hallucination, lets you use private or up-to-date information, and avoids the cost of retraining the model. **What do temperature, top-k, and top-p control?** They control randomness in generation. Temperature scales how sharply the model favors high-probability tokens — low is focused and near-deterministic, high is creative and riskier. Top-k and top-p (nucleus) limit sampling to the most likely tokens. Use low temperature for factual tasks, higher for brainstorming. **Why does an LLM hallucinate, and how do I reduce it?** Because it generates plausible continuations rather than retrieving facts, it can state confident falsehoods, especially outside its training data. Reduce it by grounding answers with RAG, asking for citations, lowering temperature, and constraining the task — but you can't eliminate it, so verify critical outputs. **What's the difference between fine-tuning and RAG?** Fine-tuning adjusts the model's weights to change its style or specialise its behavior; RAG leaves the model unchanged and supplies knowledge at query time. Use RAG for facts that change or are private, and fine-tuning for consistent format, tone, or task behavior — they're often combined. ### Agentic AI **What makes an AI agent different from a chatbot?** An agent doesn't just answer — it plans and acts in a loop: it calls tools, observes the results, and decides the next step until a goal is met. A chatbot produces one reply; an agent can search, run code, query a database, and chain those steps autonomously. **What is the Model Context Protocol (MCP)?** MCP is an open standard for connecting AI models to tools and data sources through a uniform interface, so any MCP-compatible client can use any MCP server. It acts like a universal adapter that replaces bespoke, per-integration glue code for agent tooling. **What's the difference between LangChain and LangGraph?** LangChain offers building blocks and chains for composing LLM apps; LangGraph models an agent as an explicit graph of nodes and edges with shared state, which makes loops, branching, retries, and human-in-the-loop control far easier to reason about. Use LangGraph when the control flow gets complex. **Why do multi-agent systems often fail?** Common failure modes are agents losing shared context, compounding each other's errors over long chains, looping without progress, and ballooning cost and latency. Reliability usually comes from constraining each agent's scope, adding verification steps, and keeping the control flow explicit rather than fully open-ended. **What are the main agent design patterns?** The core patterns are reflection (the model critiques and revises its own output), tool use (calling external functions), planning (decomposing a goal into steps), and multi-agent collaboration (specialised agents working together). Most production agents combine a few of these. ### Data Structures & Algorithms **How much DSA do I need for data science and ML?** The practical core: Big-O intuition to reason about cost, hash maps and sets for fast lookups and dedup, sorting and binary search, and a feel for when an O(n²) approach won't scale. You rarely implement exotic algorithms, but understanding complexity is what keeps data pipelines fast. **What is Big-O notation, simply?** Big-O describes how an algorithm's time or memory grows as the input grows, ignoring constants. O(n) doubles when the input doubles; O(n²) quadruples; O(log n) barely grows. It's the tool for predicting whether code will still be fast at 10× or 1000× the data. **When should I use a hash table?** Use a hash table (dict or set in Python) whenever you need fast lookups, membership tests, counting, or deduplication — it offers average O(1) access. It's the workhorse behind grouping, joins, and 'have I seen this before' checks across data work. **What's the difference between O(n log n) and O(n²)?** O(n log n) is the speed of good sorting algorithms and scales to millions of items; O(n²) compares every pair and becomes painfully slow past a few thousand. Turning a nested-loop O(n²) approach into a sort- or hash-based one is one of the highest-leverage optimisations. **What are Bloom filters and HyperLogLog used for?** They're probabilistic structures that trade a little accuracy for huge memory savings at scale. A Bloom filter answers 'have I probably seen this?' without storing every item; HyperLogLog estimates the count of distinct items in a stream using tiny memory. Both power real-world dedup and analytics. ### GATE DA **What is the GATE DA exam?** GATE DA (Data Science and Artificial Intelligence) is an Indian graduate-entrance exam, introduced in 2024, covering probability and statistics, linear algebra, calculus, programming and data structures, databases, machine learning, and AI. It tests conceptual understanding and problem-solving rather than rote memorisation. **What subjects does GATE DA cover?** The syllabus spans probability and statistics, linear algebra, calculus and optimization, programming and data structures, algorithms, database management, data warehousing, machine learning, and AI (search, logic, reasoning), plus the common General Aptitude section. Probability, linear algebra, and ML carry significant weight. **How should I prepare for GATE DA?** Build concepts first, then drill previous-year-style problems under timed conditions, and review with spaced retrieval so material sticks. Prioritise high-weight topics like probability, linear algebra, and ML, and practice General Aptitude, which is high-return for the time invested. **How is GATE DA different from a typical ML course?** GATE DA is exam-oriented — it rewards precise definitions, derivations, and fast, accurate problem-solving against the official syllabus, where an ML course is project-oriented. The concepts overlap heavily, but the exam demands speed and rigor on paper rather than building systems. **How accurate should my study answers be?** Always verify solutions against official answer keys and primary sources, since small differences in convention or rounding can change a multiple-choice answer. Reputable preparation material checks every previous-year answer against the official key for exactly this reason. ### Git **What is the difference between Git and GitHub?** Git is the version-control tool that runs on your computer and tracks changes to your files; GitHub is a website that hosts Git repositories online for sharing and collaboration. You can use Git entirely offline, while GitHub (like GitLab or Bitbucket) adds remote backup, pull requests, and team workflows on top. **What is the difference between git merge and git rebase?** Merge combines two branches by creating a new merge commit that ties their histories together and preserves exactly what happened; rebase instead replays your commits on top of the target branch, giving a clean linear history but rewriting those commits with new IDs. Use merge to preserve true history on shared branches, and rebase only to tidy a local branch before sharing — never rebase commits others have already pulled. **How do I undo the last Git commit?** Use git reset to move your branch back: git reset --soft HEAD~1 undoes the commit but keeps your changes staged, while git reset --hard HEAD~1 discards the changes entirely. If the commit was already pushed and shared, use git revert instead, which adds a new commit that reverses it without rewriting history. **What does the staging area do in Git?** The staging area (also called the index) is where you assemble exactly which changes go into your next commit. You edit files in your working directory, run git add to stage the specific changes you want, then git commit to snapshot them — this two-step flow lets you craft focused, meaningful commits instead of dumping every change at once. ### Command Line **What is the difference between the terminal, the shell, and bash?** The terminal is the application window that shows text, the shell is the program running inside it that reads your commands and executes them, and bash and zsh are specific shells (zsh is the macOS default). In short, the terminal is the screen, the shell is the interpreter, and bash or zsh are particular brands of that interpreter. **What is the difference between grep and find?** grep searches inside files for lines matching a text pattern, while find locates the files themselves by name, size, type, or modification time. Use grep to answer 'which files contain this text?' and find to answer 'where are the files with these properties?' — and they are often combined in one pipeline. **What is the difference between a single and double redirect in the shell?** A single greater-than sign redirects a command's output to a file and overwrites whatever was there, while a double greater-than sign appends the output to the end of the file instead. Use append when adding to a log you want to keep, and overwrite only when you intend to replace the file's contents. **How do I make a shell script executable?** Add a shebang line such as #!/usr/bin/env bash at the top, run chmod +x on the file to give it execute permission, then run it with ./script.sh. The shebang tells the system which interpreter to use, and the execute bit is what lets you run the file directly. ### Time Series **Why can't I use a normal train/test split for time series?** Because time series observations are ordered and correlated with their own past, so randomly shuffling them leaks future information into training and inflates your scores. Always split by time — train on earlier data and test on later data — and validate with walk-forward backtesting rather than random k-fold cross-validation. **What is the difference between ARIMA and SARIMA?** ARIMA models trend and short-term structure through autoregression, differencing, and moving-average terms but assumes no repeating seasonal pattern; SARIMA adds a seasonal set of those same terms at the season's period (for example every 12 months) to capture cycles ARIMA misses. Use SARIMA when your data has a clear, fixed-length seasonal pattern. **What does it mean for a time series to be stationary?** A stationary series has statistical properties — its mean, variance, and autocorrelation — that stay constant over time, which is exactly what models like ARIMA assume. You check it with a plot plus the Augmented Dickey-Fuller test, and usually achieve it by differencing the series to remove trend and seasonality. **When should I use Prophet instead of ARIMA?** Reach for Prophet when you want strong seasonality, holiday effects, and robustness to missing data and outliers with minimal tuning, since it is designed for business forecasting by analysts. Prefer ARIMA or SARIMA when you want a well-understood statistical model and are willing to identify orders from the ACF and PACF — and check either one against a naive baseline. ### Recommender Systems **What is the difference between content-based and collaborative filtering?** Content-based filtering recommends items similar to what you already liked using item features such as genre, tags, or text, while collaborative filtering uses the behavior of many users — 'people like you also liked' — without needing item features. Content-based handles brand-new items well, collaborative filtering captures taste patterns features can't, and hybrid systems combine both. **What is the cold-start problem in recommender systems?** Cold start is when you can't make good recommendations because there is no interaction history yet — for a new user, a new item, or a brand-new system. The fixes are content-based filtering and metadata for new items, onboarding preferences and popularity fallbacks for new users, and deliberate exploration to gather data. **What is matrix factorization in recommender systems?** Matrix factorization approximates the sparse user-item rating matrix as the product of two smaller matrices of latent factors, one for users and one for items, so a predicted rating is the dot product of a user vector and an item vector. These learned factors capture hidden taste dimensions and powered the Netflix Prize-winning approaches. **Why is RMSE a poor metric for recommender systems?** Because recommendation is a ranking problem — users only ever see the top few items — so a rating-prediction error like RMSE doesn't measure whether the right items reached the top. Use top-k ranking metrics such as precision@k, recall@k, and NDCG, and always compare against a simple popularity baseline. Full FAQ: https://datarekha.com/faq/