عرض عملي: تقدير تكلفة المساعد لكل محادثة
في هذا الدرس 3 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
estimate cost and latency per conversation, not per request, and design fallbacks.
تفاصيل المخطط المبدئي
خطوة بخطوة
- Gather volumes with customer service: conversations per month, turns per conversation, share that hand over.
- Estimate tokens per turn: system prompt, retrieved text, history, and answer; the history grows each turn.
- Multiply by the provider's price per input and output token (verify current prices before recording) to get cost per conversation.
- Planned mistake: cost one request and multiply by conversations. Fix: sum all turns, including retrieval and retries, then add vector search and hosting costs.
- Estimate latency end to end: retrieval, tool calls, model; set a timeout.
- Define fallbacks: after timeout show a static help page; during provider outage route to the human queue; compare cost against a human-handled conversation.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.