def generate_score_and_reasons(
        self,
        system_prompt: str,
        user_prompt: Optional[str] = None,
        min_score_val: int = 0,
        max_score_val: int = 3,
        temperature: float = 0.0,
    ) -> Union[float, Tuple[float, Dict]]:
        """
        Base method to generate a score and reason, used for evaluation.

        Args:
            system_prompt: A pre-formatted system prompt.
            user_prompt: An optional user prompt.
            min_score_val: The minimum score value. Default is 0.
            max_score_val: The maximum score value. Default is 3.
            temperature: The temperature value for LLM score generation. Default is 0.0.

        Returns:
            The score on a 0-1 scale.

            Reason metadata if returned by the LLM.
        """

        if temperature != 0.0:
            logger.warning(
                "The `temperature` argument is ignored for Bedrock provider."
            )

        llm_messages = [{"role": "system", "content": system_prompt}]
        if user_prompt is not None:
            llm_messages.append({"role": "user", "content": user_prompt})

        response = self.endpoint.run_in_pace(
            func=self._create_chat_completion, messages=llm_messages
        )
        if "Supporting Evidence" in response:
            score = 0.0
            supporting_evidence = None
            criteria = None
            for line in response.split("\n"):
                if "Score" in line:
                    score = (
                        feedback_generated.re_configured_rating(
                            line,
                            min_score_val=min_score_val,
                            max_score_val=max_score_val,
                        )
                        - min_score_val
                    ) / (max_score_val - min_score_val)
                if "Criteria" in line:
                    parts = line.split(":")
                    if len(parts) > 1:
                        criteria = ":".join(parts[1:]).strip()
                if "Supporting Evidence" in line:
                    supporting_evidence = line[
                        line.index("Supporting Evidence:")
                        + len("Supporting Evidence:") :
                    ].strip()
            reasons = {
                "reason": (
                    f"{'Criteria: ' + str(criteria)}\n"
                    f"{'Supporting Evidence: ' + str(supporting_evidence)}"
                )
            }
            return score, reasons
        else:
            return (
                feedback_generated.re_configured_rating(
                    response,
                    min_score_val=min_score_val,
                    max_score_val=max_score_val,
                )
                - min_score_val
            ) / (max_score_val - min_score_val)

        Base method to generate a score and reason, used for evaluation.

        Args:
            system_prompt: A pre-formatted system prompt.
            user_prompt: An optional user prompt.
            min_score_val: The minimum score value. Default is 0.
            max_score_val: The maximum score value. Default is 3.
            temperature: The temperature value for LLM score generation. Default is 0.0.

        Returns:
            The score on a 0-1 scale.

            Reason metadata if returned by the LLM.
        
src/providers/bedrock/trulens/providers/bedrock/provider.py