Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.monostate.ai/llms.txt

Use this file to discover all available pages before exploring further.

Choosing Your Training Approach

Not every AI problem needs the same solution. Sometimes you need full training, sometimes just fine-tuning, and sometimes no training at all.

The Three Approaches

Prompt Engineering

No training neededUse existing models with clever prompts
  • Instant results
  • Zero training cost
  • 0-10 examples needed

Fine-Tuning

Recommended approachAdapt pre-trained models to your needs
  • Consistent behavior
  • 100-10K examples
  • Hours to days

Training from Scratch

Rarely neededBuild completely new models
  • Full control
  • Millions of examples
  • Very expensive

1. Prompt Engineering (No Training)

Use existing models with carefully crafted prompts. What it is: Writing instructions that get the model to do what you want without any training. Example:
You are a customer service agent for TechCorp.
Always be polite and helpful.
Product return policy: 30 days with receipt.

Customer: Can I return my laptop?
When to use:
  • Testing ideas quickly
  • Few examples available
  • Task is within model’s capabilities
  • Budget/time constraints
Pros:
  • Zero training time
  • No training data needed
  • Instant results
  • Free to try
Cons:
  • Limited customization
  • Inconsistent results
  • Can’t add new knowledge
  • Higher inference cost
Adapt a pre-trained model to your specific needs. What it is: Taking a model that already understands language/images and teaching it your specific task. When to use:
  • Have hundreds to thousands of examples
  • Need consistent behavior
  • Want to add domain knowledge
  • Building production systems
Pros:
  • Faster than training from scratch
  • Needs less data
  • Better performance than prompting
  • Lower inference cost than prompting
Cons:
  • Requires training data
  • Needs compute resources
  • Takes time to train
  • Can overfit on small datasets

3. Training from Scratch

Build a completely new model. What it is: Starting with random weights and training on massive datasets. When to use:
  • Creating foundational models
  • Completely novel architectures
  • Unlimited data and compute
  • Research purposes
Pros:
  • Full control
  • Can create novel capabilities
  • No inherited biases
Cons:
  • Needs massive data (millions of examples)
  • Extremely expensive
  • Takes weeks to months
  • Usually unnecessary

Decision Framework

Quick Decision Guide

1

Check your data

Do you have training examples?
  • No → Go with Prompt Engineering
  • Yes → Continue to Step 2
2

Count your examples

How many examples do you have?
  • Less than 100 → Use Prompt Engineering
  • 100-10,000 → Perfect for Fine-tuning
  • Millions → Could train from scratch (but why?)
3

Evaluate your needs

What’s most important?
  • Speed to deploy → Prompt Engineering
  • Consistent behavior → Fine-tuning
  • Novel architecture → Training from scratch

Detailed Comparison

AspectPrompt EngineeringFine-TuningTraining from Scratch
Data Needed0-10 examples100-10,000 examplesMillions of examples
Time to DeployMinutesHours to daysWeeks to months
Cost$0 upfront$10-1,000$10,000+
CustomizationLimitedHighComplete
New KnowledgeNoYesYes
ConsistencyVariableHighHigh
MaintenanceUpdate promptsRetrain periodicallyContinuous training

Approach by Use Case

When to use Prompt Engineering:
  • General FAQs
  • Simple routing
  • Low volume
  • Testing phase
When to use Fine-Tuning:
  • Company knowledge
  • Brand voice
  • High volume
  • Complex products

Fine-Tuning Methods

Standard Fine-Tuning

Update all parametersPros:
  • Maximum accuracy
Cons:
  • Needs more memory
Best for: Production systems with good GPUs

LoRA

Low-Rank AdaptationPros:
  • 90% less memory
  • Swap adapters
  • Faster training
Best for: Large models, limited resources

QLoRA

Quantized LoRAPros:
  • Works on consumer GPUs
  • 4-bit quantization
Cons:
  • Slightly lower accuracy
Best for: Experimentation, very limited resources

Prompt/Prefix Tuning

Train only promptsPros:
  • Minimal memory
  • Very fast
Cons:
  • Limited capacity
Best for: Few-shot learning, multiple tasks

Progressive Approach

1

Stage 1: Prompt Engineering

Start simple, test fast
  • Test the concept
  • Gather user feedback
  • Identify limitations
  • Collect training data
2

Stage 2: Few-Shot Fine-Tuning

Improve with examples
  • Use collected examples
  • Improve consistency
  • Reduce prompt complexity
  • Validate approach
3

Stage 3: Full Fine-Tuning

Scale for production
  • Scale with more data
  • Optimize performance
  • Reduce inference costs
  • Production deployment
4

Stage 4: Continuous Improvement

Keep getting better
  • Collect production data
  • Periodic retraining
  • A/B testing
  • Performance monitoring

Cost Considerations

Training Cost: $0Inference: $0.01-0.10 per 1K tokensBest for: Low volume, experimentationMonthly estimate (1M tokens): $10-100
Training Cost: $10-1,000 (one-time)Inference: $0.001-0.01 per 1K tokensBest for: High volume, productionMonthly estimate (1M tokens): $1-10 + hosting
Training Cost: $10,000-millionsInference: Variable based on sizeBest for: Foundation model creatorsNot recommended unless you’re OpenAI/Google

Data Requirements

Prompt Engineering

  • Minimum: Zero-shot (no examples)
  • Better: Few-shot (3-5 examples)
  • Best: Many-shot (10+ examples in context)

Fine-Tuning

  • Minimum: 50-100 examples
  • Better: 500-1,000 examples
  • Best: 5,000+ examples

Training from Scratch

  • Minimum: 1M+ examples
  • Better: 100M+ examples
  • Best: Billions of examples

Quality vs Quantity Trade-offs

High Quality, Low Quantity

Fine-tune with careful data curation
  • Hand-picked examples
  • Expert annotations
  • Data augmentation

Low Quality, High Quantity

Use larger models with filtering
  • Automated cleaning
  • Statistical filtering
  • Ensemble methods

Mixed Quality

Progressive filtering approach
  • Start with all data
  • Identify quality indicators
  • Weight by quality

Common Mistakes to Avoid

Jumping to Training Too FastAlways try prompt engineering first. You might not need training at all.
Insufficient Training DataFine-tuning with 10 examples won’t work. Need at least 100 quality examples.
Over-Engineering SolutionsDon’t train from scratch for standard tasks. Use pre-trained models.
Ignoring MaintenanceModels need updates. Plan for retraining from day one.

Hybrid Approaches

RAG (Retrieval Augmented Generation)

Combine prompting with external knowledge. Use when:
  • Need updatable knowledge
  • Can’t fine-tune frequently
  • Have structured data

Ensemble Methods

Combine multiple approaches. Example:
  • Prompt for creativity
  • Fine-tuned model for accuracy
  • Vote/combine outputs

Chain of Thought + Fine-Tuning

Fine-tune on reasoning steps. Use when:
  • Need explainable outputs
  • Complex reasoning tasks
  • Educational applications

Making the Decision

Questions to Ask

  1. What’s my budget?
    • Low → Prompt engineering
    • Medium → Fine-tuning
    • High → Consider all options
  2. How much data do I have?
    • Less than 100 examples → Prompt engineering
    • 100-10K → Fine-tuning
    • More than 1M → Could train from scratch
  3. How unique is my task?
    • Common → Prompt engineering
    • Specialized → Fine-tuning
    • Novel → Training from scratch
  4. What accuracy do I need?
    • Acceptable → Prompt engineering
    • High → Fine-tuning
    • Perfect → Multiple iterations
  5. How fast do I need results?
    • Today → Prompt engineering
    • This week → Fine-tuning
    • This quarter → Any approach

Next Steps

Ready to start training?

Quick Start

Try your first model

Choose Interface

Pick UI, CLI, or API

Model Types

Select architecture