def doc_to_text(doc) -> str: | |
choices = "" | |
for idx, choice in enumerate(doc["choices"]): | |
letter = "ABCD"[idx] | |
choices += f"{letter}. {choice}\n" | |
return f"Question: {doc['question']}\n{choices}\nAnswer:" | |
def doc_to_text(doc) -> str: | |
choices = "" | |
for idx, choice in enumerate(doc["choices"]): | |
letter = "ABCD"[idx] | |
choices += f"{letter}. {choice}\n" | |
return f"Question: {doc['question']}\n{choices}\nAnswer:" | |