Model Pipeline - Customer support agent architecture
This pipeline builds a customer support agent that understands questions, finds answers, and replies helpfully. It processes chat data, learns from it, and improves its answers over time.
Jump into concepts and practice - no test required
This pipeline builds a customer support agent that understands questions, finds answers, and replies helpfully. It processes chat data, learns from it, and improves its answers over time.
Loss
1.2 |****
0.9 |***
0.7 |**
0.55|*
0.45|
+----
Epochs| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 1.2 | 0.45 | Model starts learning basic patterns |
| 2 | 0.9 | 0.60 | Loss decreases, accuracy improves |
| 3 | 0.7 | 0.72 | Model captures common question-answer pairs |
| 4 | 0.55 | 0.80 | Better understanding of language context |
| 5 | 0.45 | 0.85 | Model converges with good accuracy |
def respond(question):
if 'refund' in question.lower():
return 'Please provide your order ID for refund.'
elif 'shipping' in question.lower():
return 'Shipping takes 3-5 business days.'
else:
return 'Can you please clarify your question?'
print(respond('How long is shipping?'))def answer_question(text):
if 'price' in text:
return 'Our prices start at $10.'
elif 'delivery' in text:
return 'Delivery takes 5 days.'
else
return 'Sorry, I did not understand.'