Core Concepts¶
Understand the fundamental building blocks of IOValence.
1. What is an AI Agent?¶
An AI Agent is a software system that: - Receives input (questions, data, images) - Processes using trained models - Provides output (answers, predictions, actions) - Learns from examples
Types of Agents¶
Classification Agent¶
Categorizes inputs into predefined classes.
Example: Email classifier (spam/not spam)
Input: Email text
Processing: Analyzes language patterns
Output: "Spam" or "Not Spam"
Regression Agent¶
Predicts continuous numerical values.
Example: House price predictor
Input: House features (size, location, year)
Processing: Learns price patterns
Output: Predicted price ($350,000)
Detection Agent¶
Identifies objects or patterns in data.
Example: Image object detection
Input: Photo
Processing: Scans for objects
Output: List of detected objects + positions
Generation Agent¶
Creates new content based on patterns.
Example: Text generator
Input: Topic prompt
Processing: Generates coherent text
Output: Generated content
2. Training Data¶
The foundation of every agent. Quality data = better agent.
What is Training Data?¶
Examples your agent learns from: - Features: Input information - Labels: Correct answers - Quantity: Typically 100s to 1000s of examples
Example Training Dataset¶
feature1,feature2,label
5.1,3.5,setosa
7.0,3.2,versicolor
6.3,3.3,virginica
Data Quality Rules¶
✅ Clean - Remove errors and duplicates
✅ Complete - Fill missing values
✅ Balanced - Equal examples per category
✅ Relevant - Directly related to task
✅ Sufficient - Enough examples to learn
Training vs Test Data¶
| Aspect | Training Data | Test Data |
|---|---|---|
| Purpose | Agent learns | Measure performance |
| Usage | During training | After training |
| Typical Split | 80% | 20% |
| Should overlap? | NO - never! |
3. Models & Training¶
What Happens During Training?¶
1. Agent receives training data
2. Model learns patterns
3. Adjusts internal parameters
4. Repeats until performance plateaus
Key Training Concepts¶
Epoch: One complete pass through training data - More epochs = more learning (but can overfit) - Typical: 5-100 epochs
Batch Size: How many examples processed at once - Larger batch = faster, less memory efficient - Smaller batch = slower, more accurate - Typical: 32, 64, 128
Learning Rate: How quickly model learns - Higher = faster but can miss optimal solution - Lower = slower but more stable - Typical: 0.001 - 0.1
Overfitting vs Underfitting¶
Underfitting: Good Fit: Overfitting:
Model too simple Just right Model memorizes data
❌ Low training acc ✅ High training acc ✅ Very high training acc
❌ Low test acc ✅ Good test acc ❌ Low test acc
4. Model Evaluation¶
How do we know if our agent is good?
Key Metrics¶
Accuracy: Percentage of correct predictions
Accuracy = (Correct Predictions) / (Total Predictions)
Range: 0-100%
Goal: High accuracy
Precision: Of predicted positives, how many correct?
Precision = True Positives / (True Positives + False Positives)
Goal: Reduce false alarms
Recall: Of actual positives, how many found?
Recall = True Positives / (True Positives + False Negatives)
Goal: Don't miss important cases
F1-Score: Balance between precision and recall
F1 = 2 × (Precision × Recall) / (Precision + Recall)
Range: 0-1 (higher is better)
Confusion Matrix¶
Predicted
Positive Negative
Actual Pos TP FN
Neg FP TN
- TP (True Positive): Correct positive prediction
- FP (False Positive): Incorrect positive prediction
- TN (True Negative): Correct negative prediction
- FN (False Negative): Incorrect negative prediction
5. Deployment¶
Making your agent production-ready.
Deployment Options¶
| Option | Best For | Complexity |
|---|---|---|
| Local | Development, testing | Simple |
| Server | Small-medium load | Medium |
| Cloud | High scale, high availability | Advanced |
| Edge | Real-time, offline | Advanced |
Deployment Steps¶
- Validate - Ensure metrics meet standards
- Package - Prepare agent for distribution
- Deploy - Upload to target environment
- Monitor - Track performance in production
- Update - Retrain with new data periodically
6. The Full Workflow¶
┌─────────────────────────────────────────┐
│ 1. Create Agent Configuration │
└──────────────────┬──────────────────────┘
↓
┌─────────────────────────────────────────┐
│ 2. Prepare & Upload Training Data │
└──────────────────┬──────────────────────┘
↓
┌─────────────────────────────────────────┐
│ 3. Train Model │
│ (IOValence handles this) │
└──────────────────┬──────────────────────┘
↓
┌─────────────────────────────────────────┐
│ 4. Evaluate Performance │
│ (Check accuracy, metrics) │
└──────────────────┬──────────────────────┘
↓
Performance OK?
/ \
YES NO
/ \
↓ ↓
DEPLOY ADJUST SETTINGS
(USE) GO BACK TO STEP 2
Next Steps¶
- 🤖 How Agents Work - Dive deeper
- 🧠 Training Basics - Learn training details
- 📊 Data Preparation - Master your data
- 🚀 Create Your First Agent - Start building!
Questions? Check FAQ →