Click here to learn how to setup evaluation using the Python SDK.
Input:
Required Inputs:
input: string - The text content to evaluate for informal tone.
Output:
Result: Returns a list containing ‘Passed’ if informal tone is detected, or ‘Failed’ if formal tone is detected.
Reason: Provides a detailed explanation of why the text was classified as formal or informal.
Copy
result = evaluator.evaluate( eval_templates="is_informal_tone", inputs={ "input": "Dear Sir, I hope this email finds you well. I look forward to any insights or advice you might have whenever you have a free moment" }, model_name="turing_flash")print(result.eval_results[0].output)print(result.eval_results[0].reason)
Example Output:
Copy
['Failed']The evaluation resulted in assigning the 'Failed' value due to the following reasons:- The text **lacks** any indicators of an informal tone.- There is an **absence** of contractions, slang, colloquial language, emojis, or conversational phrasing.- The tone is **formal**, as evidenced by the greeting 'Dear Sir' and the phrase 'I hope this email finds you well'.- A different value was not possible because there is **no evidence** of informal language.
Tone: While Is Informal Tone specifically identifies casual language elements, Tone evaluation assesses the broader emotional context and sentiment.
Clinically Inappropriate Tone: Is Informal Tone detects casual language usage, whereas Clinically Inappropriate Tone focuses on language that would be unsuitable in healthcare contexts.