0
0
Agentic AIml~12 mins

Measuring agent accuracy and relevance in Agentic AI - Model Pipeline Trace

Choose your learning style9 modes available
Model Pipeline - Measuring agent accuracy and relevance

This pipeline shows how an agent learns to give accurate and relevant answers. It starts with data, processes it, trains the agent, and checks how well it performs.

Data Flow - 6 Stages
1Raw input data
1000 rows x 3 columnsCollect user queries, correct answers, and context1000 rows x 3 columns
Query: 'What is AI?', Answer: 'Artificial Intelligence', Context: 'Technology basics'
2Preprocessing
1000 rows x 3 columnsClean text, remove noise, and standardize format1000 rows x 3 columns
Query: 'what is AI?', Answer: 'artificial intelligence', Context: 'technology basics'
3Feature extraction
1000 rows x 3 columnsConvert text to numerical vectors using embeddings1000 rows x 300 columns
Query vector: [0.12, -0.05, ..., 0.33]
4Train/test split
1000 rows x 300 columnsSplit data into training (80%) and testing (20%) setsTrain: 800 rows x 300 columns, Test: 200 rows x 300 columns
Training query vector sample and label
5Model training
800 rows x 300 columnsTrain agent model to predict correct answersTrained model
Model learns to map query vectors to answers
6Evaluation
200 rows x 300 columnsTest model predictions and calculate accuracy and relevanceAccuracy score, Relevance score
Accuracy: 0.85, Relevance: 0.80
Training Trace - Epoch by Epoch
Loss
0.7 |*
0.6 |** 
0.5 |***  
0.4 |****   
0.3 |*****    
     1 2 3 4 5 Epochs
EpochLoss ↓Accuracy ↑Observation
10.650.60Model starts learning, accuracy is low
20.500.70Loss decreases, accuracy improves
30.400.78Model learns relevant patterns
40.320.83Accuracy continues to rise
50.280.85Training converges with good accuracy
Prediction Trace - 5 Layers
Layer 1: Input query vector
Layer 2: Model embedding layer
Layer 3: Prediction layer
Layer 4: Softmax normalization
Layer 5: Final answer selection
Model Quiz - 3 Questions
Test your understanding
What does the loss value represent during training?
AHow wrong the agent's predictions are
BThe number of correct answers
CThe size of the input data
DThe speed of training
Key Insight
Measuring both accuracy and relevance helps ensure the agent not only answers correctly but also provides answers that fit the user's question context well.