diff --git a/src/feedback/trulens/feedback/llm_provider.py b/src/feedback/trulens/feedback/llm_provider.py index 5ef066f7e..a2233683d 100644 --- a/src/feedback/trulens/feedback/llm_provider.py +++ b/src/feedback/trulens/feedback/llm_provider.py @@ -1493,6 +1493,9 @@ def _remove_trivial_statements(self, statements: List[str]) -> List[str]: if isinstance(result, list): return result except Exception: + warnings.warn( + "Failed to process and remove trivial statements. Proceeding with all statements." + ) pass return statements @@ -1589,12 +1592,8 @@ def groundedness_measure_with_cot_reasons( messages=llm_messages, temperature=temperature, ).split("\n") - try: - hypotheses = self._remove_trivial_statements(hypotheses) - except Exception as e: - logger.error( - f"Error removing trivial statements: {e}. Proceeding with all statements." - ) + + hypotheses = self._remove_trivial_statements(hypotheses) output_space = self._determine_output_space( min_score_val, max_score_val