Prompt Iteration: One Change at a Time
The most common way prompt tuning fails is piling multiple problems into a single edit: swap the role setup, add constraints, change the format—then the result gets better or worse and you have no idea which change caused it. DeepSeek models (R-series deep-thinking reasoning plus V-series general chat) are quite sensitive to instruction structure, and changes interfere with each other, so it's worth iterating like a controlled experiment: change one thing at a time, keep everything else fixed. Here's a hands-on method with templates you can copy directly.
Fix Your Test Set First
Iterating without a fixed test set is guesswork. Start by preparing 5–10 representative inputs (covering typical cases and edge cases) and store them in a file. Every time you edit the prompt, run the same batch and compare outputs by eye.
A few points:
- Once the test inputs are set, don't add or remove any mid-stream, or results stop being comparable.
- Include 1–2 tricky inputs—incomplete information, conflicting requirements—to observe fallback behavior.
- R-series deep-thinking output has some randomness; run each input two or three times before drawing conclusions. Don't be fooled by a single run.
- Simple tasks don't need deep thinking enabled. If you're testing the V-series or non-thinking chat, remember that the mode itself is a variable—don't switch it mid-experiment.
One Change at a Time: Keep a Variable Checklist
Break your prompt into independently editable variables: task description, output format, constraints, number of examples, thinking-mode toggle. Each experiment touches exactly one.
Here's an experiment log template, ready to copy:
[Prompt Iteration Experiment Log] Date: ____ Baseline version: V1 (paste the full current prompt) Single change this round: ____________ (e.g., only added to output requirements: "output as a JSON array, no extra explanation") Test set: fixed 8 inputs (see test_inputs.txt, unchanged) Comparison: - Input 1: baseline ____ → after ____ (better / worse / same) - Input 2: baseline ____ → after ____ (better / worse / same) - ... Conclusion: keep or roll back this change, because: ____ Next baseline: V2 (paste the new version if kept)
Keep logging consistently. After a handful of versions you'll have a clear feel for which kinds of changes work with this model, instead of guessing from scratch every time.
Structure the Prompt So Iteration Is Cheap
Iteration efficiency depends on how structured your baseline is. DeepSeek's deep-thinking models don't respond much to "you are a seasoned expert" style role-play flourishes—they respond to clear requirements and constraints. So your variables should be precisely describable things: format, boundary conditions, prohibitions, examples.
A structured baseline template suited to controlled experiments:
[TASK]
{one sentence, verb-first, describing what to do}
[INPUT]
{place the input here}
[OUTPUT REQUIREMENTS]
1. Format: {e.g., three bullet points, max 50 words each}
2. Must include: {key elements}
3. Must not: {e.g., don't restate the question, no off-topic content}
[EXAMPLE] (optional—add only when format is hard to describe)
Sample input: ____
Expected output: ____
When iterating, change exactly one sentence in exactly one block—[OUTPUT REQUIREMENTS], [EXAMPLE], or [TASK]. Constraint edits (items 2–3) usually pay off faster and cost less than adding examples. If constraint tweaks keep falling short, then try examples, or enable deep-thinking mode for complex tasks.
Common Pitfalls
- Sneaking in extra edits: "while I'm at it, let me add one more line" ruins the experiment. Resist; note it for the next round.
- Concluding from too few samples: judging a change on a single input is mostly luck. Run the full test set at minimum.
- Treating thinking mode as a magic switch: deep thinking suits multi-step reasoning, math, and code; simple summarization or translation gets slower with it on. It's a variable, not decoration.
- Ignoring edge inputs: a change that helps normal inputs but breaks edge cases deserves skepticism.
When to Stop
Set a stopping rule: stop when your fixed test set reaches your acceptance threshold for correctness or usability, and two consecutive versions show no clear improvement. The goal of a prompt is "good enough and stable," not "perfect." Time saved is often better spent improving test-set quality than on ten more rounds of prompt edits.
Treat iteration as an experiment: fixed test set, one change at a time, logged conclusions, a hard stop. This process depends on no specific tool and runs fine with the DeepSeek API or a local deployment; for the exact way to toggle deep-thinking mode, refer to the official pages.
大模型网摘