Prompt Cache कैलकुलेटर
Repeated LLM calls के cache writes, reads, TTL expiry और Batch API savings की तुलना करें।
इस्तेमाल कैसे करें
Model और cache TTL चुनें, फिर stable prefix, variable input, output और hourly call counts डालें। Automatic mode evenly spaced call gaps से cache hits estimate करता है; Manual mode आपका measured hit rate लेता है। Batch तभी चालू करें जब requests asynchronously चल सकती हों।
Calculator पहली eligible call को cache write मानता है और बाद की reads या rewrites timeline में दिखाता है। चुने हुए model के minimum से छोटे prefixes uncached रहते हैं। First-hour scenarios की तुलना करें और break-even calls से तय करें कि ऊँची write price expiry से पहले वापस मिलती है या नहीं।
आम सवाल
Cache hit rate कैसे estimate होता है?
Automatic mode calls के evenly spaced होने को मानता है। Cold call cache लिखती है; बाद की calls तब read करती हैं जब gap चुने हुए TTL से अधिक न हो, वरना हर call cache फिर लिखती है।
Break-even calls का क्या मतलब है?
यह एक eligible prefix share करने वाली minimum calls हैं जिनमें cache write और बाद की reads की cost उस prefix को हर बार सामान्य रूप से process करने से अधिक नहीं होती।
क्या prompt caching और Batch API savings साथ मिल सकती हैं?
Combined scenario चुने हुए model data से cache writes और reads calculate करता है, फिर Batch चालू होने पर उसका Batch multiplier लगाता है।