{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"bigcodebench","formal_name":"BigCodeBench","introduction":"BigCodeBench poses 1,140 function-level tasks drawn across 139 libraries. It tests whether a model can compose several real APIs correctly rather than write one self-contained function.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://bigcode-bench.github.io/","indexing_mode":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"4eedb879-14f6-548a-8a04-84fa99c061bf","task_key":"default--v0~2e1~2e0~5fhf--4eedb879-14f6-548a-8a04-84fa99c061bf","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 4eedb879-14f6-548a-8a04-84fa99c061bf","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import random\\nimport string\\ndef task_func(length: int, predicates: list, seed: int = None):\\n\",\"complete_prompt\":\"import random\\nimport string\\n\\n\\ndef task_func(length: int, predicates: list, seed: int = None):\\n    \\\"\\\"\\\"\\n    Generates a random string of specified length and evaluates it for specific characteristics.\\n\\n    Parameters:\\n    - length (int): Desired length of the generated string.\\n    - predicates (list of strings): Conditions to evaluate the string.\\n        Must contain options from 'has_uppercase', 'has_lowercase', 'has_special_chars', 'has_numbers'.\\n    - seed (int, optional): Seed for the random number generator for reproducibility.\\n\\n    Returns:\\n    - tuple:\\n        - string: the generated random text\\n        - dict: the text's characteristics\\n\\n    Raises:\\n    - ValueError: If the specified length is negative.\\n    - KeyError: If any predicate is not recognized.\\n\\n    Notes:\\n    - Predicates are deduplicated.\\n    - Characters are randomly sampled from string ascii_letters, digits, and punctuation with replacement.\\n    - Any invalid predicates provided will result in a KeyError.\\n    - If no predicates are provided, the result dictionary will be empty.\\n\\n    Requirements:\\n    - string\\n    - random\\n\\n    Example:\\n    >>> task_func(10, ['has_uppercase', 'has_numbers'], seed=42)[0]\\n    '8czu(\\\"@iNc'\\n    >>> task_func(5, ['has_lowercase'], seed=123)\\n    ('eiMk[', {'has_lowercase': True})\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generates a random string of specified length and evaluates it for specific characteristics.\\nNote that: Notes: Predicates are deduplicated. Characters are randomly sampled from string ascii_letters, digits, and punctuation with replacement. Any invalid predicates provided will result in a KeyError. If no predicates are provided, the result dictionary will be empty.\\nThe function should raise the exception for: ValueError: If the specified length is negative. KeyError: If any predicate is not recognized.\\nThe function should output with:\\n    tuple:\\n    string: the generated random text\\n    dict: the text's characteristics\\nYou should write self-contained code starting with:\\n```\\nimport random\\nimport string\\ndef task_func(length: int, predicates: list, seed: int = None):\\n```\",\"libs\":\"['random', 'string']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}