MCPcopy Create free account
hub / github.com/SkyworkAI/Skywork / format_example

Function format_example

eval/evaluate_ceval.py:90–100  ·  view source on GitHub ↗
(line, subject, include_answer=True)

Source from the content-addressed store, hash-verified

88
89
90def format_example(line, subject, include_answer=True):
91 example = f"以下是中国关于{task2desc[subject]}考试的单项选择题,请选出其中的正确答案。\n\n"
92 example = example + line["question"]
93 for choice in choices:
94 example += f'\n{choice}. {line[f"{choice}"]}'
95
96 if include_answer:
97 example += "\n答案:" + line["answer"] + "\n\n"
98 else:
99 example += "\n答案:"
100 return example
101
102
103def generate_few_shot_prompt(k, subject, dev_df):

Callers 2

generate_few_shot_promptFunction · 0.70
eval_subjectFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected