| 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:" | |
| 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:" | |