BIG-Bench Hard
The BIG-Bench Hard (BBH) benchmark comprises 23 challenging BIG-Bench tasks where prior language model evaluations have not outperformed the average human rater. BBH evaluates models using both few-shot and chain-of-thought (CoT) prompting techniques. For more details, you can visit the BIG-Bench Hard GitHub page.
Arguments
There are THREE optional arguments when using the BigBenchHard benchmark:
- [Optional]
tasks: a list of tasks (BigBenchHardTaskenums), which specifies the subject areas for model evaluation. By default, this is set to all tasks. The list ofBigBenchHardTaskenums can be found here. - [Optional]
n_shots: the number of "shots" to use for few-shot learning. This number ranges strictly from 0-3, and is set to 3 by default. - [Optional]
enable_cot: a boolean that determines if CoT prompting is used for evaluation. This is set toTrueby default.
Usage
The code below assesses a custom mistral_7b model (click here to learn how to use ANY custom LLM) on Boolean Expressions and Causal Judgement in BigBenchHard using 3-shot CoT prompting.
from deepeval.benchmarks import BigBenchHard
from deepeval.benchmarks.tasks import BigBenchHardTask
# Define benchmark with specific tasks and shots
benchmark = BigBenchHard(
tasks=[BigBenchHardTask.BOOLEAN_EXPRESSIONS, BigBenchHardTask.CAUSAL_JUDGEMENT],
n_shots=3,
enable_cot=True
)
# Replace 'mistral_7b' with your own custom model
benchmark.evaluate(model=mistral_7b)
print(benchmark.overall_score)The overall_score for this benchmark ranges from 0 to 1, which is the proportion of total correct predictions according to the target labels for each respective task. The exact match scorer is used for BIG-Bench Hard.
BBH answers exhibit a greater variety of answers compared to benchmarks that use multiple-choice questions, since different tasks in BBH require different types of outputs (for example, boolean values in boolean expression tasks versus numbers in arithmetic tasks). To enhance benchmark performance, employing CoT prompting will prove to be extremely helpful.
BIG-Bench Hard Tasks
The BigBenchHardTask enum classifies the diverse range of tasks covered in the BIG-Bench Hard benchmark.
from deepeval.benchmarks.tasks import BigBenchHardTask
big_tasks = [BigBenchHardTask.BOOLEAN_EXPRESSIONS]Below is the comprehensive list of available tasks:
BOOLEAN_EXPRESSIONSCAUSAL_JUDGEMENTDATE_UNDERSTANDINGDISAMBIGUATION_QADYCK_LANGUAGESFORMAL_FALLACIESGEOMETRIC_SHAPESHYPERBATONLOGICAL_DEDUCTION_FIVE_OBJECTSLOGICAL_DEDUCTION_SEVEN_OBJECTSLOGICAL_DEDUCTION_THREE_OBJECTSMOVIE_RECOMMENDATIONMULTISTEP_ARITHMETIC_TWONAVIGATEOBJECT_COUNTINGPENGUINS_IN_A_TABLEREASONING_ABOUT_COLORED_OBJECTSRUIN_NAMESSALIENT_TRANSLATION_ERROR_DETECTIONSNARKSSPORTS_UNDERSTANDINGTEMPORAL_SEQUENCESTRACKING_SHUFFLED_OBJECTS_FIVE_OBJECTSTRACKING_SHUFFLED_OBJECTS_SEVEN_OBJECTSTRACKING_SHUFFLED_OBJECTS_THREE_OBJECTSWEB_OF_LIESWORD_SORTING
FAQs
What does the BigBenchHard benchmark measure?
BigBenchHard evaluates models using both few-shot and chain-of-thought (CoT) prompting techniques.Which tasks can I run with BigBenchHard?
BigBenchHardTask enums to the tasks argument, for example BOOLEAN_EXPRESSIONS or CAUSAL_JUDGEMENT. By default, all 23 tasks are evaluated.How is BigBenchHard scored?
overall_score ranges from 0 to 1 and is the proportion of total correct predictions according to the target labels for each task. The exact match scorer is used, even though BBH answers vary widely (e.g. booleans for boolean expression tasks versus numbers for arithmetic tasks). See the benchmarks introduction for more on scoring.What is the default n_shots for BigBenchHard?
n_shots argument ranges strictly from 0-3 and is set to 3 by default. Using more few-shot examples can improve the model's robustness in generating answers in the exact correct format.Does BigBenchHard support chain-of-thought prompting?
enable_cot argument is a boolean that determines whether CoT prompting is used, and it is set to True by default. Employing CoT prompting is extremely helpful for boosting benchmark performance on BBH.How do I run BigBenchHard on a custom LLM?
DeepEvalBaseLLM, create a benchmark with BigBenchHard(tasks=[...], n_shots=3, enable_cot=True), and call benchmark.evaluate(model=mistral_7b) before reading benchmark.overall_score. See the benchmarking guide for using any custom LLM.