def run()

in yourbench/analysis/view_sample_questions.py [0:0]


def run(*cli_args: List[str]) -> None:
    """
    Usage:
        yourbench analyze view_sample_questions path/to/config.yaml [sample_size]

    This command loads up to 'sample_size' questions from both
    'single_shot_questions' and 'multi_hop_questions' subsets, then prints
    them in a Rich table showing relevant details:
      - Question Type
      - Actual Question
      - Answer (or multiple-choice correct letter)
      - Choices (if any)
      - Difficulty
      - Citations (if any)

    Args:
        *cli_args: The CLI arguments passed after 'view_sample_questions'
                   e.g. ["my_config.yaml", "5"]
    """
    if not cli_args:
        logger.error("No arguments provided. Usage: yourbench analyze view_sample_questions CONFIG_PATH [SAMPLE_SIZE]")
        return

    config_path = cli_args[0]
    sample_size = int(cli_args[1]) if len(cli_args) > 1 and cli_args[1].isdigit() else 5

    try:
        config = load_config(config_path)
    except FileNotFoundError:
        logger.error(f"Configuration file not found at '{config_path}'. Aborting.")
        return
    except Exception as e:
        logger.error(f"Failed to load config from '{config_path}': {e}")
        return

    loader = QuestionLoader(config, sample_size)
    display = QuestionDisplay(Console())

    # Display single-shot questions
    single_shot_questions = loader.load_questions("single_shot_questions")
    display.display_questions(single_shot_questions, "Single-Shot Questions (Detailed)", "bold magenta")

    # Display multi-hop questions
    multi_hop_questions = loader.load_questions("multi_hop_questions")
    display.display_questions(multi_hop_questions, "Multi-Hop Questions (Detailed)", "bold green")