small change to word sequence reversal prompt (#252)

corrected ansewr format
This commit is contained in:
joesharratt1229 2025-03-02 17:34:35 +01:00 committed by GitHub
parent 3149edf2c4
commit 49db4ed761
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,6 +8,8 @@ from typing import Optional
from ..data import read_data_file
from ..factory import ProceduralDataset, register_dataset
QUESTION_TEMPLATE = """Solve the following problem. Provide you answer as a comma-separated list of word with a space the comma. Reverse this list of words: {question}"""
@dataclass
class WordSequenceReversalConfig:
@ -49,7 +51,7 @@ class WordSequenceReversalDataset(ProceduralDataset):
answer = ", ".join(reversed(words))
return {
"question": f"Reverse this list of words: {question}",
"question": f"{QUESTION_TEMPLATE.format(question=question)}",
"answer": answer,
"metadata": {"num_words": num_words, "words": words},
}