Concept: Evaluation | Python:
client.eval()Parameters
evaluate करने के लिए AI से बना text। 10–10,000 characters के बीच होना चाहिए।
Evaluation mode।
"basic" तेज़, real-time scoring के लिए RAIL के core scoring models चलाता है। "deep" एक ज्यादा गहरा, ज्यादा detailed analysis चलाता है जो per-dimension explanations और issue tags भी लौटा सकता है।score करने के लिए dimensions का subset। सभी 8 score करने के लिए छोड़ दें। Options:
fairness, safety, reliability, transparency, privacy, accountability, inclusivity, user_impact।Custom dimension weights। values का जोड़ 100 होना चाहिए। जैसे
{"safety": 25, "reliability": 20, ...}।Domain context hint:
"general", "healthcare", "legal", "finance", "code"। scoring की सटीकता बेहतर करता है।per-dimension explanations शामिल करें (सिर्फ़ deep mode)।
हर dimension के detected issue tags शामिल करें (सिर्फ़ deep mode)।
हर dimension के सुधार के suggestions शामिल करें (सिर्फ़ deep mode)।
Request
Response
आपकी application की policy ने इस result को कैसे judge किया।
enforcement— policy का mode (log_only,block, याregenerate)।threshold— pass होने के लिए जरूरी overall score।score— इस result का overall score।passed— score ने threshold पूरा किया या नहीं।enforced— outcome पर action लिया गया या नहीं। जबfalseहो, तो policy monitor mode में है: verdict report होता है पर response बदला नहीं जाता, ताकि आप देख सकें कि क्या block होता। live stateGET /configसे check करें।
block policy 422 POLICY_BLOCKED लौटाती है और regenerate policy अपना fallback लगाने से पहले एक safe rewrite की कोशिश करती है।Overall RAIL score (0.0–10.0), सभी evaluate किए गए dimensions का weighted average।
score में model का confidence (0.0–1.0)।
Per-dimension scores। हर entry में
score (0–10) और confidence (0–1) होता है। Deep mode में: साथ में explanation, issues, suggestions भी।true अगर यह result cache से लौटाया गया (0 credits charge हुए)।इस request के लिए charge किए गए credits। cached responses के लिए
0।