Completed the Quickstart? You’re ready to bake. Otherwise, set up the SDK first.
The Goal
Bake Yoda’s personality into a model so it ALWAYS speaks like Yoda: no system prompt needed at inference time.Complete Workflow in 4 Steps
Create Repository & Prompts
Begin by creating a new repository and then creating the student and teacher prompts.
Configure Target
Configure a target that captures Yoda’s personality using a variety of stim generators. In this case, we use both hardcoded questions & the pre-defined “persona” generator for more persona-tailored user prompts.
The
generators create questions (stimuli) that will provoke Yoda-like responses. In production, use many generators for more data diversity.Generate Training Data
Run stim and rollout (which generates responses from the Yoda-prompted model):
These jobs run asynchronously. In production, you’ll want to poll for completion. See Production Patterns for polling examples.
Configure and Run Bake
Lastly, configure your bake hyperparameters. You may specify a variety of traditional hyperparameters, as well as the concentration of trajectories in your final bake dataset.
The Result
After baking completes, your model will speak like Yoda automatically:| Before Baking | After Baking |
|---|---|
| System Prompt: “You are Yoda. Speak like Yoda…” User: “Teach me about patience” Assistant: “Patience, you must learn. The Jedi way, slow and sure it is.” Cost: 50+ system prompt tokens every request | System Prompt: "" User: “Teach me about patience” Assistant: “Patience, you must learn. The Jedi way, slow and sure it is.” Cost: 0 tokens - behavior is baked into weights! |
Understanding the Workflow
1. Teacher prompt = What to bake inThe detailed Yoda personality prompt that defines the desired behavior. 2. Student prompt = What triggers the behavior
Empty string means the model ALWAYS exhibits the baked behavior. 3. Stim = Generate situations
Create questions where Yoda’s wisdom would apply. 4. Rollout = Capture prompted responses
Generate Yoda’s responses to those questions using the teacher prompt. 5. Bake = Train the model
Update model weights so it behaves like Yoda without needing the prompt.
Next Steps
Using Your Baked Model
Load your trained model and chat with it
Multi-Target Baking
Combine multiple prompts in a single bake
Iterative Baking
Refine your baked model with additional training
Production Patterns
Add polling, error handling, and monitoring