import re def doc_to_text(doc) -> str: problem = doc['question'] return f"Problem: {problem}\nAnswer:"