Bias-Variance Tradeoff
The fundamental tension in machine learning between bias (error from overly simplistic assumptions that cause the model to miss patterns) and variance (error from excessive sensitivity to training data fluctuations).
The bias-variance tradeoff is the central conceptual framework for understanding model errors. Bias measures how far off the model's average predictions are from the true values (systematic error). Variance measures how much the predictions change across different training sets (instability). Total error is decomposed as bias squared plus variance plus irreducible noise.
Simple models (linear regression, shallow trees) have high bias but low variance: they consistently make the same mistakes regardless of training data because they cannot represent complex patterns. Complex models (deep networks, large ensembles) have low bias but high variance: they can represent any pattern but may also fit noise, producing different predictions from different training sets.
The practical goal is finding the sweet spot where total error is minimized. Strategies to reduce bias include increasing model complexity, adding more features, and using more flexible architectures. Strategies to reduce variance include regularization, dropout, ensemble methods, and more training data. For production ML, this tradeoff guides model selection: start simple, measure performance, and increase complexity only when bias is clearly the bottleneck rather than variance.
Related Terms
RAG (Retrieval-Augmented Generation)
A technique that grounds LLM responses in external data by retrieving relevant documents at query time and injecting them into the prompt context.
Embeddings
Dense vector representations of text, images, or other data that capture semantic meaning in a high-dimensional space, enabling similarity search and clustering.
Vector Database
A specialized database optimized for storing, indexing, and querying high-dimensional vector embeddings with sub-millisecond similarity search.
LLM (Large Language Model)
A neural network trained on massive text corpora that can generate, understand, and transform natural language for tasks like summarization, classification, and conversation.
Fine-Tuning
The process of further training a pre-trained LLM on a domain-specific dataset to specialize its behavior, style, or knowledge for a particular task.
Prompt Engineering
The practice of designing and iterating on LLM input instructions to reliably produce desired outputs for a specific task.