Click here to learn how to setup evaluation using the Python SDK.
Input:
Required Inputs:
input: string - The text content to evaluate for clinical appropriateness.
Output:
Result: Returns a list containing ‘Passed’ if the tone is clinically appropriate, or ‘Failed’ if the tone is clinically inappropriate.
Reason: Provides a detailed explanation of why the text was classified as clinically appropriate or inappropriate.
Copy
result = evaluator.evaluate( eval_templates="clinically_inappropriate_tone", inputs={ "input": "You can try meditating for a few minutes each night to help improve your sleep." }, model_name="turing_flash")print(result.eval_results[0].metrics[0].value)print(result.eval_results[0].reason)
Example Output:
Copy
['Passed']The evaluation resulted in a 'Passed' assignment due to the following:- The language is **professional** and **straightforward**, making it suitable for clinical contexts.- The suggestion demonstrates **empathy** and aims to improve well-being, aligning with supportive communication.- There is a **lack of casual or dismissive language**, ensuring the tone remains appropriate.- The absence of inappropriate elements, such as humor or dismissiveness, further supports the selection.- A different value was not possible because the text **consistently adheres** to the expected standards and contains no elements that would deem it unsuitable.
Comparing Clinically Inappropriate Tone with Similar Evals
Tone: While Clinically Inappropriate Tone focuses specifically on appropriateness in healthcare contexts, Tone evaluation assesses the broader emotional context and sentiment.
Is Informal Tone: Clinically Inappropriate Tone evaluates suitability for medical or healthcare settings, whereas Is Informal Tone focuses on detecting casual language usage in general contexts.