def generate_test_set(
        self,
        test_breadth: int,
        test_depth: int,
        examples: Optional[list] = None,
    ) -> dict:
        """
        Generate a test set, optionally using few shot examples provided.

        Args:
            test_breadth (int): The breadth of the test set.
            test_depth (int): The depth of the test set.
            examples (Optional[list]): An optional list of examples to guide the style of the questions.

        Returns:
            dict: A dictionary containing the test set.

        Example:
            ```python
            # Instantiate GenerateTestSet with your app callable, in this case: rag_chain.invoke
            test = GenerateTestSet(app_callable = rag_chain.invoke)

            # Generate the test set of a specified breadth and depth without examples
            test_set = test.generate_test_set(test_breadth = 3, test_depth = 2)

            # Generate the test set of a specified breadth and depth with examples
            examples = ["Why is it hard for AI to plan very far into the future?", "How could letting AI reflect on what went wrong help it improve in the future?"]
            test_set_with_examples = test.generate_test_set(test_breadth = 3, test_depth = 2, examples = examples)
            ```
        """
        logger.info("Generating test set...")
        retry_count = 0
        while retry_count < 3:
            try:
                themes = self._generate_themes(test_breadth=test_breadth)
                test_categories = self._format_themes(
                    themes=themes, test_breadth=test_breadth
                )
                test_set = {}
                for test_category in test_categories:
                    if examples:
                        test_set[test_category] = (
                            self._generate_and_format_test_prompts(
                                test_category, test_depth, examples
                            )
                        )
                    else:
                        test_set[test_category] = (
                            self._generate_and_format_test_prompts(
                                test_category, test_depth
                            )
                        )
                return test_set
            except Exception as e:
                logger.error(f"Error generating test set: {e}")
                retry_count += 1
        raise Exception("Failed to generate test set after 3 attempts")

        Generate a test set, optionally using few shot examples provided.

        Args:
            test_breadth (int): The breadth of the test set.
            test_depth (int): The depth of the test set.
            examples (Optional[list]): An optional list of examples to guide the style of the questions.

        Returns:
            dict: A dictionary containing the test set.

        Example:
            ```python
            # Instantiate GenerateTestSet with your app callable, in this case: rag_chain.invoke
            test = GenerateTestSet(app_callable = rag_chain.invoke)

            # Generate the test set of a specified breadth and depth without examples
            test_set = test.generate_test_set(test_breadth = 3, test_depth = 2)

            # Generate the test set of a specified breadth and depth with examples
            examples = ["Why is it hard for AI to plan very far into the future?", "How could letting AI reflect on what went wrong help it improve in the future?"]
            test_set_with_examples = test.generate_test_set(test_breadth = 3, test_depth = 2, examples = examples)
            ```
        
src/benchmark/trulens/benchmark/generate/generate_test_set.py