Artificial Intelligence
Notes, architectures and code for building AI systems: LLM engineering, retrieval-augmented generation, search and retrieval, machine learning and neural networks, document ingestion, and cloud AI services.
Overview
190 pages in 10 groups, organized by what you are doing rather than by folder. Start with Build with LLMs for agents, tool calling and serving, or Retrieval & RAG for grounding a model in your own documents. The home page has the same material as a subject map.
Build with LLMs (37)
Everything that sits on top of a model you did not train: agent loops, tool calling, orchestration, serving and the operational side.
Retrieval & RAG (8)
Getting the right context in front of the model — classical ranking, embeddings, hybrid search, and the end-to-end RAG pipeline.
Machine Learning (100)
Classical ML end to end: supervised and unsupervised learning, ensembles, reinforcement learning, forecasting, recommenders and the frameworks.
Deep Learning (0)
Neural architectures from the perceptron up: MLPs, CNNs, RNNs and LSTMs, and graph neural networks.
Transformers & Generative Models (0)
Attention and the three transformer families, embedding models, and the generative families: autoencoders, GANs, diffusion and autoregressive models.
Language & Vision (15)
Natural language processing tasks from tokenization to speech, and computer vision from classification to vision-language models.
Classical AI & Robotics (16)
Search and planning, knowledge representation and reasoning, evolutionary computation, and robotics.
Document Ingestion (0)
Turning the messy inputs — PDFs, Word files, scans — into something a pipeline can index.
Platforms & Hardware (12)
Where the work runs: managed AI services, the model hub, and the GPU setup underneath it all.
Shipped Work (2)
An end-to-end architecture write-up of a production system, rather than a pattern in isolation.
Build with LLMs (37)
Everything that sits on top of a model you did not train: agent loops, tool calling, orchestration, serving and the operational side.
- LLM Engineering — Production patterns for building LLM-backed systems in 2026 — agents that actually work, structured output that actually parses, retrieval that actually…
- Prompt Engineering — Practical prompt engineering: prompt structure, few-shot, chain-of-thought, structured output, prompt injection defence, and evaluation-driven iteration.
- How to Set Up Ollama for Agent Zero — This guide explains how to correctly set up Ollama as the language model backend for Agent Zero (Agent 0) . It assumes Agent Zero is already running (Docker…
- AI Engineer vs ML Engineer — The titles overlap, but in 2026 the two roles solve different problems with different tools. ML Engineers build and ship models. AI Engineers build systems…
- Agents & Tool Use — Agent loops, the Model Context Protocol, function calling with structured output, and orchestration frameworks.
- LLM Agents and the Model Context Protocol (MCP) — An "agent" in 2026 is just a loop: the model proposes a tool call, your code executes it, you feed the result back, repeat until the model…
- Function Calling and Structured Output — Most production LLM bugs are not "the model is dumb" — they're "the model returned when downstream code expected a number."…
- LangGraph and DSPy — Two ways to build LLM apps in 2026 beyond linear LangChain chains: LangGraph , which models your app as a stateful graph with conditional edges and…
- Fine-Tuning LLMs — Fine-tuning large language models: instruction tuning, RLHF and DPO, LoRA and QLoRA, distillation, and when to fine-tune versus prompt or use RAG.
- Instruction Tuning and SFT — Instruction tuning and supervised fine-tuning (SFT) of LLMs: data format, loss masking, LoRA, hyperparameters, evaluation, and a runnable TRL example.
- Knowledge Distillation — Knowledge distillation: teacher-student training, temperature and soft targets, feature and sequence-level variants, PyTorch example and pitfalls.
- LoRA and QLoRA — LoRA and QLoRA explained: low-rank adapters, the math, 4-bit NF4 quantization, paged optimizers, a Hugging Face PEFT example and common mistakes.
- LLMs in Production — Running LLM systems: LLMOps, self-hosted serving and quantization, and choosing between frontier models.
- Frontier Model Comparison (2026) — Picking a model in 2026 is no longer a single decision — it is a routing decision. Most production systems use two or three models: a small fast one for…
- LLM Evaluation — How to evaluate LLM applications: benchmarks, task-specific eval sets, LLM-as-judge, human evaluation, regression suites in CI, and a runnable harness.
- LLMOps and Production — LLMOps is the operational discipline of running LLM-backed systems the same way you run any other production software: versioned, tested, observable…
- vLLM and Quantization — Self-hosting open-weights LLMs in 2026 is a different problem than it was in 2023. Llama 3.x and Qwen 2.x match or beat hosted GPT-3.5-class models on most…
- Retrieval-Augmented Generation (RAG) Architecture — Text Embeddings - Cosine Similarity Calculation Document Ingestion Techniques for Machine Learning RAG (Retrieval-Augmented Generation) Various techniques…
- How Vector Embeddings Work in RAG — The embedding model learned from billions of text examples to place semantically similar text at nearby positions in 768-dimensional space. So…
- RAG from Scratch — This page walks through building a Retrieval-Augmented Generation (RAG) pipeline in Python from first principles. We cover chunking, embeddings, vector…
- Document Ingestion Techniques for Machine Learning RAG(Retrieval-Augmented Generation) — Various techniques for ingesting documents into a Retrieval-Augmented Generation (RAG) system. RAG combines the strengths of pre-trained language models…
- Ms Word Document Processing — Creates a reusable function process_word_document() that handles Word document processing Provides informative console output about the document structure
- PDF to Text Conversion Script — Make sure you have installed the required dependencies mentioned above.
- Split PDF Script — This script allows you to split a PDF file into a specified number of parts. It takes an input PDF file and the desired number of parts, calculates the page…
- Python Syntax Highlighting — How Prism.js syntax highlighting works on this site: sample Python, SQL, Bash and Go blocks, tokenizer flow, markup rules and common pitfalls.
- Stable Diffusion Web UI — Install and run AUTOMATIC1111 Stable Diffusion Web UI locally: setup steps, how diffusion generation works, key settings, launch flags and troubleshooting.
- Streamlit App — A minimal Streamlit app with text input, slider, and line chart: how Streamlit reruns scripts, the code explained, how to run it, and common pitfalls.
- Retrieval for LLMs — Getting the right context to the model: hybrid search with reranking, and evaluating RAG pipelines.
- Hybrid Search and Reranking — Pure dense (vector) retrieval is the default in most RAG tutorials and the wrong default in most real systems. The moment your corpus contains identifiers…
- RAG Evaluation with RAGAS — RAG systems fail in interesting ways: the retriever returns the wrong chunks, the model ignores the chunks it did get, the model invents citations, the…
- AI Systems Design — Staff-level system design walk-throughs for AI/ML systems. Each page is an end-to-end design exercise — the kind asked in a Staff or Principal Engineer…
- Agent Orchestration: 1,000 Concurrent Workflows, Checkpointing, HITL, Cost Limits — The brief: build a multi-agent orchestration platform that runs 1,000 concurrent agentic workflows with deterministic checkpointing (any node can resume any…
- LLM Eval Platform: 50 Teams, Offline Suites + Online A/B + Regression Detection — The brief: build an evaluation platform for LLM applications that supports offline eval suites (gated against curated datasets), online A/B testing…
- Self-Hosted LLM Inference Service: Llama 3.3 70B at 200 Concurrent, p95 < 4s — The brief: build a self-hosted inference service that serves Llama 3.3 70B to 200 concurrent requests with end-to-end p95 < 4 seconds for a typical…
- Large-Scale RAG: 10M Documents, 100k Users, p95 < 2s — The brief is concrete: build a retrieval-augmented generation service that indexes 10 million documents , serves 100,000 monthly active users , and returns…
- Multi-Tenant LLM Platform: BYO-Data, BYO-Model, Per-Tenant Cost — The brief: build a SaaS platform where each customer can bring their own data , choose their model provider (Bedrock, Azure OpenAI, or self-hosted vLLM), and…
- Real-Time Embedding Pipeline: 1M Docs/Day, Sub-Minute Freshness — The brief: build a pipeline that re-embeds 1 million documents per day with sub-minute freshness from source-of-truth update to vector index. Source is a…
Retrieval & RAG (8)
Getting the right context in front of the model — classical ranking, embeddings, hybrid search, and the end-to-end RAG pipeline.
- Search & Retrieval — The retrieval half of RAG: classical ranking models, indexing strategies for unstructured data, and the readability measures used to judge what comes back.
- BM25 Probabilistic Information Retrieval Model — BM25 (Best Matching 25) is a ranking function used by search engines to rank documents based on their relevance to a given query. It is one of the most…
- Gunning Fog Index — Gunning Fog Index The Gunning Fog Index is a readability test that estimates the years of formal education needed to understand a text on the first reading…
- Retrieval-Augmented Generation (RAG) Workflow — User Prompt The system receives a user query or prompt as input. Embedding Generation The user prompt is tokenized and transformed into a vector…
- Building a High-Performance RAG Solution with Pgvectorscale and Python — RAG enhances the response generation process by retrieving relevant documents from an external knowledge base (e.g., a vector database) and using these…
- TF-IDF — TF-IDF Value Breakdown Higher TF-IDF values: The higher the TF-IDF score for a term in a document, the more relevant or important that term is to that…
- Unstructured Data Indexing — This process results in a structured, indexed data store that enables efficient search, retrieval, and analysis of previously unstructured information. By…
- Python Whoosh — Whoosh is a pure-Python full-text search library. Build a BM25F inverted index, define schemas and analyzers, and query it from Python for RAG retrieval.
Machine Learning (100)
Classical ML end to end: supervised and unsupervised learning, ensembles, reinforcement learning, forecasting, recommenders and the frameworks.
- Machine Learning — Machine learning reference: supervised, unsupervised, reinforcement and self-supervised learning, forecasting, recommenders and frameworks.
- Recommender Systems — Recommender systems: collaborative and content-based filtering, matrix factorization, two-tower retrieval, retrieve-rank pipelines, NDCG, cold start.
- Semi- / Self-Supervised Learning — Semi-supervised learning uses few labels plus unlabeled data; self-supervised learning invents its own targets. Pseudo-labeling, FixMatch, SimCLR, MAE.
- Big O Notation - Time Complexity — Big O notation is used to describe the efficiency of an algorithm, focusing on its time complexity (how the execution time grows with input size) and space…
- Time-Series Forecasting — Time-series forecasting: trend, seasonality, stationarity, ARIMA and ETS, gradient boosting on lag features, walk-forward validation, and MASE.
- Neural Network Overview — A neural network is a computational model made of many simple processing units called neurons . These neurons are organized into layers and connected by…
- Multimodal Models — Multimodal models explained: encoding images, audio and text, early vs late vs cross-attention fusion, CLIP, LLaVA-style VLMs, with a CLIP example.
- Neural Network Sentiment — Common Interview Questions: What does an embedding layer actually do? An embedding layer is a lookup table that maps integer token IDs to dense vectors of a…
- Convolutional Neural Networks (CNN) — Convolutional neural networks: convolution, pooling, receptive fields, the standard CNN pipeline, a PyTorch CIFAR-10 example, and CNN vs ViT trade-offs.
- ResNet / EfficientNet — ResNet residual blocks and EfficientNet MBConv and compound scaling, with PyTorch transfer-learning code and guidance on choosing a CNN backbone.
- YOLO (Object Detection) — YOLO single-stage object detection: grid formulation, backbone-neck-head, losses, IoU and NMS, mAP, and an Ultralytics Python example.
- Feedforward Networks — The simplest neural networks: the single-layer perceptron and the multi-layer perceptron that every deeper architecture builds on.
- Multi-Layer Perceptron (MLP) — Multi-layer perceptrons: fully connected feedforward networks, forward pass, backpropagation, activations, initialization, and a PyTorch example.
- The Perceptron — The perceptron, the original single-neuron linear classifier: model, learning rule, convergence theorem, Python implementation, the XOR limitation,…
- Deep Learning Fundamentals — Deep learning fundamentals: the training loop, activation functions, losses, optimizers, initialisation and regularisation, and how they fit together.
- Activation Functions — Activation functions explained: sigmoid, tanh, ReLU family, GELU, SiLU and softmax, their derivatives, vanishing gradients, and PyTorch examples.
- Backpropagation — Backpropagation explained: the chain rule on computational graphs, a fully worked numeric example, gradient checking, and autograd in NumPy and PyTorch.
- Normalization and Dropout — Batch norm, layer norm, RMSNorm and dropout explained: formulas, train vs eval behaviour, placement in CNNs and transformers, PyTorch code.
- Optimizers — Neural network optimizers explained: SGD, momentum, Nesterov, AdaGrad, RMSProp, Adam and AdamW, plus warmup and cosine learning-rate schedules in PyTorch.
- Generative Models — Overview of deep generative models: autoencoders and VAEs, GANs, diffusion models, and autoregressive Transformers, compared side by side.
- Autoregressive Models (GPT-style) — Autoregressive generative models: chain-rule factorization, decoder-only transformers with causal masks, a tiny GPT in PyTorch, KV cache and sampling…
- Autoencoders — Autoencoders explained: encoder, bottleneck and decoder, denoising/sparse/VQ variants, a PyTorch convolutional example, and anomaly detection.
- Variational Autoencoders (VAE) — Variational Autoencoders: probabilistic encoder, reparameterization trick, ELBO and KL term, smooth latent spaces, PyTorch code, and posterior collapse.
- Diffusion Models — How diffusion models generate images by learning to reverse a noising process: DDPM math, PyTorch code, latent diffusion, classifier-free guidance and samplers.
- DALL-E: OpenAI Text-to-Image Models — DALL-E 1, 2 and 3 explained: discrete-token transformer, unCLIP prior plus diffusion decoder, recaptioned training data, and calling the OpenAI images API.
- Midjourney — Midjourney text-to-image service: grid-upscale-vary workflow, prompt and parameter anatomy, what is known about the model, automation options and trade-offs.
- Generative Adversarial Networks (GAN) — How GANs train a generator against a discriminator: minimax objective, instability and fixes, a PyTorch example, and variants such as DCGAN, StyleGAN…
- CycleGAN: Unpaired Image-to-Image Translation — CycleGAN for unpaired image translation: two generators, cycle and identity losses, PatchGAN, training walkthrough, alternatives, evaluation and limits.
- DCGAN: Deep Convolutional GAN — DCGAN guidelines for convolutional GANs: generator and discriminator design, training objective, tensor shapes, diagnosing training, and PyTorch code.
- StyleGAN: Style-Based Generator — StyleGAN explained: mapping network, modulation, style mixing, truncation, R1 and ADA training, real-image editing, evaluation, and PyTorch usage.
- Graph Neural Networks (GNN) — Graph neural networks: graph data, message passing, node/edge/graph tasks, GCN/GAT/GraphSAGE/GIN layers, PyTorch Geometric code, and over-smoothing.
- Graph Attention Networks (GAT) — Graph Attention Networks: learned per-edge attention, multi-head aggregation, GATv2 dynamic attention, PyTorch code, and the link to Transformers.
- Graph Convolutional Networks (GCN) — Graph Convolutional Networks: the normalized-adjacency propagation rule, spectral origins, the two-layer model, from-scratch PyTorch code, and over-smoothing.
- Recurrent Neural Networks (RNN) — Recurrent neural networks: unrolling, sequence task shapes, backpropagation through time, the RNN/LSTM/GRU family, PyTorch code, and RNNs vs Transformers.
- GRU (Gated Recurrent Unit) — The Gated Recurrent Unit: update and reset gates, why gating fixes vanishing gradients, GRU vs LSTM, and a from-scratch PyTorch GRU cell.
- Vanilla RNN — The vanilla (Elman) RNN: cell equations, NumPy forward pass, backpropagation through time, vanishing and exploding gradients, and a PyTorch char model.
- LSTM — Long short-term memory networks — the recurrent architecture that made sequence learning practical before attention took over.
- Bidirectional LSTM — Bidirectional LSTMs: forward and backward passes, merging directions, BiLSTM-CRF tagging, PyTorch code, and when bidirectionality leaks the future.
- LSTM Networks — LSTM stands for Long Short-Term Memory . It is a type of Recurrent Neural Network (RNN) , which places it firmly within the field of deep learning — a subset…
- Stacked LSTM — Stacked (deep) LSTMs: layer-over-layer architecture, shapes, choosing depth, residual connections and inter-layer dropout, with PyTorch and Keras code.
- Transformer Architecture — Transformer architecture hub: self-attention, encoder-only (BERT), decoder-only (GPT, LLaMA), encoder-decoder (T5), Vision Transformers and MoE.
- Encoder-Decoder Transformers (T5, BART) — Encoder-decoder Transformers: cross-attention, T5 span corruption and text-to-text, BART denoising, seq2seq fine-tuning, and when to choose them over LLMs.
- Self-Attention — Self-attention explained: Q/K/V projections, scaled dot-product, causal and padding masks, multi-head attention, O(n^2) cost, and a PyTorch implementation.
- Vision Transformers (ViT) — How Vision Transformers turn images into patch tokens, the ViT encoder block, data requirements vs CNNs, DeiT/Swin variants, and fine-tuning with timm.
- Decoder-Only Transformers (GPT, Claude, LLaMA) — Decoder-only Transformers behind GPT, Claude and LLaMA: causal LM objective, KV cache, prefill vs decode, sampling, training stages, and MoE variants.
- Mixture of Experts (MoE) — Mixture of Experts in Transformers: router and top-k gating, total vs active parameters, load-balancing loss, capacity, expert parallelism, PyTorch code.
- Encoder-Only Transformers (BERT, RoBERTa) — Encoder-only Transformers: BERT and RoBERTa pretraining, pooling into sentence embeddings, bi- vs cross-encoders, and choosing an embedding model.
- MiniLM (384-Dimensional Embeddings) — MiniLM and all-MiniLM-L6-v2: deep self-attention distillation, 384-dim sentence embeddings, CPU-friendly semantic search with FAISS, limits and trade-offs.
- multi-qa-mpnet (768-Dimensional Embeddings) — multi-qa-mpnet-base: MPNet encoder fine-tuned on question-answer pairs for 768-dim asymmetric semantic search; dot vs cosine variants, chunking, trade-offs.
- OpenAI text-embedding-ada-002 (1536 Dimensions) — OpenAI text-embedding-ada-002: 1536-dim hosted embeddings, 8191-token inputs, batching, cosine behaviour, migration to text-embedding-3, and trade-offs.
- ML Frameworks (PyTorch, Keras/TensorFlow, Hugging Face, scikit-learn) — PyTorch, Keras/TensorFlow, Hugging Face and scikit-learn compared: where each sits in the stack, programming models, code side by side, how to choose.
- Hugging Face Login — This will prompt you to enter your Hugging Face token. You can generate a token from your Hugging Face account:
- Keras — Keras is an open-source deep learning library that provides a high-level API for building and training neural networks. It is user-friendly, modular, and…
- Model Parameters = Words × Dimensions — Word : A symbolic label (token) such as cat , dog , or car . Dimension : The number of numeric values used to represent a word.
- PyTorch Sentiment Analysis Model — Fine-tune bert-base-uncased in PyTorch for binary sentiment: dataset, two-layer head, BCEWithLogitsLoss training loop, saving and inference.
- PyTorch Machine Learning Library — PyTorch is an open-source machine learning library used for a wide variety of tasks such as deep learning, natural language processing (NLP), and computer…
- Scikit-learn — Scikit-learn is a widely used open-source Python library for machine learning, providing simple and efficient tools for data analysis and modeling. It is…
- Tensor in Machine — In essence, a tensor is a multidimensional array used to represent data. Think of it as a generalization of vectors and matrices.
- Machine Learning Fundamentals — Machine learning fundamentals: probability, features, gradient descent, evaluation metrics, cross-validation, bias-variance and regularisation.
- Bias-Variance Trade-off — The bias-variance trade-off: underfitting vs overfitting, the error decomposition, a simulation in scikit-learn, learning curves and the levers that fix each.
- Cross-Validation — Cross-validation explained: k-fold, stratified, group and time-series splits, nested CV for tuning, leakage pitfalls, and runnable scikit-learn code.
- Evaluation Metrics — ML evaluation metrics explained: confusion matrix, precision, recall, F1, ROC and PR AUC, MAE, RMSE, R squared, NDCG and MRR, with scikit-learn code.
- Feature Engineering — Feature engineering for machine learning: categorical encoding, scaling, transforms, interactions, leakage, and scikit-learn pipelines with a worked example.
- Gradient Descent — Gradient descent from first principles: the update rule, learning rate and stability, batch vs SGD vs mini-batch, momentum and Adam, convergence, NumPy code.
- Overfitting and Regularization — Overfitting and regularization: bias-variance, learning curves, L1 and L2, early stopping, dropout, data augmentation, with a scikit-learn example.
- Probability and Statistics for ML — Probability and statistics for machine learning: key distributions, Bayes' rule, MLE and MAP, hypothesis tests and confidence intervals, with Python code.
- MLOps — MLOps overview: the machine learning lifecycle from features and experiment tracking to model registry, deployment and drift monitoring.
- Experiment Tracking — Experiment tracking for ML: runs, parameters, metrics and artifacts, how MLflow works, a runnable sweep example, tool comparison and pitfalls.
- Feature Stores — Feature stores explained: offline and online stores, point-in-time correct joins, training-serving skew, Feast example and how to choose an option.
- Model Monitoring and Drift — Model monitoring and drift: data vs concept drift vs label shift, PSI and KS tests with Python code, monitoring loops, and how to respond.
- Model Registry and Versioning — Model registries explained: versioning models with code, data and metrics lineage, aliases and stages, promotion gates, rollback, and an MLflow example.
- Reinforcement Learning — Reinforcement learning: MDPs, value functions, the Bellman equation, exploration, and an overview of Q-learning, policy gradients (PPO) and RLHF.
- Policy Gradient (PPO) — Policy gradient methods from REINFORCE to actor-critic and PPO: advantage estimation, GAE, the clipped surrogate objective, and Python code.
- Q-Learning / DQN — Q-learning and Deep Q-Networks: the Bellman/TD update, epsilon-greedy, experience replay, target networks, Double/Dueling DQN, with Python code.
- RLHF (Reinforcement Learning from Human Feedback) — RLHF explained: SFT, reward models trained on human preference pairs, PPO with a KL penalty, DPO and GRPO alternatives, and reward-hacking pitfalls.
- Supervised Learning — Supervised learning overview: labeled data, the train/validate/test workflow, classification vs regression, ensembles, and core concepts like leakage.
- Classification — Classification overview: algorithm families and their decision boundaries, confusion-matrix metrics, choosing a classifier, and a scikit-learn comparison.
- Decision Trees — Decision trees explained: CART splits with Gini and entropy, axis-aligned partitions, overfitting and cost-complexity pruning, with a scikit-learn example.
- K-Nearest Neighbors (KNN) — K-nearest neighbors explained: majority vote, distance metrics and scaling, choosing k, KD-trees and approximate search, with a scikit-learn example.
- Logistic Regression — Logistic regression explained: sigmoid and log-odds, log-loss training, decision boundaries, L1/L2 regularization, softmax, and a scikit-learn example.
- Naive Bayes — Naive Bayes classifiers explained: Bayes' rule, the conditional independence assumption, Gaussian/Multinomial/Bernoulli variants, smoothing, and…
- Random Forest Classifier Model — This model consists of a collection of decision trees (the "forest"), where each tree is trained on a random subset of the data. The final…
- Support Vector Machines (SVM) — Support vector machines explained: maximum margin, hinge loss and soft margin, the kernel trick, tuning C and gamma, with a scikit-learn example.
- Ensembles — Ensemble learning overview: bagging vs boosting, why averaging correlated models reduces variance, random forests, gradient boosting, voting and stacking.
- Bagging (Random Forest) — Bagging and random forests: bootstrap resampling, variance reduction math, OOB validation, tuning, and a scikit-learn example.
- Gradient Boosting (XGBoost, LightGBM) — Gradient boosting explained: residual fitting, second-order split gain, XGBoost vs LightGBM vs CatBoost, early stopping and tuning.
- Regression — Regression overview: linear, polynomial and ridge/lasso models, RMSE, MAE and R-squared metrics, non-linear alternatives, and a scikit-learn comparison.
- Linear Regression — Linear regression explained: ordinary least squares, normal equations and projection geometry, assumptions and residual diagnostics, with Python examples.
- Polynomial Regression — Polynomial regression explained: feature expansion, degree and the bias-variance trade-off, Runge oscillation, choosing degree by CV, and spline alternatives.
- Ridge / Lasso Regression — Ridge, lasso and elastic net regression explained: L2 vs L1 penalties, why lasso yields sparse models, coefficient paths, tuning lambda, and sklearn code.
- Unsupervised Learning — Unsupervised learning overview: clustering, dimensionality reduction and anomaly detection on unlabeled data, with workflow and evaluation tips.
- Anomaly Detection — Anomaly detection methods: statistical, LOF, Isolation Forest, One-Class SVM, reconstruction error, evaluation and production practice.
- Clustering — Clustering overview: centroid, density and hierarchical approaches, choosing between K-Means, DBSCAN and HAC, and evaluating clusters.
- DBSCAN — DBSCAN density clustering: core, border and noise points, picking eps with a k-distance plot, HDBSCAN, and scikit-learn code.
- Hierarchical Clustering — Agglomerative hierarchical clustering: dendrograms, single/complete/average/Ward linkage, complexity, and SciPy and scikit-learn code.
- K-Means — K-Means clustering: Lloyd's algorithm, k-means++ init, choosing k with elbow and silhouette, failure modes, variants and scikit-learn code.
- Dimensionality Reduction — Dimensionality reduction overview: why compress features, PCA vs t-SNE vs UMAP, global vs local structure, and how to choose.
- PCA (Principal Component Analysis) — Principal Component Analysis: covariance and SVD math, explained variance and choosing k, scikit-learn pipeline code, and pitfalls.
- t-SNE — t-SNE explained: neighbor probabilities, Student-t kernel, KL divergence, perplexity, Barnes-Hut, code, and how to read the plots safely.
- UMAP — UMAP explained: fuzzy k-NN graph, cross-entropy layout, n_neighbors and min_dist, transform on new data, UMAP + HDBSCAN, and pitfalls.
Deep Learning (0)
Neural architectures from the perceptron up: MLPs, CNNs, RNNs and LSTMs, and graph neural networks.
Attention and the three transformer families, embedding models, and the generative families: autoencoders, GANs, diffusion and autoregressive models.
Language & Vision (15)
Natural language processing tasks from tokenization to speech, and computer vision from classification to vision-language models.
- Natural Language Processing and Understanding (NLU) — Natural language processing overview: tokenization, classification, NER, summarization, translation and speech, how the tasks fit together, and when…
- Machine Translation (MT) — Neural machine translation: encoder-decoder Transformers, cross-attention alignment, beam search, BLEU/chrF/COMET evaluation, and NMT vs LLM trade-offs.
- Named Entity Recognition (NER) — Named entity recognition: BIO tagging, CRF and BiLSTM-CRF, transformer token classification, span-level evaluation, LLM extraction, and spaCy/Hugging Face code.
- Speech: ASR and Text-to-Speech — Speech AI: ASR with log-mel features, CTC, RNN-T and Whisper-style encoder-decoders; WER; neural TTS with acoustic models and vocoders. Python examples.
- Text Summarization — Text summarization: extractive (TextRank) vs abstractive (BART, T5, LLMs), long-document map-reduce, ROUGE and faithfulness evaluation, with Python code.
- Text Classification — Text classification: TF-IDF with linear models, fine-tuned transformers, embeddings and zero-shot LLMs; evaluation, class imbalance, and scikit-learn code.
- Tokenization — Tokenization for NLP and LLMs: word, character and subword schemes, BPE, WordPiece, Unigram/SentencePiece, byte-level BPE, with Python and pitfalls.
- Computer Vision — Computer vision overview: classification, detection, segmentation, face recognition, OCR, medical imaging, and CLIP, with links to each deep dive.
- Facial Recognition — How face recognition works: detection, alignment, ArcFace embeddings, verification vs identification, FAR/FRR thresholds, bias, spoofing, and privacy.
- Image Classification — Image classification: CNN and ViT backbones, transfer learning, training recipe, softmax calibration, open-set inference, evaluation and pitfalls.
- Image Segmentation — Semantic, instance, and panoptic segmentation: U-Net, DeepLab, Mask R-CNN, Segment Anything, Dice loss, mIoU, and a torchvision example.
- Medical Imaging — AI for medical imaging: DICOM and modalities, 3D U-Net and nnU-Net, MONAI training code, patient-level validation, regulation, and common pitfalls.
- Object Detection — Object detection explained: IoU, two-stage vs one-stage detectors, anchors, DETR, non-maximum suppression, mAP, and a torchvision Faster R-CNN example.
- Vision-Language Models (CLIP) — CLIP and vision-language models: contrastive image-text pretraining, zero-shot classification, image search code, multimodal LLMs, and limitations.
- Machine Learning - YouTube — Curated YouTube videos on machine learning, local LLMs, Databricks and Claude MCP agents, with notes on how to use them for learning.
Classical AI & Robotics (16)
Search and planning, knowledge representation and reasoning, evolutionary computation, and robotics.
- Search & Planning — Adversarial search and constraint satisfaction. Graph search (BFS, DFS, Dijkstra, A*) lives under Engineering › Algorithms › Graph.
- Adversarial Search: Minimax, Alpha-Beta and MCTS — Adversarial search for two-player games: minimax, alpha-beta pruning, evaluation functions, and Monte Carlo Tree Search (UCT) with a runnable Python example.
- Constraint Satisfaction Problems (CSP) — Constraint satisfaction: variables, domains and constraints; backtracking with MRV, forward checking, AC-3 arc consistency, and a runnable Python solver.
- Knowledge & Reasoning — Knowledge representation and reasoning in AI: expert systems, knowledge graphs, logic, Bayesian networks and fuzzy logic, and how they relate to LLMs.
- Bayesian Networks — Bayesian networks: DAG factorization, conditional probability tables, d-separation, exact and approximate inference, structure learning, and pgmpy code.
- Fuzzy Logic — Fuzzy logic: membership functions, t-norms, Mamdani and Sugeno inference, defuzzification, and a NumPy fuzzy controller, with when to use it over probability.
- Logic and Inference — Logic for AI: propositional and first-order logic, entailment, resolution, unification, forward/backward chaining, SAT solvers and Datalog, with Python.
- Expert Systems — Expert systems: knowledge base, inference engine, explanation facility and knowledge acquisition, with history (MYCIN, XCON), design trade-offs and Python.
- Knowledge-based Systems — Knowledge-based systems: semantic networks, frames, ontologies (RDF/OWL, description logic), case-based reasoning, and Python with rdflib and owlrl.
- Rule-based Systems — Rule-based systems: production rules, working memory, forward vs backward chaining, conflict resolution, the Rete algorithm, and a Python rule engine.
- Evolutionary Computation — Evolutionary computation: population-based, derivative-free optimization. Genetic algorithms, evolution strategies, and swarm intelligence (PSO, ACO).
- Genetic Algorithms — Genetic algorithms: encodings, tournament selection, crossover, mutation, elitism, convergence tuning, and a from-scratch Python GA for knapsack.
- Swarm Intelligence — Swarm intelligence for optimization: Particle Swarm Optimization velocity updates, Ant Colony Optimization pheromone trails, and Python PSO code.
- Robotics — Robotics fundamentals: the sense-plan-act loop, perception and SLAM, control algorithms, path planning, and where machine learning fits in the autonomy stack.
- Control Algorithms for Robotics — Robot control algorithms: feedback loops, PID with anti-windup in Python, LQR via the Riccati equation, model predictive control, and learned RL controllers.
- Perception & SLAM — Robot perception and SLAM: sensor fusion, Kalman filter math and Python code, pose-graph SLAM with loop closure, and visual and LiDAR SLAM pipelines.
Document Ingestion (0)
Turning the messy inputs — PDFs, Word files, scans — into something a pipeline can index.
Where the work runs: managed AI services, the model hub, and the GPU setup underneath it all.
- Azure AI Services — Microsoft's AI stack on Azure spans three layers: Azure OpenAI Service for direct access to OpenAI models, Azure AI Foundry for multi-model generative AI…
- Azure AI Document Intelligence — Azure AI Document Intelligence (formerly Form Recognizer) is Microsoft's document-AI service. It extracts printed and handwritten text, layout (lines…
- Azure AI Foundry — Azure AI Foundry (formerly Azure AI Studio) is Microsoft's unified platform for building, evaluating, and operating generative AI applications.…
- Azure AI Search — Azure AI Search (formerly Azure Cognitive Search) is Microsoft's managed search service and the default retrieval layer behind Azure…
- Azure AI Vision & Language — Beyond OpenAI models, Azure bundles a family of task-specific AI services under Azure AI Services — pre-trained APIs for vision, speech, and language. This…
- Azure Machine Learning — Azure Machine Learning is Microsoft's managed ML platform for training, tracking, deploying, and monitoring models. It covers the full…
- Azure OpenAI Service — Azure OpenAI Service is Microsoft's hosted offering of OpenAI's models — GPT-4o, GPT-4o mini, GPT-4.1, o1, o3-mini, DALL·E 3, Whisper, and the…
- Hugging Face AI Control Center — Hugging Face control center: Hub accounts and tokens, gated Llama, Stable Diffusion and FLUX models, Apple Silicon tooling, and sentence-transformer embeddings.
- Hugging Face Hub and Datasets — The Hugging Face Hub is the de-facto registry for open ML — 1M+ models, 200k+ datasets, and an ecosystem of tooling ( , , , , , ) that assumes everything is…
- Hugging Face Video — Curated Hugging Face videos with a learning path: what the Hub is, running models in Colab, the AI Agents course, KerasHub, and core library concepts.
- NVIDIA + CUDA + cuDNN + TensorFlow (Py311) Setup on Fresh Ubuntu — Set up an NVIDIA GPU on fresh Ubuntu: driver, CUDA 12.1, cuDNN 8.9.7 and TensorFlow GPU in a Python 3.11 conda env, with verification and troubleshooting.
- Install NVIDIA GeForce RTX 3060 for Machine Learning — Before installing the NVIDIA drivers, update your system and install the necessary packages.
Shipped Work (2)
An end-to-end architecture write-up of a production system, rather than a pattern in isolation.
- Projects — Selected projects with deep architecture write-ups. Each entry covers the problem, the design decisions I made, the tradeoffs I weighed, and the parts I…
- MyDocumentIntelligence.com — Architecture — MyDocumentIntelligence.com is a document-intelligence platform I built for legal and healthcare teams — the kind of customers who cannot paste a contract or…