MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / format_subject

Function format_subject

eval_general/eval_mmlu_hf.py:53–58  ·  view source on GitHub ↗
(subject)

Source from the content-addressed store, hash-verified

51def generate_few_shot_prompt(k, subject, dev_df):
52
53 def format_subject(subject):
54 l = subject.split("_")
55 s = ""
56 for entry in l:
57 s += " " + entry
58 return s.strip()
59
60 # Use llama2 template to generate answer
61 prompt = f"The following is a multiple-choice question about {format_subject(subject)}. Please choose the most suitable one among A, B, C and D as the answer to this question."

Callers 1

generate_few_shot_promptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected