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

Function format_example

eval/evaluate_mmlu.py:36–45  ·  view source on GitHub ↗
(line, include_answer=True)

Source from the content-addressed store, hash-verified

34
35
36def format_example(line, include_answer=True):
37 example = "Question: " + line["question"] + "\nChoices:\n"
38 for choice in choices:
39 example += f'{choice}. {line[f"{choice}"]}\n'
40
41 if include_answer:
42 example += "Answer: " + line["answer"] + "\n\n"
43 else:
44 example += "Answer:"
45 return example
46
47
48def 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