eval-tasks / preprocess_arc.py
CultriX's picture
Upload folder using huggingface_hub
6afe180 verified
raw
history blame contribute delete
225 Bytes
def doc_to_text(doc) -> str:
choices = ""
for idx, choice in enumerate(doc["choices"]["text"]):
letter = "ABCDE"[idx]
choices+= f"{letter}. {choice}\n"
return f"Question: {doc['question']}\n{choices}\nAnswer:"