mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-28 17:29:39 +00:00
reformatted word ladder question template
This commit is contained in:
parent
c893839954
commit
d9b08a579e
1 changed files with 6 additions and 1 deletions
|
|
@ -9,6 +9,11 @@ from ..data import get_data_file_path
|
|||
from ..factory import ProceduralDataset, register_dataset
|
||||
|
||||
|
||||
QUESTION_TEMPLATE = """Transform the word ladder '{start}' to '{end}' by changing one letter at a time.
|
||||
Provide your answer as a comma-separated sequence of uppercase letters without spaces.
|
||||
Each step must be a valid English word."""
|
||||
|
||||
|
||||
@dataclass
|
||||
class WordLadderConfig:
|
||||
"""Configuration for word ladder task generation"""
|
||||
|
|
@ -211,7 +216,7 @@ class WordLadderDataset(ProceduralDataset):
|
|||
raise IndexError(f"Dataset exhausted at index {idx}. {str(e)}")
|
||||
|
||||
return {
|
||||
"question": f"Transform the word ladder '{start}' to '{end}' by changing one letter at a time.",
|
||||
"question": QUESTION_TEMPLATE.format(start=start, end=end),
|
||||
"answer": ",".join(path),
|
||||
"metadata": {"start_word": start, "end_word": end, "word_length": length, "chain_length": len(path)},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue