step-zero / generate_dataset.py
tc043
refactor: expand and diversify dataset entries while removing deprecated testing scripts
913be0b
Raw
History Blame Contribute Delete
4.44 kB
import json
import random
# A rich, diverse list of daily tasks to teach the model how to break down various goals
# into tiny, atomic, physical actions under 8 words.
scenarios = [
# Stress test goals
("I want to clean my room.", "Pick up one piece of clothing."),
("I need to write a python script.", "Create a new main.py file."),
("I should study for my exam.", "Open the textbook to chapter one."),
("I want to cook dinner.", "Turn on the stove burner."),
("I need to do laundry.", "Sort your dark clothes."),
("I want to start exercising.", "Put on your running shoes."),
("I should organize my desk.", "Throw away the empty soda can."),
("I want to learn guitar.", "Tune the low E string."),
("I need to fix my bike.", "Check the front tire pressure."),
("I want to read a book.", "Open the book to page one."),
("I should call my mom.", "Open your phone contacts app."),
("I want to meditate.", "Sit cross-legged on the floor."),
("I need to pay my bills.", "Log into your bank website."),
("I want to go grocery shopping.", "Grab a reusable shopping bag."),
("I should write in my journal.", "Pick up a pen."),
# Other common tasks
("I need to clean my kitchen.", "Pick up one plate."),
("I have to write a Python web scraper.", "Open your code editor."),
("I need to do my taxes.", "Find your W2 form."),
("I have to send an email to my boss.", "Open a new email draft."),
("I'm paralyzed by this essay.", "Open a blank document."),
("I need to wash the dishes.", "Turn on the warm water faucet."),
("I want to make coffee.", "Pour fresh water into the reservoir."),
("I have to water the plants.", "Fill the watering can with water."),
("I should walk the dog.", "Attach the leash to the collar."),
("I want to learn Spanish.", "Open the language learning app."),
("I need to check the mail.", "Walk out to the mailbox."),
("I want to clean the bathroom.", "Spray the sink with cleaner."),
("I should plan my week.", "Open your calendar app."),
("I need to take out the trash.", "Tie the garbage bag closed."),
("I want to paint a picture.", "Squeeze blue paint onto the palette."),
("I have to renew my driver's license.", "Go to the DMV website."),
("I should back up my files.", "Plug in the external hard drive."),
("I want to learn to knit.", "Cast on the first stitch."),
("I need to pack for my trip.", "Lay your suitcase on the bed."),
("I want to bake a cake.", "Preheat the oven to 350 degrees."),
("I should clean my computer keyboard.", "Turn off the laptop first."),
("I need to make my bed.", "Pull the top sheet up straight."),
("I want to hang a picture frame.", "Hold the level against the wall."),
("I have to repair a torn shirt.", "Thread the needle with blue thread."),
("I should wash my car.", "Fill a bucket with soapy water."),
("I want to plant some seeds.", "Dig a small hole in soil."),
("I need to vacuum the rug.", "Plug the vacuum into the wall."),
("I want to learn a dance routine.", "Play the tutorial video."),
("I should drink more water.", "Fill your glass with cold water."),
("I need to buy a birthday gift.", "Search online for gift ideas."),
("I want to build a shelf.", "Lay out all the wooden boards."),
("I should clean my glasses.", "Wipe the lenses with microfiber cloth."),
("I want to make a list.", "Write down the first item."),
("I need to find my keys.", "Check the kitchen counter top."),
("I want to reset my password.", "Click the forgot password link."),
]
dataset = []
# Create 300 training examples by sampling and adding mild prompt formatting variations
random.seed(42)
for i in range(300):
scenario, action = random.choice(scenarios)
# We support multiple phrasing styles for the goal & failures
failures = random.choice([0, 0, 0, 1, 2])
# Format the prompt style to match SFT expectations
prompt = f"Goal: {scenario} Failures: {failures}. Output a single physical action verb under 8 words."
output = json.dumps({"task": action})
dataset.append({
"instruction": prompt,
"output": output
})
with open("verbs.jsonl", "w") as f:
for item in dataset:
f.write(json.dumps(item) + "\n")
print(f"Generated verbs.jsonl with {len(dataset)} diverse synthetic training examples.")