Unverified Commit aa2dd2b5 authored by Fengzhe Zhou's avatar Fengzhe Zhou Committed by GitHub
Browse files

[Format] Add config lints (#892)

parent 3dbba119
......@@ -4,10 +4,10 @@ from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.datasets import LVEvalOPTF1Evaluator, LVEvalcmrcDataset
LVEval_cmrc_mixup_reader_cfg = dict(
input_columns=["context", "input"],
output_column="answers",
train_split="test",
test_split="test",
input_columns=['context', 'input'],
output_column='answers',
train_split='test',
test_split='test',
)
LVEval_cmrc_mixup_infer_cfg = dict(
......@@ -16,8 +16,8 @@ LVEval_cmrc_mixup_infer_cfg = dict(
template=dict(
round=[
dict(
role="HUMAN",
prompt="请根据下面给定的文章回答问题,问题和答案只与其中一篇文章有关。\n\n文章:{context}\n\n现在请基于上述文章回答下面的问题,问题和答案只与其中一篇文章有关。\n\n问题:{input}\n回答:",
role='HUMAN',
prompt='请根据下面给定的文章回答问题,问题和答案只与其中一篇文章有关。\n\n文章:{context}\n\n现在请基于上述文章回答下面的问题,问题和答案只与其中一篇文章有关。\n\n问题:{input}\n回答:',
),
],
),
......@@ -27,28 +27,28 @@ LVEval_cmrc_mixup_infer_cfg = dict(
)
LVEval_cmrc_mixup_eval_cfg = dict(
evaluator=dict(type=LVEvalOPTF1Evaluator, language="zh"), pred_role="BOT"
evaluator=dict(type=LVEvalOPTF1Evaluator, language='zh'), pred_role='BOT'
)
DATASET_LENGTH_LEVEL = ["16k", "32k", "64k", "128k", "256k"]
DATASET_LENGTH_LEVEL = ['16k', '32k', '64k', '128k', '256k']
def get_dataset_names(dataset_name, length_levels):
datasets = []
for length in length_levels:
datasets.append(f"{dataset_name}_{length}")
datasets.append(f'{dataset_name}_{length}')
return datasets
LVEval_cmrc_mixup_datasets = [
dict(
type=LVEvalcmrcDataset,
abbr="LVEval_" + name_len,
path="Infinigence/LVEval",
abbr='LVEval_' + name_len,
path='Infinigence/LVEval',
name=name_len,
reader_cfg=LVEval_cmrc_mixup_reader_cfg,
infer_cfg=LVEval_cmrc_mixup_infer_cfg,
eval_cfg=LVEval_cmrc_mixup_eval_cfg,
)
for name_len in get_dataset_names("cmrc_mixup", DATASET_LENGTH_LEVEL)
for name_len in get_dataset_names('cmrc_mixup', DATASET_LENGTH_LEVEL)
]
......@@ -4,10 +4,10 @@ from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.datasets import LVEvalOPTRougeEvaluator, LVEvaldureaderDataset
LVEval_dureader_mixup_reader_cfg = dict(
input_columns=["context", "input"],
output_column="answers",
train_split="test",
test_split="test",
input_columns=['context', 'input'],
output_column='answers',
train_split='test',
test_split='test',
)
LVEval_dureader_mixup_infer_cfg = dict(
......@@ -16,8 +16,8 @@ LVEval_dureader_mixup_infer_cfg = dict(
template=dict(
round=[
dict(
role="HUMAN",
prompt="请根据下面给定的文章回答问题,问题和答案只与其中一篇文章有关。\n\n文章:{context}\n\n现在请基于上述文章回答下面的问题,问题和答案只与其中一篇文章有关。\n\n问题:{input}\n回答:",
role='HUMAN',
prompt='请根据下面给定的文章回答问题,问题和答案只与其中一篇文章有关。\n\n文章:{context}\n\n现在请基于上述文章回答下面的问题,问题和答案只与其中一篇文章有关。\n\n问题:{input}\n回答:',
),
],
),
......@@ -27,29 +27,29 @@ LVEval_dureader_mixup_infer_cfg = dict(
)
LVEval_dureader_mixup_eval_cfg = dict(
evaluator=dict(type=LVEvalOPTRougeEvaluator, language="zh"),
pred_role="BOT",
evaluator=dict(type=LVEvalOPTRougeEvaluator, language='zh'),
pred_role='BOT',
)
DATASET_LENGTH_LEVEL = ["16k", "32k", "64k", "128k", "256k"]
DATASET_LENGTH_LEVEL = ['16k', '32k', '64k', '128k', '256k']
def get_dataset_names(dataset_name, length_levels):
datasets = []
for length in length_levels:
datasets.append(f"{dataset_name}_{length}")
datasets.append(f'{dataset_name}_{length}')
return datasets
LVEval_dureader_mixup_datasets = [
dict(
type=LVEvaldureaderDataset,
abbr="LVEval_" + name_len,
path="Infinigence/LVEval",
abbr='LVEval_' + name_len,
path='Infinigence/LVEval',
name=name_len,
reader_cfg=LVEval_dureader_mixup_reader_cfg,
infer_cfg=LVEval_dureader_mixup_infer_cfg,
eval_cfg=LVEval_dureader_mixup_eval_cfg,
)
for name_len in get_dataset_names("dureader_mixup", DATASET_LENGTH_LEVEL)
for name_len in get_dataset_names('dureader_mixup', DATASET_LENGTH_LEVEL)
]
......@@ -4,10 +4,10 @@ from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.datasets import LVEvalF1Evaluator, LVEvalfactrecallenDataset
LVEval_factrecall_en_reader_cfg = dict(
input_columns=["context", "input"],
output_column="answers",
train_split="test",
test_split="test",
input_columns=['context', 'input'],
output_column='answers',
train_split='test',
test_split='test',
)
LVEval_factrecall_en_infer_cfg = dict(
......@@ -16,8 +16,8 @@ LVEval_factrecall_en_infer_cfg = dict(
template=dict(
round=[
dict(
role="HUMAN",
prompt="Please answer the following questions based on the given article.\n\nArticle: {context}\n\nPlease answer the following questions based on the above article.\n\nQuestion: {input}\nAnswer:",
role='HUMAN',
prompt='Please answer the following questions based on the given article.\n\nArticle: {context}\n\nPlease answer the following questions based on the above article.\n\nQuestion: {input}\nAnswer:',
),
],
),
......@@ -27,28 +27,28 @@ LVEval_factrecall_en_infer_cfg = dict(
)
LVEval_factrecall_en_eval_cfg = dict(
evaluator=dict(type=LVEvalF1Evaluator, language="en"), pred_role="BOT"
evaluator=dict(type=LVEvalF1Evaluator, language='en'), pred_role='BOT'
)
DATASET_LENGTH_LEVEL = ["16k", "32k", "64k", "128k", "256k"]
DATASET_LENGTH_LEVEL = ['16k', '32k', '64k', '128k', '256k']
def get_dataset_names(dataset_name, length_levels):
datasets = []
for length in length_levels:
datasets.append(f"{dataset_name}_{length}")
datasets.append(f'{dataset_name}_{length}')
return datasets
LVEval_factrecall_en_datasets = [
dict(
type=LVEvalfactrecallenDataset,
abbr="LVEval_" + name_len,
path="Infinigence/LVEval",
abbr='LVEval_' + name_len,
path='Infinigence/LVEval',
name=name_len,
reader_cfg=LVEval_factrecall_en_reader_cfg,
infer_cfg=LVEval_factrecall_en_infer_cfg,
eval_cfg=LVEval_factrecall_en_eval_cfg,
)
for name_len in get_dataset_names("factrecall_en", DATASET_LENGTH_LEVEL)
for name_len in get_dataset_names('factrecall_en', DATASET_LENGTH_LEVEL)
]
......@@ -4,10 +4,10 @@ from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.datasets import LVEvalF1Evaluator, LVEvalfactrecallzhDataset
LVEval_factrecall_zh_reader_cfg = dict(
input_columns=["context", "input"],
output_column="answers",
train_split="test",
test_split="test",
input_columns=['context', 'input'],
output_column='answers',
train_split='test',
test_split='test',
)
LVEval_factrecall_zh_infer_cfg = dict(
......@@ -16,8 +16,8 @@ LVEval_factrecall_zh_infer_cfg = dict(
template=dict(
round=[
dict(
role="HUMAN",
prompt="请基于给定的文章回答下述问题。\n\n文章:{context}\n\n现在请基于上述文章回答下面的问题。\n\n问题:{input}\n回答:",
role='HUMAN',
prompt='请基于给定的文章回答下述问题。\n\n文章:{context}\n\n现在请基于上述文章回答下面的问题。\n\n问题:{input}\n回答:',
),
],
),
......@@ -27,28 +27,28 @@ LVEval_factrecall_zh_infer_cfg = dict(
)
LVEval_factrecall_zh_eval_cfg = dict(
evaluator=dict(type=LVEvalF1Evaluator, language="zh"), pred_role="BOT"
evaluator=dict(type=LVEvalF1Evaluator, language='zh'), pred_role='BOT'
)
DATASET_LENGTH_LEVEL = ["16k", "32k", "64k", "128k", "256k"]
DATASET_LENGTH_LEVEL = ['16k', '32k', '64k', '128k', '256k']
def get_dataset_names(dataset_name, length_levels):
datasets = []
for length in length_levels:
datasets.append(f"{dataset_name}_{length}")
datasets.append(f'{dataset_name}_{length}')
return datasets
LVEval_factrecall_zh_datasets = [
dict(
type=LVEvalfactrecallzhDataset,
abbr="LVEval_" + name_len,
path="Infinigence/LVEval",
abbr='LVEval_' + name_len,
path='Infinigence/LVEval',
name=name_len,
reader_cfg=LVEval_factrecall_zh_reader_cfg,
infer_cfg=LVEval_factrecall_zh_infer_cfg,
eval_cfg=LVEval_factrecall_zh_eval_cfg,
)
for name_len in get_dataset_names("factrecall_zh", DATASET_LENGTH_LEVEL)
for name_len in get_dataset_names('factrecall_zh', DATASET_LENGTH_LEVEL)
]
......@@ -7,10 +7,10 @@ from opencompass.datasets import (
)
LVEval_hotpotwikiqa_mixup_reader_cfg = dict(
input_columns=["context", "input"],
output_column="answers",
train_split="test",
test_split="test",
input_columns=['context', 'input'],
output_column='answers',
train_split='test',
test_split='test',
)
LVEval_hotpotwikiqa_mixup_infer_cfg = dict(
......@@ -19,8 +19,8 @@ LVEval_hotpotwikiqa_mixup_infer_cfg = dict(
template=dict(
round=[
dict(
role="HUMAN",
prompt="Answer the question based on the given passages. Questions and answers are only relevant to some passages. Only give me the answer and do not output any other explanation and evidence.\n\nArticle: {context}\n\nPlease answer the following question based on the above passages. Questions and answers are only relevant to some passages. Only give me the answer and do not output any other explanation and evidence.\n\nQuestion: {input}\nAnswer:",
role='HUMAN',
prompt='Answer the question based on the given passages. Questions and answers are only relevant to some passages. Only give me the answer and do not output any other explanation and evidence.\n\nArticle: {context}\n\nPlease answer the following question based on the above passages. Questions and answers are only relevant to some passages. Only give me the answer and do not output any other explanation and evidence.\n\nQuestion: {input}\nAnswer:',
),
],
),
......@@ -30,30 +30,30 @@ LVEval_hotpotwikiqa_mixup_infer_cfg = dict(
)
LVEval_hotpotwikiqa_mixup_eval_cfg = dict(
evaluator=dict(type=LVEvalOPTF1Evaluator, language="en"), pred_role="BOT"
evaluator=dict(type=LVEvalOPTF1Evaluator, language='en'), pred_role='BOT'
)
DATASET_LENGTH_LEVEL = ["16k", "32k", "64k", "128k", "256k"]
DATASET_LENGTH_LEVEL = ['16k', '32k', '64k', '128k', '256k']
def get_dataset_names(dataset_name, length_levels):
datasets = []
for length in length_levels:
datasets.append(f"{dataset_name}_{length}")
datasets.append(f'{dataset_name}_{length}')
return datasets
LVEval_hotpotwikiqa_mixup_datasets = [
dict(
type=LVEvalhotpotwikiqaDataset,
abbr="LVEval_" + name_len,
path="Infinigence/LVEval",
abbr='LVEval_' + name_len,
path='Infinigence/LVEval',
name=name_len,
reader_cfg=LVEval_hotpotwikiqa_mixup_reader_cfg,
infer_cfg=LVEval_hotpotwikiqa_mixup_infer_cfg,
eval_cfg=LVEval_hotpotwikiqa_mixup_eval_cfg,
)
for name_len in get_dataset_names(
"hotpotwikiqa_mixup", DATASET_LENGTH_LEVEL
'hotpotwikiqa_mixup', DATASET_LENGTH_LEVEL
)
]
......@@ -4,10 +4,10 @@ from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.datasets import LVEvalOPTF1Evaluator, LVEvallicDataset
LVEval_lic_mixup_reader_cfg = dict(
input_columns=["context", "input"],
output_column="answers",
train_split="test",
test_split="test",
input_columns=['context', 'input'],
output_column='answers',
train_split='test',
test_split='test',
)
LVEval_lic_mixup_infer_cfg = dict(
......@@ -16,8 +16,8 @@ LVEval_lic_mixup_infer_cfg = dict(
template=dict(
round=[
dict(
role="HUMAN",
prompt="请根据下面给定的文章回答问题,问题和答案只与其中一篇文章有关。\n\n文章:{context}\n\n请现在基于上述文章回答下面的问题,问题和答案只与其中一篇文章有关。\n\n问题:{input}\n回答:",
role='HUMAN',
prompt='请根据下面给定的文章回答问题,问题和答案只与其中一篇文章有关。\n\n文章:{context}\n\n请现在基于上述文章回答下面的问题,问题和答案只与其中一篇文章有关。\n\n问题:{input}\n回答:',
),
],
),
......@@ -27,28 +27,28 @@ LVEval_lic_mixup_infer_cfg = dict(
)
LVEval_lic_mixup_eval_cfg = dict(
evaluator=dict(type=LVEvalOPTF1Evaluator, language="zh"), pred_role="BOT"
evaluator=dict(type=LVEvalOPTF1Evaluator, language='zh'), pred_role='BOT'
)
DATASET_LENGTH_LEVEL = ["16k", "32k", "64k", "128k", "256k"]
DATASET_LENGTH_LEVEL = ['16k', '32k', '64k', '128k', '256k']
def get_dataset_names(dataset_name, length_levels):
datasets = []
for length in length_levels:
datasets.append(f"{dataset_name}_{length}")
datasets.append(f'{dataset_name}_{length}')
return datasets
LVEval_lic_mixup_datasets = [
dict(
type=LVEvallicDataset,
abbr="LVEval_" + name_len,
path="Infinigence/LVEval",
abbr='LVEval_' + name_len,
path='Infinigence/LVEval',
name=name_len,
reader_cfg=LVEval_lic_mixup_reader_cfg,
infer_cfg=LVEval_lic_mixup_infer_cfg,
eval_cfg=LVEval_lic_mixup_eval_cfg,
)
for name_len in get_dataset_names("lic_mixup", DATASET_LENGTH_LEVEL)
for name_len in get_dataset_names('lic_mixup', DATASET_LENGTH_LEVEL)
]
......@@ -4,10 +4,10 @@ from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.datasets import LVEvalOPTF1Evaluator, LVEvallooglecrDataset
LVEval_loogle_CR_mixup_reader_cfg = dict(
input_columns=["context", "input"],
output_column="answers",
train_split="test",
test_split="test",
input_columns=['context', 'input'],
output_column='answers',
train_split='test',
test_split='test',
)
LVEval_loogle_CR_mixup_infer_cfg = dict(
......@@ -16,8 +16,8 @@ LVEval_loogle_CR_mixup_infer_cfg = dict(
template=dict(
round=[
dict(
role="HUMAN",
prompt="Please answer the following question based on the given passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nArticle: {context}\n\nPlease answer the following question based on the above passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nQuestion: {input}\nAnswer:",
role='HUMAN',
prompt='Please answer the following question based on the given passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nArticle: {context}\n\nPlease answer the following question based on the above passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nQuestion: {input}\nAnswer:',
),
],
),
......@@ -27,28 +27,28 @@ LVEval_loogle_CR_mixup_infer_cfg = dict(
)
LVEval_loogle_CR_mixup_eval_cfg = dict(
evaluator=dict(type=LVEvalOPTF1Evaluator, language="en"), pred_role="BOT"
evaluator=dict(type=LVEvalOPTF1Evaluator, language='en'), pred_role='BOT'
)
DATASET_LENGTH_LEVEL = ["16k", "32k", "64k", "128k", "256k"]
DATASET_LENGTH_LEVEL = ['16k', '32k', '64k', '128k', '256k']
def get_dataset_names(dataset_name, length_levels):
datasets = []
for length in length_levels:
datasets.append(f"{dataset_name}_{length}")
datasets.append(f'{dataset_name}_{length}')
return datasets
LVEval_loogle_CR_mixup_datasets = [
dict(
type=LVEvallooglecrDataset,
abbr="LVEval_" + name_len,
path="Infinigence/LVEval",
abbr='LVEval_' + name_len,
path='Infinigence/LVEval',
name=name_len,
reader_cfg=LVEval_loogle_CR_mixup_reader_cfg,
infer_cfg=LVEval_loogle_CR_mixup_infer_cfg,
eval_cfg=LVEval_loogle_CR_mixup_eval_cfg,
)
for name_len in get_dataset_names("loogle_CR_mixup", DATASET_LENGTH_LEVEL)
for name_len in get_dataset_names('loogle_CR_mixup', DATASET_LENGTH_LEVEL)
]
......@@ -4,10 +4,10 @@ from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.datasets import LVEvalOPTF1Evaluator, LVEvallooglemirDataset
LVEval_loogle_MIR_mixup_reader_cfg = dict(
input_columns=["context", "input"],
output_column="answers",
train_split="test",
test_split="test",
input_columns=['context', 'input'],
output_column='answers',
train_split='test',
test_split='test',
)
LVEval_loogle_MIR_mixup_infer_cfg = dict(
......@@ -16,8 +16,8 @@ LVEval_loogle_MIR_mixup_infer_cfg = dict(
template=dict(
round=[
dict(
role="HUMAN",
prompt="Please answer the following question based on the given passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nArticle: {context}\n\nPlease answer the following question based on the above passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nQuestion: {input}\nAnswer:",
role='HUMAN',
prompt='Please answer the following question based on the given passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nArticle: {context}\n\nPlease answer the following question based on the above passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nQuestion: {input}\nAnswer:',
),
],
),
......@@ -27,28 +27,28 @@ LVEval_loogle_MIR_mixup_infer_cfg = dict(
)
LVEval_loogle_MIR_mixup_eval_cfg = dict(
evaluator=dict(type=LVEvalOPTF1Evaluator, language="en"), pred_role="BOT"
evaluator=dict(type=LVEvalOPTF1Evaluator, language='en'), pred_role='BOT'
)
DATASET_LENGTH_LEVEL = ["16k", "32k", "64k", "128k", "256k"]
DATASET_LENGTH_LEVEL = ['16k', '32k', '64k', '128k', '256k']
def get_dataset_names(dataset_name, length_levels):
datasets = []
for length in length_levels:
datasets.append(f"{dataset_name}_{length}")
datasets.append(f'{dataset_name}_{length}')
return datasets
LVEval_loogle_MIR_mixup_datasets = [
dict(
type=LVEvallooglemirDataset,
abbr="LVEval_" + name_len,
path="Infinigence/LVEval",
abbr='LVEval_' + name_len,
path='Infinigence/LVEval',
name=name_len,
reader_cfg=LVEval_loogle_MIR_mixup_reader_cfg,
infer_cfg=LVEval_loogle_MIR_mixup_infer_cfg,
eval_cfg=LVEval_loogle_MIR_mixup_eval_cfg,
)
for name_len in get_dataset_names("loogle_MIR_mixup", DATASET_LENGTH_LEVEL)
for name_len in get_dataset_names('loogle_MIR_mixup', DATASET_LENGTH_LEVEL)
]
......@@ -4,10 +4,10 @@ from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.datasets import LVEvalOPTF1Evaluator, LVEvallooglesdDataset
LVEval_loogle_SD_mixup_reader_cfg = dict(
input_columns=["context", "input"],
output_column="answers",
train_split="test",
test_split="test",
input_columns=['context', 'input'],
output_column='answers',
train_split='test',
test_split='test',
)
LVEval_loogle_SD_mixup_infer_cfg = dict(
......@@ -16,8 +16,8 @@ LVEval_loogle_SD_mixup_infer_cfg = dict(
template=dict(
round=[
dict(
role="HUMAN",
prompt="Please answer the following question based on the given passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nArticle: {context}\n\nPlease answer the following question based on the above passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nQuestion: {input}\nAnswer:",
role='HUMAN',
prompt='Please answer the following question based on the given passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nArticle: {context}\n\nPlease answer the following question based on the above passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nQuestion: {input}\nAnswer:',
),
],
),
......@@ -27,28 +27,28 @@ LVEval_loogle_SD_mixup_infer_cfg = dict(
)
LVEval_loogle_SD_mixup_eval_cfg = dict(
evaluator=dict(type=LVEvalOPTF1Evaluator, language="en"), pred_role="BOT"
evaluator=dict(type=LVEvalOPTF1Evaluator, language='en'), pred_role='BOT'
)
DATASET_LENGTH_LEVEL = ["16k", "32k", "64k", "128k", "256k"]
DATASET_LENGTH_LEVEL = ['16k', '32k', '64k', '128k', '256k']
def get_dataset_names(dataset_name, length_levels):
datasets = []
for length in length_levels:
datasets.append(f"{dataset_name}_{length}")
datasets.append(f'{dataset_name}_{length}')
return datasets
LVEval_loogle_SD_mixup_datasets = [
dict(
type=LVEvallooglesdDataset,
abbr="LVEval_" + name_len,
path="Infinigence/LVEval",
abbr='LVEval_' + name_len,
path='Infinigence/LVEval',
name=name_len,
reader_cfg=LVEval_loogle_SD_mixup_reader_cfg,
infer_cfg=LVEval_loogle_SD_mixup_infer_cfg,
eval_cfg=LVEval_loogle_SD_mixup_eval_cfg,
)
for name_len in get_dataset_names("loogle_SD_mixup", DATASET_LENGTH_LEVEL)
for name_len in get_dataset_names('loogle_SD_mixup', DATASET_LENGTH_LEVEL)
]
......@@ -7,10 +7,10 @@ from opencompass.datasets import (
)
LVEval_multifieldqa_en_mixup_reader_cfg = dict(
input_columns=["context", "input"],
output_column="answers",
train_split="test",
test_split="test",
input_columns=['context', 'input'],
output_column='answers',
train_split='test',
test_split='test',
)
LVEval_multifieldqa_en_mixup_infer_cfg = dict(
......@@ -19,8 +19,8 @@ LVEval_multifieldqa_en_mixup_infer_cfg = dict(
template=dict(
round=[
dict(
role="HUMAN",
prompt="Please answer the following question based on the given passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nArticle: {context}\n\nPlease answer the following question based on the above passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nQuestion: {input}\nAnswer:",
role='HUMAN',
prompt='Please answer the following question based on the given passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nArticle: {context}\n\nPlease answer the following question based on the above passages. Questions and answers are only relevant to one passage. Only give me the answer and do not output any other explanation and evidence.\n\nQuestion: {input}\nAnswer:',
),
],
),
......@@ -30,30 +30,30 @@ LVEval_multifieldqa_en_mixup_infer_cfg = dict(
)
LVEval_multifieldqa_en_mixup_eval_cfg = dict(
evaluator=dict(type=LVEvalOPTF1Evaluator, language="en"), pred_role="BOT"
evaluator=dict(type=LVEvalOPTF1Evaluator, language='en'), pred_role='BOT'
)
DATASET_LENGTH_LEVEL = ["16k", "32k", "64k", "128k", "256k"]
DATASET_LENGTH_LEVEL = ['16k', '32k', '64k', '128k', '256k']
def get_dataset_names(dataset_name, length_levels):
datasets = []
for length in length_levels:
datasets.append(f"{dataset_name}_{length}")
datasets.append(f'{dataset_name}_{length}')
return datasets
LVEval_multifieldqa_en_mixup_datasets = [
dict(
type=LVEvalmultifieldqaenDataset,
abbr="LVEval_" + name_len,
path="Infinigence/LVEval",
abbr='LVEval_' + name_len,
path='Infinigence/LVEval',
name=name_len,
reader_cfg=LVEval_multifieldqa_en_mixup_reader_cfg,
infer_cfg=LVEval_multifieldqa_en_mixup_infer_cfg,
eval_cfg=LVEval_multifieldqa_en_mixup_eval_cfg,
)
for name_len in get_dataset_names(
"multifieldqa_en_mixup", DATASET_LENGTH_LEVEL
'multifieldqa_en_mixup', DATASET_LENGTH_LEVEL
)
]
......@@ -7,10 +7,10 @@ from opencompass.datasets import (
)
LVEval_multifieldqa_zh_mixup_reader_cfg = dict(
input_columns=["context", "input"],
output_column="answers",
train_split="test",
test_split="test",
input_columns=['context', 'input'],
output_column='answers',
train_split='test',
test_split='test',
)
LVEval_multifieldqa_zh_mixup_infer_cfg = dict(
......@@ -19,8 +19,8 @@ LVEval_multifieldqa_zh_mixup_infer_cfg = dict(
template=dict(
round=[
dict(
role="HUMAN",
prompt="请阅读以下文章并用中文回答问题,问题和答案只与其中一篇文章有关。只需要直接给出问题的答案,不要输出其他任何解释和证据。\n\n文章:{context}\n\n请基于上面的文章回答下面的问题,问题和答案只与其中一篇文章有关。只需要直接给出问题的答案,不要输出其他任何解释和证据。\n\n问题:{input}\n回答:",
role='HUMAN',
prompt='请阅读以下文章并用中文回答问题,问题和答案只与其中一篇文章有关。只需要直接给出问题的答案,不要输出其他任何解释和证据。\n\n文章:{context}\n\n请基于上面的文章回答下面的问题,问题和答案只与其中一篇文章有关。只需要直接给出问题的答案,不要输出其他任何解释和证据。\n\n问题:{input}\n回答:',
),
],
),
......@@ -30,30 +30,30 @@ LVEval_multifieldqa_zh_mixup_infer_cfg = dict(
)
LVEval_multifieldqa_zh_mixup_eval_cfg = dict(
evaluator=dict(type=LVEvalOPTF1Evaluator, language="zh"), pred_role="BOT"
evaluator=dict(type=LVEvalOPTF1Evaluator, language='zh'), pred_role='BOT'
)
DATASET_LENGTH_LEVEL = ["16k", "32k", "64k", "128k", "256k"]
DATASET_LENGTH_LEVEL = ['16k', '32k', '64k', '128k', '256k']
def get_dataset_names(dataset_name, length_levels):
datasets = []
for length in length_levels:
datasets.append(f"{dataset_name}_{length}")
datasets.append(f'{dataset_name}_{length}')
return datasets
LVEval_multifieldqa_zh_mixup_datasets = [
dict(
type=LVEvalmultifieldqazhDataset,
abbr="LVEval_" + name_len,
path="Infinigence/LVEval",
abbr='LVEval_' + name_len,
path='Infinigence/LVEval',
name=name_len,
reader_cfg=LVEval_multifieldqa_zh_mixup_reader_cfg,
infer_cfg=LVEval_multifieldqa_zh_mixup_infer_cfg,
eval_cfg=LVEval_multifieldqa_zh_mixup_eval_cfg,
)
for name_len in get_dataset_names(
"multifieldqa_zh_mixup", DATASET_LENGTH_LEVEL
'multifieldqa_zh_mixup', DATASET_LENGTH_LEVEL
)
]
......@@ -34,4 +34,3 @@ mastermath2024v1_datasets = [dict(
reader_cfg=mastermath2024v1_reader_cfg,
infer_cfg=mastermath2024v1_infer_cfg,
eval_cfg=mastermath2024v1_eval_cfg)]
......@@ -9,15 +9,15 @@ math_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(role="HUMAN", prompt="Problem:\nFind the domain of the expression $\\frac{{\sqrt{{x-2}}}}{{\sqrt{{5-x}}}}$.}}\nSolution:"),
dict(role="BOT", prompt="The expressions inside each square root must be non-negative. Therefore, $x-2 \ge 0$, so $x\ge2$, and $5 - x \ge 0$, so $x \le 5$. Also, the denominator cannot be equal to zero, so $5-x>0$, which gives $x<5$. Therefore, the domain of the expression is $\\boxed{{[2,5)}}$.\nFinal Answer: The final answer is $[2,5)$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nIf $\det \mathbf{{A}} = 2$ and $\det \mathbf{{B}} = 12,$ then find $\det (\mathbf{{A}} \mathbf{{B}}).$\nSolution:"),
dict(role="BOT", prompt="We have that $\det (\mathbf{{A}} \mathbf{{B}}) = (\det \mathbf{{A}})(\det \mathbf{{B}}) = (2)(12) = \\boxed{{24}}.$\nFinal Answer: The final answer is $24$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nTerrell usually lifts two 20-pound weights 12 times. If he uses two 15-pound weights instead, how many times must Terrell lift them in order to lift the same total weight?\nSolution:"),
dict(role="BOT", prompt="If Terrell lifts two 20-pound weights 12 times, he lifts a total of $2\cdot 12\cdot20=480$ pounds of weight. If he lifts two 15-pound weights instead for $n$ times, he will lift a total of $2\cdot15\cdot n=30n$ pounds of weight. Equating this to 480 pounds, we can solve for $n$: \\begin{{align*}} 30n&=480\\\\ \Rightarrow\qquad n&=480/30=\\boxed{{16}} \end{{align*}}\nFinal Answer: The final answer is $16$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nIf the system of equations: \\begin{{align*}} 6x-4y&=a,\\\\ 6y-9x &=b. \end{{align*}}has a solution $(x, y)$ where $x$ and $y$ are both nonzero, find $\\frac{{a}}{{b}},$ assuming $b$ is nonzero.\nSolution:"),
dict(role="BOT", prompt="If we multiply the first equation by $-\\frac{{3}}{{2}}$, we obtain $$6y-9x=-\\frac{{3}}{{2}}a.$$Since we also know that $6y-9x=b$, we have $$-\\frac{{3}}{{2}}a=b\Rightarrow\\frac{{a}}{{b}}=\\boxed{{-\\frac{{2}}{{3}}}}.$$\nFinal Answer: The final answer is $-\\frac{{2}}{{3}}$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\n{problem}\nSolution:\n"),
dict(role='HUMAN', prompt='Problem:\nFind the domain of the expression $\\frac{{\sqrt{{x-2}}}}{{\sqrt{{5-x}}}}$.}}\nSolution:'),
dict(role='BOT', prompt='The expressions inside each square root must be non-negative. Therefore, $x-2 \ge 0$, so $x\ge2$, and $5 - x \ge 0$, so $x \le 5$. Also, the denominator cannot be equal to zero, so $5-x>0$, which gives $x<5$. Therefore, the domain of the expression is $\\boxed{{[2,5)}}$.\nFinal Answer: The final answer is $[2,5)$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nIf $\det \mathbf{{A}} = 2$ and $\det \mathbf{{B}} = 12,$ then find $\det (\mathbf{{A}} \mathbf{{B}}).$\nSolution:'),
dict(role='BOT', prompt='We have that $\det (\mathbf{{A}} \mathbf{{B}}) = (\det \mathbf{{A}})(\det \mathbf{{B}}) = (2)(12) = \\boxed{{24}}.$\nFinal Answer: The final answer is $24$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nTerrell usually lifts two 20-pound weights 12 times. If he uses two 15-pound weights instead, how many times must Terrell lift them in order to lift the same total weight?\nSolution:'),
dict(role='BOT', prompt='If Terrell lifts two 20-pound weights 12 times, he lifts a total of $2\cdot 12\cdot20=480$ pounds of weight. If he lifts two 15-pound weights instead for $n$ times, he will lift a total of $2\cdot15\cdot n=30n$ pounds of weight. Equating this to 480 pounds, we can solve for $n$: \\begin{{align*}} 30n&=480\\\\ \Rightarrow\qquad n&=480/30=\\boxed{{16}} \end{{align*}}\nFinal Answer: The final answer is $16$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nIf the system of equations: \\begin{{align*}} 6x-4y&=a,\\\\ 6y-9x &=b. \end{{align*}}has a solution $(x, y)$ where $x$ and $y$ are both nonzero, find $\\frac{{a}}{{b}},$ assuming $b$ is nonzero.\nSolution:'),
dict(role='BOT', prompt='If we multiply the first equation by $-\\frac{{3}}{{2}}$, we obtain $$6y-9x=-\\frac{{3}}{{2}}a.$$Since we also know that $6y-9x=b$, we have $$-\\frac{{3}}{{2}}a=b\Rightarrow\\frac{{a}}{{b}}=\\boxed{{-\\frac{{2}}{{3}}}}.$$\nFinal Answer: The final answer is $-\\frac{{2}}{{3}}$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\n{problem}\nSolution:\n'),
])),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer, max_out_len=512))
......
......@@ -3,14 +3,14 @@ from opencompass.openicl.icl_retriever import ZeroRetriever
from opencompass.openicl.icl_inferencer import GenInferencer
from opencompass.datasets import MATHDataset, MATHEvaluator, math_postprocess_v2, normalize_final_answer
math_reader_cfg = dict(input_columns=["problem"], output_column="solution")
math_reader_cfg = dict(input_columns=['problem'], output_column='solution')
math_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(
round=[
dict(role="HUMAN", prompt="{problem}\nPlease reason step by step, and put your final answer within \\boxed{}."),
dict(role='HUMAN', prompt='{problem}\nPlease reason step by step, and put your final answer within \\boxed{}.'),
]
),
),
......@@ -20,14 +20,14 @@ math_infer_cfg = dict(
# postprocess v2
math_eval_cfg = dict(
evaluator=dict(type=MATHEvaluator, version="v2"), pred_postprocessor=dict(type=math_postprocess_v2),
evaluator=dict(type=MATHEvaluator, version='v2'), pred_postprocessor=dict(type=math_postprocess_v2),
)
math_datasets = [
dict(
type=MATHDataset,
abbr="math",
path="./data/math/math.json",
abbr='math',
path='./data/math/math.json',
reader_cfg=math_reader_cfg,
infer_cfg=math_infer_cfg,
eval_cfg=math_eval_cfg,
......
......@@ -66,7 +66,7 @@ def solution():
return result"""),
dict(role='SYSTEM', prompt='Response:1.17'),
dict(role='BOT', prompt='FinalAnswer: The final answer is $1.17$. I hope it is correct.'),
dict(role='HUMAN', prompt="Given $\mathbf{a} = \\begin{pmatrix} -7 \\ 0 \\ 1 \end{pmatrix}$ and $\mathbf{b} = \\begin{pmatrix} 4 \\ 2 \\ -1 \end{pmatrix},$ find $\mathbf{a} - 3 \mathbf{b}.$"),
dict(role='HUMAN', prompt='Given $\mathbf{a} = \\begin{pmatrix} -7 \\ 0 \\ 1 \end{pmatrix}$ and $\mathbf{b} = \\begin{pmatrix} 4 \\ 2 \\ -1 \end{pmatrix},$ find $\mathbf{a} - 3 \mathbf{b}.$'),
dict(role='BOT', prompt="""Tool:PythonInterpreter\nTool Input:import numpy as np
def solution()
......
......@@ -9,15 +9,15 @@ math_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(role="HUMAN", prompt="Problem:\nFind the domain of the expression $\\frac{{\sqrt{{x-2}}}}{{\sqrt{{5-x}}}}$.}}\nSolution:"),
dict(role="BOT", prompt="The expressions inside each square root must be non-negative. Therefore, $x-2 \ge 0$, so $x\ge2$, and $5 - x \ge 0$, so $x \le 5$. Also, the denominator cannot be equal to zero, so $5-x>0$, which gives $x<5$. Therefore, the domain of the expression is $\\boxed{{[2,5)}}$.\nFinal Answer: The final answer is $[2,5)$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nIf $\det \mathbf{{A}} = 2$ and $\det \mathbf{{B}} = 12,$ then find $\det (\mathbf{{A}} \mathbf{{B}}).$\nSolution:"),
dict(role="BOT", prompt="We have that $\det (\mathbf{{A}} \mathbf{{B}}) = (\det \mathbf{{A}})(\det \mathbf{{B}}) = (2)(12) = \\boxed{{24}}.$\nFinal Answer: The final answer is $24$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nTerrell usually lifts two 20-pound weights 12 times. If he uses two 15-pound weights instead, how many times must Terrell lift them in order to lift the same total weight?\nSolution:"),
dict(role="BOT", prompt="If Terrell lifts two 20-pound weights 12 times, he lifts a total of $2\cdot 12\cdot20=480$ pounds of weight. If he lifts two 15-pound weights instead for $n$ times, he will lift a total of $2\cdot15\cdot n=30n$ pounds of weight. Equating this to 480 pounds, we can solve for $n$: \\begin{{align*}} 30n&=480\\\\ \Rightarrow\qquad n&=480/30=\\boxed{{16}} \end{{align*}}\nFinal Answer: The final answer is $16$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nIf the system of equations: \\begin{{align*}} 6x-4y&=a,\\\\ 6y-9x &=b. \end{{align*}}has a solution $(x, y)$ where $x$ and $y$ are both nonzero, find $\\frac{{a}}{{b}},$ assuming $b$ is nonzero.\nSolution:"),
dict(role="BOT", prompt="If we multiply the first equation by $-\\frac{{3}}{{2}}$, we obtain $$6y-9x=-\\frac{{3}}{{2}}a.$$Since we also know that $6y-9x=b$, we have $$-\\frac{{3}}{{2}}a=b\Rightarrow\\frac{{a}}{{b}}=\\boxed{{-\\frac{{2}}{{3}}}}.$$\nFinal Answer: The final answer is $-\\frac{{2}}{{3}}$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\n{problem}\nSolution:\n"),
dict(role='HUMAN', prompt='Problem:\nFind the domain of the expression $\\frac{{\sqrt{{x-2}}}}{{\sqrt{{5-x}}}}$.}}\nSolution:'),
dict(role='BOT', prompt='The expressions inside each square root must be non-negative. Therefore, $x-2 \ge 0$, so $x\ge2$, and $5 - x \ge 0$, so $x \le 5$. Also, the denominator cannot be equal to zero, so $5-x>0$, which gives $x<5$. Therefore, the domain of the expression is $\\boxed{{[2,5)}}$.\nFinal Answer: The final answer is $[2,5)$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nIf $\det \mathbf{{A}} = 2$ and $\det \mathbf{{B}} = 12,$ then find $\det (\mathbf{{A}} \mathbf{{B}}).$\nSolution:'),
dict(role='BOT', prompt='We have that $\det (\mathbf{{A}} \mathbf{{B}}) = (\det \mathbf{{A}})(\det \mathbf{{B}}) = (2)(12) = \\boxed{{24}}.$\nFinal Answer: The final answer is $24$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nTerrell usually lifts two 20-pound weights 12 times. If he uses two 15-pound weights instead, how many times must Terrell lift them in order to lift the same total weight?\nSolution:'),
dict(role='BOT', prompt='If Terrell lifts two 20-pound weights 12 times, he lifts a total of $2\cdot 12\cdot20=480$ pounds of weight. If he lifts two 15-pound weights instead for $n$ times, he will lift a total of $2\cdot15\cdot n=30n$ pounds of weight. Equating this to 480 pounds, we can solve for $n$: \\begin{{align*}} 30n&=480\\\\ \Rightarrow\qquad n&=480/30=\\boxed{{16}} \end{{align*}}\nFinal Answer: The final answer is $16$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nIf the system of equations: \\begin{{align*}} 6x-4y&=a,\\\\ 6y-9x &=b. \end{{align*}}has a solution $(x, y)$ where $x$ and $y$ are both nonzero, find $\\frac{{a}}{{b}},$ assuming $b$ is nonzero.\nSolution:'),
dict(role='BOT', prompt='If we multiply the first equation by $-\\frac{{3}}{{2}}$, we obtain $$6y-9x=-\\frac{{3}}{{2}}a.$$Since we also know that $6y-9x=b$, we have $$-\\frac{{3}}{{2}}a=b\Rightarrow\\frac{{a}}{{b}}=\\boxed{{-\\frac{{2}}{{3}}}}.$$\nFinal Answer: The final answer is $-\\frac{{2}}{{3}}$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\n{problem}\nSolution:\n'),
])),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer, max_out_len=1024))
......
......@@ -9,15 +9,15 @@ math_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(role="HUMAN", prompt="Problem:\nFind the domain of the expression $\\frac{\sqrt{x-2}}{\sqrt{5-x}}$.}\nSolution:"),
dict(role="BOT", prompt="The expressions inside each square root must be non-negative. Therefore, $x-2 \ge 0$, so $x\ge2$, and $5 - x \ge 0$, so $x \le 5$. Also, the denominator cannot be equal to zero, so $5-x>0$, which gives $x<5$. Therefore, the domain of the expression is $\\boxed{[2,5)}$.\nFinal Answer: The final answer is $[2,5)$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nIf $\det \mathbf{A} = 2$ and $\det \mathbf{B} = 12,$ then find $\det (\mathbf{A} \mathbf{B}).$\nSolution:"),
dict(role="BOT", prompt="We have that $\det (\mathbf{A} \mathbf{B}) = (\det \mathbf{A})(\det \mathbf{B}) = (2)(12) = \\boxed{24}.$\nFinal Answer: The final answer is $24$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nTerrell usually lifts two 20-pound weights 12 times. If he uses two 15-pound weights instead, how many times must Terrell lift them in order to lift the same total weight?\nSolution:"),
dict(role="BOT", prompt="If Terrell lifts two 20-pound weights 12 times, he lifts a total of $2\cdot 12\cdot20=480$ pounds of weight. If he lifts two 15-pound weights instead for $n$ times, he will lift a total of $2\cdot15\cdot n=30n$ pounds of weight. Equating this to 480 pounds, we can solve for $n$: \\begin{align*} 30n&=480\\\\ \Rightarrow\qquad n&=480/30=\\boxed{16} \end{align*}\nFinal Answer: The final answer is $16$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nIf the system of equations: \\begin{align*} 6x-4y&=a,\\\\ 6y-9x &=b. \end{align*}has a solution $(x, y)$ where $x$ and $y$ are both nonzero, find $\\frac{a}{b},$ assuming $b$ is nonzero.\nSolution:"),
dict(role="BOT", prompt="If we multiply the first equation by $-\\frac{3}{2}$, we obtain $$6y-9x=-\\frac{3}{2}a.$$Since we also know that $6y-9x=b$, we have $$-\\frac{3}{2}a=b\Rightarrow\\frac{a}{b}=\\boxed{-\\frac{2}{3}}.$$\nFinal Answer: The final answer is $-\\frac{2}{3}$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\n{problem}\nSolution:\n"),
dict(role='HUMAN', prompt='Problem:\nFind the domain of the expression $\\frac{\sqrt{x-2}}{\sqrt{5-x}}$.}\nSolution:'),
dict(role='BOT', prompt='The expressions inside each square root must be non-negative. Therefore, $x-2 \ge 0$, so $x\ge2$, and $5 - x \ge 0$, so $x \le 5$. Also, the denominator cannot be equal to zero, so $5-x>0$, which gives $x<5$. Therefore, the domain of the expression is $\\boxed{[2,5)}$.\nFinal Answer: The final answer is $[2,5)$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nIf $\det \mathbf{A} = 2$ and $\det \mathbf{B} = 12,$ then find $\det (\mathbf{A} \mathbf{B}).$\nSolution:'),
dict(role='BOT', prompt='We have that $\det (\mathbf{A} \mathbf{B}) = (\det \mathbf{A})(\det \mathbf{B}) = (2)(12) = \\boxed{24}.$\nFinal Answer: The final answer is $24$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nTerrell usually lifts two 20-pound weights 12 times. If he uses two 15-pound weights instead, how many times must Terrell lift them in order to lift the same total weight?\nSolution:'),
dict(role='BOT', prompt='If Terrell lifts two 20-pound weights 12 times, he lifts a total of $2\cdot 12\cdot20=480$ pounds of weight. If he lifts two 15-pound weights instead for $n$ times, he will lift a total of $2\cdot15\cdot n=30n$ pounds of weight. Equating this to 480 pounds, we can solve for $n$: \\begin{align*} 30n&=480\\\\ \Rightarrow\qquad n&=480/30=\\boxed{16} \end{align*}\nFinal Answer: The final answer is $16$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nIf the system of equations: \\begin{align*} 6x-4y&=a,\\\\ 6y-9x &=b. \end{align*}has a solution $(x, y)$ where $x$ and $y$ are both nonzero, find $\\frac{a}{b},$ assuming $b$ is nonzero.\nSolution:'),
dict(role='BOT', prompt='If we multiply the first equation by $-\\frac{3}{2}$, we obtain $$6y-9x=-\\frac{3}{2}a.$$Since we also know that $6y-9x=b$, we have $$-\\frac{3}{2}a=b\Rightarrow\\frac{a}{b}=\\boxed{-\\frac{2}{3}}.$$\nFinal Answer: The final answer is $-\\frac{2}{3}$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\n{problem}\nSolution:\n'),
])),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer, max_out_len=512))
......
......@@ -9,15 +9,15 @@ math_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(role="HUMAN", prompt="Problem:\nFind the coefficient of $x^3$ when $3(x^2 - x^3+x) +3(x +2x^3- 3x^2 + 3x^5+x^3) -5(1+x-4x^3 - x^2)$ is simplified.\nSolution:"),
dict(role="BOT", prompt="Combine like terms to simplify the expression. The coefficient of $x^3$ is calculated as $$(-3+2\cdot(2+1))+(-5)\cdot(-4))$ = 26$. Thus, the coefficient of $x^3$ is $\\boxed{26}$.\nFinal Answer: The final answer is $26$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nThe surface area of a sphere with radius $r$ is $4\pi r^2$. Including the area of its circular base, what is the total surface area of a hemisphere with radius 6 cm? Express your answer in terms of $\pi$.\nSolution:"),
dict(role="BOT", prompt="The surface area of a hemisphere (not including the base) is half that of a sphere, so it is $2\pi r^2$. The area of the base is $\pi r^2$. Therefore, for a hemisphere with radius 6 cm, the total surface area is $2\pi (6)^2 + \pi (6)^2 = 108\pi$ square cm.\nFinal Answer: The final answer is $108\pi$ square cm. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nMonica tosses a fair 6-sided die. If the roll is a prime number, then she wins that amount of dollars (so that, for example, if she rolls 3, then she wins 3 dollars). If the roll is composite, she wins nothing. Otherwise, she loses 3 dollars. What is the expected value of her winnings on one die toss? Express your answer as a dollar value to the nearest cent.\nSolution:"),
dict(role="BOT", prompt="The prime numbers rolled could be 2, 3, or 5, and each has a 1/6 chance of being rolled. The composite number 4 or 6 has a 2/6 chance of being rolled, but it results in $0 win. The remaining non-prime and non-composite number is 1 , and it results in a loss of $3, with a 1/6 chance. So, the expected winnings are $(2+3+5)(1/6)+0(2/6)+(-3)(1/6) = \$1.17$.\nFinal Answer: The final answer is $\$1.17$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nGiven $\mathbf{a} = \\begin{pmatrix} -7 \\ 0 \\ 1 \end{pmatrix}$ and $\mathbf{b} = \\begin{pmatrix} 4 \\ 2 \\ -1 \end{pmatrix},$ find $\mathbf{a} - 3 \mathbf{b}.$\nSolution:"),
dict(role="BOT", prompt="We find $3 \mathbf{b}$ first, which is $\\begin{pmatrix} 12 \\ 6 \\ -3 \end{pmatrix}$. Then we subtract this vector from $\mathbf{a}$. So, $\mathbf{a} - 3 \mathbf{b} = \\begin{pmatrix} -7 - 12 \\ 0 - 6 \\ 1 - (-3) \end{pmatrix} = \\begin{pmatrix} -19 \\ -6 \\ 4 \end{pmatrix}.$\nFinal Answer: The final answer is $\\begin{pmatrix} -19 \\ -6 \\ 4 \end{pmatrix}$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\n{problem}\nSolution:\n"),
dict(role='HUMAN', prompt='Problem:\nFind the coefficient of $x^3$ when $3(x^2 - x^3+x) +3(x +2x^3- 3x^2 + 3x^5+x^3) -5(1+x-4x^3 - x^2)$ is simplified.\nSolution:'),
dict(role='BOT', prompt='Combine like terms to simplify the expression. The coefficient of $x^3$ is calculated as $$(-3+2\cdot(2+1))+(-5)\cdot(-4))$ = 26$. Thus, the coefficient of $x^3$ is $\\boxed{26}$.\nFinal Answer: The final answer is $26$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nThe surface area of a sphere with radius $r$ is $4\pi r^2$. Including the area of its circular base, what is the total surface area of a hemisphere with radius 6 cm? Express your answer in terms of $\pi$.\nSolution:'),
dict(role='BOT', prompt='The surface area of a hemisphere (not including the base) is half that of a sphere, so it is $2\pi r^2$. The area of the base is $\pi r^2$. Therefore, for a hemisphere with radius 6 cm, the total surface area is $2\pi (6)^2 + \pi (6)^2 = 108\pi$ square cm.\nFinal Answer: The final answer is $108\pi$ square cm. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nMonica tosses a fair 6-sided die. If the roll is a prime number, then she wins that amount of dollars (so that, for example, if she rolls 3, then she wins 3 dollars). If the roll is composite, she wins nothing. Otherwise, she loses 3 dollars. What is the expected value of her winnings on one die toss? Express your answer as a dollar value to the nearest cent.\nSolution:'),
dict(role='BOT', prompt='The prime numbers rolled could be 2, 3, or 5, and each has a 1/6 chance of being rolled. The composite number 4 or 6 has a 2/6 chance of being rolled, but it results in $0 win. The remaining non-prime and non-composite number is 1 , and it results in a loss of $3, with a 1/6 chance. So, the expected winnings are $(2+3+5)(1/6)+0(2/6)+(-3)(1/6) = \$1.17$.\nFinal Answer: The final answer is $\$1.17$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nGiven $\mathbf{a} = \\begin{pmatrix} -7 \\ 0 \\ 1 \end{pmatrix}$ and $\mathbf{b} = \\begin{pmatrix} 4 \\ 2 \\ -1 \end{pmatrix},$ find $\mathbf{a} - 3 \mathbf{b}.$\nSolution:'),
dict(role='BOT', prompt='We find $3 \mathbf{b}$ first, which is $\\begin{pmatrix} 12 \\ 6 \\ -3 \end{pmatrix}$. Then we subtract this vector from $\mathbf{a}$. So, $\mathbf{a} - 3 \mathbf{b} = \\begin{pmatrix} -7 - 12 \\ 0 - 6 \\ 1 - (-3) \end{pmatrix} = \\begin{pmatrix} -19 \\ -6 \\ 4 \end{pmatrix}.$\nFinal Answer: The final answer is $\\begin{pmatrix} -19 \\ -6 \\ 4 \end{pmatrix}$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\n{problem}\nSolution:\n'),
])),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer, max_out_len=512))
......
......@@ -9,15 +9,15 @@ math_infer_cfg = dict(
prompt_template=dict(
type=PromptTemplate,
template=dict(round=[
dict(role="HUMAN", prompt="Problem:\nFind the domain of the expression $\\frac{{\sqrt{{x-2}}}}{{\sqrt{{5-x}}}}$.}}\nSolution:"),
dict(role="BOT", prompt="The expressions inside each square root must be non-negative. Therefore, $x-2 \ge 0$, so $x\ge2$, and $5 - x \ge 0$, so $x \le 5$. Also, the denominator cannot be equal to zero, so $5-x>0$, which gives $x<5$. Therefore, the domain of the expression is $\\boxed{{[2,5)}}$.\nFinal Answer: The final answer is $[2,5)$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nIf $\det \mathbf{{A}} = 2$ and $\det \mathbf{{B}} = 12,$ then find $\det (\mathbf{{A}} \mathbf{{B}}).$\nSolution:"),
dict(role="BOT", prompt="We have that $\det (\mathbf{{A}} \mathbf{{B}}) = (\det \mathbf{{A}})(\det \mathbf{{B}}) = (2)(12) = \\boxed{{24}}.$\nFinal Answer: The final answer is $24$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nTerrell usually lifts two 20-pound weights 12 times. If he uses two 15-pound weights instead, how many times must Terrell lift them in order to lift the same total weight?\nSolution:"),
dict(role="BOT", prompt="If Terrell lifts two 20-pound weights 12 times, he lifts a total of $2\cdot 12\cdot20=480$ pounds of weight. If he lifts two 15-pound weights instead for $n$ times, he will lift a total of $2\cdot15\cdot n=30n$ pounds of weight. Equating this to 480 pounds, we can solve for $n$: \\begin{{align*}} 30n&=480\\\\ \Rightarrow\qquad n&=480/30=\\boxed{{16}} \end{{align*}}\nFinal Answer: The final answer is $16$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\nIf the system of equations: \\begin{{align*}} 6x-4y&=a,\\\\ 6y-9x &=b. \end{{align*}}has a solution $(x, y)$ where $x$ and $y$ are both nonzero, find $\\frac{{a}}{{b}},$ assuming $b$ is nonzero.\nSolution:"),
dict(role="BOT", prompt="If we multiply the first equation by $-\\frac{{3}}{{2}}$, we obtain $$6y-9x=-\\frac{{3}}{{2}}a.$$Since we also know that $6y-9x=b$, we have $$-\\frac{{3}}{{2}}a=b\Rightarrow\\frac{{a}}{{b}}=\\boxed{{-\\frac{{2}}{{3}}}}.$$\nFinal Answer: The final answer is $-\\frac{{2}}{{3}}$. I hope it is correct.\n"),
dict(role="HUMAN", prompt="Problem:\n{problem}\nSolution:\n"),
dict(role='HUMAN', prompt='Problem:\nFind the domain of the expression $\\frac{{\sqrt{{x-2}}}}{{\sqrt{{5-x}}}}$.}}\nSolution:'),
dict(role='BOT', prompt='The expressions inside each square root must be non-negative. Therefore, $x-2 \ge 0$, so $x\ge2$, and $5 - x \ge 0$, so $x \le 5$. Also, the denominator cannot be equal to zero, so $5-x>0$, which gives $x<5$. Therefore, the domain of the expression is $\\boxed{{[2,5)}}$.\nFinal Answer: The final answer is $[2,5)$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nIf $\det \mathbf{{A}} = 2$ and $\det \mathbf{{B}} = 12,$ then find $\det (\mathbf{{A}} \mathbf{{B}}).$\nSolution:'),
dict(role='BOT', prompt='We have that $\det (\mathbf{{A}} \mathbf{{B}}) = (\det \mathbf{{A}})(\det \mathbf{{B}}) = (2)(12) = \\boxed{{24}}.$\nFinal Answer: The final answer is $24$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nTerrell usually lifts two 20-pound weights 12 times. If he uses two 15-pound weights instead, how many times must Terrell lift them in order to lift the same total weight?\nSolution:'),
dict(role='BOT', prompt='If Terrell lifts two 20-pound weights 12 times, he lifts a total of $2\cdot 12\cdot20=480$ pounds of weight. If he lifts two 15-pound weights instead for $n$ times, he will lift a total of $2\cdot15\cdot n=30n$ pounds of weight. Equating this to 480 pounds, we can solve for $n$: \\begin{{align*}} 30n&=480\\\\ \Rightarrow\qquad n&=480/30=\\boxed{{16}} \end{{align*}}\nFinal Answer: The final answer is $16$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\nIf the system of equations: \\begin{{align*}} 6x-4y&=a,\\\\ 6y-9x &=b. \end{{align*}}has a solution $(x, y)$ where $x$ and $y$ are both nonzero, find $\\frac{{a}}{{b}},$ assuming $b$ is nonzero.\nSolution:'),
dict(role='BOT', prompt='If we multiply the first equation by $-\\frac{{3}}{{2}}$, we obtain $$6y-9x=-\\frac{{3}}{{2}}a.$$Since we also know that $6y-9x=b$, we have $$-\\frac{{3}}{{2}}a=b\Rightarrow\\frac{{a}}{{b}}=\\boxed{{-\\frac{{2}}{{3}}}}.$$\nFinal Answer: The final answer is $-\\frac{{2}}{{3}}$. I hope it is correct.\n'),
dict(role='HUMAN', prompt='Problem:\n{problem}\nSolution:\n'),
])),
retriever=dict(type=ZeroRetriever),
inferencer=dict(type=GenInferencer, max_out_len=512))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment