E-commerce Customer Support Bot: Trendyol/Hepsiburada-Style SLA + Entity Extraction
TR e-commerce-specific customer support bot: 50K real tickets (anonymized) + Trendyol-style SLA (P95 < 3s), entity extraction (order number, product, shipping, return), intent classification (40+ intents), tool-calling (order status API). Llama 3.1 8B + Qwen 2.5 7B comparison, vLLM + LoRA hot-swap deploy.
Şükrü Yusuf KAYA
42 min read
Advanced1. Vaka#
Şirket: Orta ölçekli Türk e-ticaret platformu, 500K aylık müşteri, 50K aylık ticket.
Mevcut durum: Müşteri hizmetleri ekibi 80 kişi, ortalama response 4-8 saat. %60 ticket "basit" (sipariş status, kargo, iade nedeni).
Hedef: %60 basit ticket'i 30 saniyede çöz; karmaşık olanları insan ekibine route et.
SLA:
- P95 latency < 3 saniye
- Intent accuracy > %92
- Entity extraction (sipariş no, ürün) > %96
- Tool-call (order status API) accuracy > %98
- Hallucination rate < %1
python
# === E-Ticaret CS Bot — Pipeline ===# 1. Veri toplama (50K anonimleştirilmiş ticket)# - PII strip: TC kimlik, telefon, e-mail, IBAN, sipariş bilgisi → mask# - Conversation format: user / agent / tool_call # 2. Intent taxonomy (40 intent)INTENTS = [ "siparis_status", "iade_baslat", "kargo_takip", "fatura_ister", "urun_bilgi", "stok_sor", "fiyat_sor", "kupon_kullanim", "uyelik_problem", "sifre_unuttum", # ... 30 daha] # 3. Tool definitionsTOOLS = [ { "name": "get_order_status", "description": "Sipariş numarasına göre durumu döndürür", "parameters": {"order_number": {"type": "string"}}, }, { "name": "start_return_process", "description": "Sipariş iadesi başlatır", "parameters": {"order_number": {"type": "string"}, "reason": {"type": "string"}}, }, # ... 15 daha] # 4. SFT dataset format# {"messages": [# {"role": "user", "content": "Sipariş 12345 nerede?"},# {"role": "assistant", "tool_calls": [{"function": {"name": "get_order_status", "arguments": "{\"order_number\":\"12345\"}"}}]},# {"role": "tool", "content": "{\"status\":\"shipping\",\"eta\":\"2 days\"}"},# {"role": "assistant", "content": "Siparişiniz şu anda kargoda, 2 gün içinde elinizde olacak."}# ]} # 5. FT — Qwen 2.5 7B + LoRA + RTX 4090 ~2.5 saat# 6. Eval — held-out 5000 ticket# 7. Deploy — vLLM AWQ int4 + LoRA hot-swap # Cookbook'un ölçtüğü sonuçlar:# - Intent accuracy: 93.4% (target 92%)# - Entity extraction (sipariş no): 96.8% (target 96%)# - Tool-call accuracy: 98.2% (target 98%)# - P95 latency: 2.1s (target 3s)# - %62 ticket otomatik çözüldü → %38 insan ekibe# - CS ekibi backlog %50 azaldı# - Cost: $0.08/ticket (vs human $1.50/ticket = 18x daha ucuz)E-Ticaret CS Bot pipeline
✅ Teslim
- Mini intent dataset (1000 örnek) hazırla. 2) Qwen 2.5 7B FT. 3) Sonraki ders: 17.2 — TR Code Assistant.
Yorumlar & Soru-Cevap
(0)Yorum yazmak için giriş yap.
Yorumlar yükleniyor...
Related Content
Part 0 — Engineering Foundations
Welcome to the Fine-Tuning Cookbook: System, Stage Taxonomy, and the Reproducibility Contract
Start LearningPart 0 — Engineering Foundations
Reproducibility Stack: Seeds, cuDNN Flags, and Deterministic CUDA — End the 'Works on My Machine' Problem
Start LearningPart 0 — Engineering Foundations