AI Engineering Learning Hub
Machine learning and AI engineering explained the way I learned them: by building real systems. Each topic has a plain-English explanation, working code and interview questions.
Machine Learning Fundamentals
Start here. The maths and intuition behind every model, explained with the house-price regression I built while learning.
Features, Labels, Weights & Bias
What features, labels, weights and bias mean in machine learning, with a house-price example and runnable NumPy code.
Vectors, Matrices & Matrix Multiplication
How ML represents data as vectors and matrices, the shape rule for matrix multiplication, and why it replaces Python loops.
Normalization / Feature Scaling
Why features must share a scale before gradient descent, min-max vs standardisation, and the train/test scaling rule most people get wrong.
Loss Functions (MAE, MSE, RMSE)
What a loss function is, how MAE, MSE and RMSE differ, and how to choose between them for training and reporting regression models.
Gradient Descent & Learning Rate
How gradient descent updates weights step by step, what the learning rate controls, and a from-scratch NumPy implementation you can run.
Linear Regression
Linear regression explained with a house-price example: the formula, how weights are learned with gradient descent, and when it breaks.
Logistic Regression & Sigmoid
Logistic regression and the sigmoid function: how a linear score becomes a 0-1 probability, why log loss is used, and the threshold trade-off.
Overfitting, Underfitting & Train/Test Split
How to tell overfitting from underfitting, why the train/test split exists, and the fixes that actually work in practice.
Neural Networks & Backpropagation
Neural networks and backpropagation from scratch: how layers of simple neurons learn non-linear patterns like XOR, with runnable numpy code.
Decision Trees
Decision trees explained: how Gini impurity picks the best split, why trees overfit, and how max_depth and ensembles fix it.
RAG & AI Engineering
Everything I learned building production RAG systems, agents and LLM features, with the code that actually shipped.
Embeddings
What text embeddings are, how sentence-transformers turn sentences into vectors, and how to pick a model for RAG.
Chunking Strategy
How to split documents into chunks for RAG: paragraph vs fixed-size vs recursive splitting, overlap, and the self-contained rule.
Cosine Similarity & Semantic Search
How cosine similarity scores two embeddings, why it beats Euclidean distance for text, and how semantic search uses it.
Top-K Retrieval
How to choose k in RAG retrieval, why top-5 beat top-3 for this site, and when thresholds, filters and reranking help.
RAG Pipeline (Retrieval-Augmented Generation)
How a RAG pipeline works end to end: chunk, embed, retrieve, build the prompt, generate. With the FastAPI code behind this site.
Conversation Memory (Multi-Turn Chat)
How LLM chat memory really works: replaying history, trimming and summarising it, and rewriting follow-up questions for retrieval.
Function Calling / Tool Use (AI Agents)
How LLM function calling works, the two-call loop, tool schemas, and how a voice agent uses tools to search a knowledge base.
Structured Output (JSON Mode / Schema)
How to get reliable JSON from an LLM: JSON mode vs schema-enforced structured outputs, Pydantic parsing, and lead capture as an example.
Vector Databases (ChromaDB)
What a vector database does, when a NumPy array is enough, and how ChromaDB, pgvector, Qdrant and FAISS compare for RAG.
Guardrails
Input, prompt and output guardrails for LLM apps: prompt injection defence, staying on topic, and cost limits, with real examples.
RAG Evaluation
How to evaluate a RAG system: retrieval recall and precision, faithfulness, LLM-as-judge, RAGAS, and a test set you can build in an hour.
Hybrid Retrieval & Reranking
Combining BM25 keyword search with embeddings using reciprocal rank fusion, then reranking with a cross-encoder, to fix naive RAG misses.
Agents & Production
Beyond a single prompt: agents that use tools, voice pipelines, MCP, evaluation and shipping LLM apps to a real server.
AI Agents & the Agent Loop
What an AI agent really is: an LLM in a loop with tools, a step limit and state. ReAct, planning, and when not to build one.
Voice Agents (Speech-to-Text, LLM, Text-to-Speech)
How a voice agent pipeline works: VAD, streaming STT, LLM, streaming TTS, interruptions and latency budgets, built with Pipecat.
Model Context Protocol (MCP)
What MCP is, how servers expose tools and resources to any AI client, and how to write a server in Python with FastMCP.
System Prompt Design for Products
How to write a production system prompt: role, context, output contract, rules and examples, with the prompt behind this site as the example.
Evaluating LLM Apps (Golden Sets & LLM-as-Judge)
How to evaluate LLM features beyond RAG: golden sets, intent accuracy, tool-choice checks, LLM-as-judge rubrics, and gating deploys on scores.
Deploying AI Apps (FastAPI, Docker, Traefik)
How this site is deployed: multi-stage Docker build, FastAPI serving the React app and API, Traefik with automatic TLS, and GitHub Actions.
Latency & Cost Control for LLM Apps
Practical ways to make LLM features fast and cheap: streaming, model choice, token budgets, caching, timeouts, fallbacks and measuring per stage.
No topics match that search yet. Try a broader term.