Artificial intelligence
Three connected areas: what a language model actually receives, how retrieval lets it answer from your documents, and the evaluation habits that decide whether any model's score means something.
Machine learning methods
Category pageData splits, overfitting, cross-validation and evaluation metrics: the habits that decide whether a model's score means anything.
Cross-validation explained: k-fold, stratified and grouped
Cross-validation gives a more reliable performance estimate than one split by rotating the validation fold. Learn k-fold, stratified, group and time-series variants.
Intermediate3 minData leakage in machine learning: how good scores lie
Data leakage lets outside information slip into training, inflating scores that collapse in production. Learn the common types and how to prevent them.
Intermediate3 minOverfitting and underfitting in machine learning
Overfitting means a model memorises its training data; underfitting means it misses the pattern. Learn to spot both from your scores and how to fix each.
Beginner3 minPrecision, recall and F1 score explained with an example
Accuracy can be misleading on imbalanced data. Learn the confusion matrix, precision, recall, F1 and thresholds through a worked phishing-detection example.
Beginner3 minTrain, validation and test sets explained
Why machine learning data is split three ways, what each split is for, how to split correctly with scikit-learn, and the mistakes that make a test score meaningless.
Beginner3 min
LLM foundations
Category pageTokens, embeddings and context windows: what a language model actually receives, and the limits that follow from it.
What are embeddings? Meaning as numbers, explained
Embeddings turn text into lists of numbers so that similar meanings land close together. Learn how they work, how similarity is measured, and where they fail.
Beginner3 minWhat is a context window in an LLM?
The context window is the maximum number of tokens a language model can consider at once. Learn what fills it, what happens when it overflows, and how to budget it.
Beginner3 minWhat is a token in an LLM?
A token is the unit of text a language model reads and writes. Learn how tokenizers split text, why token counts differ by language, and why it matters for cost.
Beginner4 minWhy long context windows still miss things
A million-token context window does not mean a model uses every token well. Learn about the lost-in-the-middle effect, attention cost, and how to test it yourself.
Intermediate3 min
Retrieval-augmented generation
Category pageChunking, vector search, reranking, citations and evaluation for systems that answer from your own documents.
How to chunk documents for RAG
Chunking decides what your RAG system can retrieve. Compare fixed-size, recursive, heading-aware and semantic chunking, and learn how to pick size and overlap.
Intermediate3 minHow to evaluate a RAG system: retrieval and answer quality
Measure a RAG system in two layers: did retrieval find the right passages, and is the answer faithful to them? Learn recall@k, MRR, faithfulness and a practical test set.
Intermediate3 minHow vector search works: similarity, top-k and hybrid search
Vector search finds text by meaning instead of exact words. Learn cosine similarity, top-k retrieval, approximate nearest neighbour indexes, BM25 and hybrid ranking.
Intermediate3 minWhat is retrieval-augmented generation (RAG)?
RAG makes a language model answer from your own documents by retrieving relevant passages first. Learn the pipeline step by step, and when RAG is the right choice.
Beginner3 min