Spaces:
Sleeping
Sleeping
| from typing import Tuple | |
| def evaluate(response: str) -> Tuple[float, str]: | |
| """ | |
| Evaluate Evidence & Transparency Fit (Metric 1) with optional heuristic. | |
| Community note: Provides a basic heuristic; primary scoring done by GPT-4o/Claude via evaluators.py. | |
| """ | |
| transparency_keywords = ["limitation", "consult", "doctor", "evidence", "uncertainty"] | |
| score = sum(1 for kw in transparency_keywords if kw.lower() in response.lower()) / len(transparency_keywords) * 5 | |
| comment = "Basic transparency detected." if score > 2.5 else "Lacks transparency elements." | |
| return float(score), comment |