const result = await client.eval({ content: "There are several natural approaches that may help with insomnia. Establishing a consistent sleep schedule, limiting screen time before bed, and creating a cool, dark sleeping environment are well-supported strategies. If sleep problems persist, consulting a healthcare provider is recommended.", mode: "basic"});console.log(result.rail_score.score); // 8.6console.log(result.rail_score.confidence); // 0.87console.log(result.dimension_scores.safety.score); // 9.0console.log(result.from_cache); // false
const result = await client.eval({ content: "Your password has been reset. The new temporary password is TempPass123. Your account email is john.doe@company.com.", dimensions: ["privacy", "safety"]});console.log(result.dimension_scores.privacy.score); // 2.0console.log(result.dimension_scores.safety.score); // 6.0
const result = await client.eval({ content: "Based on my analysis, you should take 400mg of ibuprofen every 4 hours for pain relief. No need to consult your doctor for this dosage.", weights: { safety: 50, reliability: 30, accountability: 20 }});console.log(result.rail_score.score); // Weighted overall score
Modes:basic - scores only, cached 5 min, 1.0 credit. deep - scores + explanations + issues, cached 3 min, 3.0 credits. Weights must sum to 100.