Underfitting: Definition and Examples
Underfitting occurs when an artificial intelligence model is too simple to capture the patterns in the training data, resulting in poor performance on both training and new data.
Full definition
Underfitting is a fundamental problem in machine learning that occurs when a model fails to properly learn the relationships and structures present in the training data. Unlike overfitting, where the model memorizes the data, an underfitting model simply does not have the capacity or resources to understand the underlying patterns.
This phenomenon can have several causes: an overly simple model (e.g., using linear regression for non-linear data), an insufficient number of parameters, too short training, or excessive regularization that overly constrains the model. The result is a model that produces imprecise and generic predictions, unable to distinguish nuances in the data.
In prompt engineering, the concept of underfitting translates into how you formulate your instructions. An overly vague or generic prompt can be seen as a form of underfitting: it does not provide enough context or constraints for the language model to produce a precise and tailored response. Just like an undertrained model, an underspecified prompt generates superficial results that do not meet expectations.
To detect underfitting, one typically observes high error on both the training set and the test set. The solution involves increasing model complexity, enriching features, extending training, or reducing regularization. In prompt engineering, this translates to enriching your prompts with examples, context, and more detailed instructions.
Etymology
The term "underfitting" comes from English, composed of the prefix "under-" (insufficient) and "fitting" (adjustment). Literally, it means "under-adjustment," i.e., the model does not adjust enough to the data. This term became established in machine learning vocabulary in the 1990s, in direct opposition to "overfitting."
Concrete examples
Image classification with an overly simple model
Imagine you use a simple logistic regression to distinguish cats and dogs in photos. Explain why this model is likely to suffer from underfitting and which architectures would be more suitable.
Overly vague prompt generating a generic response
Compare these two prompts: 1) 'Tell me about marketing' vs 2) 'Describe 3 digital marketing strategies for a B2B SaaS startup in the launch phase, with a budget limited to €5000/month'. Explain why the first prompt is a form of underfitting.
Time series forecasting with too few variables
A sales forecasting model uses only the day of the week as a variable. It achieves 45% accuracy on the training data. Diagnose the problem and suggest additional variables to resolve underfitting.
Practical usage
In prompt engineering, avoiding underfitting involves providing sufficient context, examples, and constraints in your prompts to obtain precise responses. If a language model gives you overly generic or off-topic responses, enrich your prompt with specific details, a defined role, and explicit quality criteria. Think of your prompts as models: the more tailored they are to your need, the better the results.
Related concepts
FAQ
How can I tell if my model suffers from underfitting?
What is the difference between underfitting and overfitting?
How to fix underfitting in my prompts?
See also
How to use this prompt
- Copy the prompt with the button above.
- Paste it into ChatGPT, Claude or your favorite AI assistant.
- Replace the bracketed variables with your details, then refine the result.
About Prompt Guide
Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.
More definitions
Unsupervised Learning: Definition and Examples
Unsupervised learning is a branch of machine learning where a model analyzes data without prior labels to discover structures, patterns, or groupings within it.
Vector Database: Definition and Examples
A vector database is a specialized database for storing, indexing, and searching numerical vectors (embeddings), enabling...
Video Understanding: Definition and Examples
Ability of an AI model to analyze, interpret, and extract relevant information from video content, combining visual, temporal, and often audio understanding.
Virtual Assistant: Definition and Examples
A virtual assistant is a computer program powered by artificial intelligence, capable of understanding natural language instructions and performing tasks on behalf of a user.
Vision Language Model: Definition and Examples
A Vision Language Model (VLM) is an artificial intelligence model capable of understanding and reasoning simultaneously over images and text, enabling
Vision RAG: Definition and Examples
Vision RAG is an extension of Retrieval-Augmented Generation that integrates visual documents (images, charts, scanned PDFs) into the search process.
Get new prompts every week
Join our newsletter.