
How to Use Seed Locking to Isolate What a Prompt Change Actually Did
Why Unlocked Seeds Make Prompt A/B Testing Meaningless
You've done this before. You write a prompt, get a paragraph back that's too purple, tweak the instruction, regenerate, and the new version reads better. So you conclude the tweak worked. Except it might not have. If you didn't lock the random seed, you have no idea whether your edit fixed anything or whether the model just rolled different dice that time.
Every generation from a language model starts with a seed — a number that determines the specific path the model takes through its probability space. Change the seed, and you get different word choices, different sentence rhythms, different everything, even with the exact same prompt. Most people never think about this because most interfaces hide it. You type, you get prose, you judge the prose, you move on. But that means every "improvement" you think you made while editing prompts is confounded with random variation you can't see.
This matters more than it sounds like it should. If you're trying to figure out whether a phrase like "avoid purple prose" in your instructions actually changes anything, and you're testing it against a fresh seed each time, you're not running an experiment. You're reading tea leaves. The model could hand you clean prose on attempt one and overwrought prose on attempt two using the identical prompt, seed unlocked, no edits at all. Now imagine you made an edit in between. You'd credit your edit for a difference that was pure noise.
If you change two things at once — your prompt and your seed — you can never know which one caused the difference you're looking at. Isolate one variable, or don't bother testing at all.This is the core problem with how most fiction writers iterate on prompts. They're comparing noise to noise and calling it craft. Seed locking fixes that. It turns your prompt editing from guesswork into something closer to an actual controlled experiment — which matters a lot if you're trying to build a repeatable process rather than just vibing your way through revisions one lucky generation at a time.
How to Find and Set Seed Parameters
Not every tool gives you access to this. That's the first thing to know, and it's genuinely frustrating if you've been burned by it before.
API-based access is where seed locking lives. If you're calling OpenAI's API directly, or using a tool built on top of it, there's typically a seed parameter you can pass alongside your prompt. Set it to any integer — 42, 12345, your birthday, doesn't matter — and as long as everything else about the request stays identical (same model, same temperature, same prompt), you'll get the same output back. It's not always perfectly deterministic due to how these systems batch requests under the hood, but it's close enough to be useful, and OpenAI's own documentation flags this as a best-effort feature rather than an ironclad guarantee.
Anthropic's Claude API doesn't currently expose a seed parameter in the same way, which is worth knowing if you're comparing across providers. Some other model providers do. This inconsistency is honestly one of the more annoying parts of working across different AI backends, and it's part of why comparing behavior across models — see our breakdown of the best AI models for writing — requires you to test each one on its own terms rather than assuming a technique from one transfers cleanly to another.
Consumer chat apps — the ChatGPT web interface, Claude's chat UI, most polished writing apps — usually hide this entirely. You're not choosing a seed; the system is picking one for you every time you hit regenerate, and there's no field anywhere to override it. If you've ever wondered why "regenerate" in a consumer chat app gives you wildly different prose even when you didn't touch the prompt, that's the seed changing invisibly in the background. Our comparison of Entangled Text vs ChatGPT touches on this kind of interface difference — some tools are built for casual drafting, others expose the underlying knobs because they assume you want to actually control the process rather than just accept whatever comes out.
If you're serious about testing prompt changes systematically, you need a tool or workflow that exposes seed control, or you need to accept that your A/B tests are really just vibes with extra steps. Check the Entangled Text documentation for how generation parameters are surfaced if you're working inside the platform — knowing what's adjustable and what's fixed changes how you approach testing from the start.
The Controlled-Experiment Method
Here's the actual procedure, stripped down to its essentials:
- Pick a seed and write it down. Anything works — the point isn't the number, it's that you use the same one every time in this test.
- Lock everything else too. Same model, same temperature, same max token length, same base prompt. If you're testing a change to your negative instructions, don't also switch models mid-test — that's two variables, not one.
- Change exactly one thing. A single word. A single clause. A temperature value. Whatever you're actually trying to isolate.
- Generate both versions and diff them. Read them side by side, ideally in a tool built for exactly this — our free Manuscript Diff tool will show you precisely where two versions of a passage diverge, word for word, so you're not relying on your eyes to catch subtle shifts in a 400-word paragraph.
- Attribute the difference honestly. If the output changed, you now know your edit caused it — not random chance. If it didn't change, that's information too. Your edit might not matter as much as you thought.
This is slower than just firing off prompts and eyeballing results, obviously. But it's the only way to actually build intuition about what your instructions are doing. Most writers develop superstitions about prompting — "never use the word 'vivid,' it makes things worse" — based on maybe two data points, neither controlled. Locking the seed lets you actually test the superstition instead of just repeating it.
It's also worth pairing this with a stable foundation elsewhere in your process. If your story bible or character sheets are shifting between generations, you've introduced variables you're not tracking. Lock down everything you're not actively testing.
Worked Example: Isolating Which Phrase Actually Kills the Purple Prose
Let's say you've got a fantasy battle scene coming out overwrought — every sword "sings," every wound "blooms crimson," that kind of thing. You suspect a negative instruction will fix it, but you've got three candidate phrasings and no idea which one, if any, actually does the work. This is exactly the situation seed locking was built for.
Seed: 88421 | Model: gpt-4o | Temperature: 0.9
Base prompt: "Write the moment Kestrel's blade meets the captain's guard for the first time in the courtyard duel. Third person limited, Kestrel's POV. 250 words. She's angry but disciplined — the anger shows in restraint, not in flourish."
Version A (no negative instruction): [base prompt only]
Version B (add): "Avoid purple prose."
Version C (add): "Do not use metaphors involving light, blood as liquid imagery, or verbs like 'sing,' 'dance,' 'bloom,' or 'kiss' applied to weapons or wounds."
Version D (add): "Write like a war correspondent describing a real event, not like a fantasy novel. Short sentences. Concrete physical detail only — angle of the blade, weight distribution, breath."
This is why the phrasing matters more than the instinct to just say "avoid purple prose." That instruction is vague enough that the model has to guess what you mean by it, and vague instructions tend to produce inconsistent results even at a fixed seed across slightly different phrasings of the same idea. Version C gives concrete, bannable words — much easier for the model to actually act on. Version D reframes the entire register by pointing at a genre (war reporting) instead of just naming what to avoid, which often works better because you're giving the model something to imitate rather than just a list of prohibitions.
Run all four at the identical seed, drop the outputs into Manuscript Diff, and look at what actually changed sentence by sentence. You might find that Version B barely moves the needle — the model still reaches for "her blade sang" because "purple prose" is too abstract a category for it to reliably self-police. Version C might kill the specific banned words but relocate the overwroughtness into sentence rhythm instead — longer, more ornamented sentences even without the flagged vocabulary. Version D is often the one that actually restructures the prose at a deeper level, because you've given the model a model to follow, not just a rule to obey.
None of that is guessable in advance. It's also exactly the kind of finding that transfers to other genres with different failure modes — check our guide on how to stop AI from defaulting to the MFA workshop voice for a related pattern, where the fix also turned out to be reframing register rather than listing prohibitions.
Once you've identified which phrasing actually works, that's the version that goes into your permanent prompt template or your project's system instructions — not because it felt better once, but because you watched it change the same base output twice, with nothing else different. That's a much stronger claim than "I think this one's better."
Where This Technique Pays Off Beyond Purple Prose
The purple prose example is the clean, teachable version, but the technique generalizes to almost anything you're uncertain about in your prompting.
Testing temperature changes. Lock the seed, lock the prompt, and just move temperature from 0.7 to 1.0 to 1.3. You'll see exactly how much more variation and risk-taking the model introduces at each step, without wondering whether what you're seeing is the temperature or just a different random draw.
Testing character voice consistency. If you're worried a secondary character's dialogue is drifting away from how you defined them, lock the seed and test two phrasings of their voice description against the same scene beat. This pairs well with running outputs through something like the AI character consistency checker afterward — seed locking tells you which prompt wording caused a shift, the consistency checker tells you whether the shift actually broke continuity with earlier chapters.
Testing worldbuilding detail density. If you write fantasy and use a tool like the fantasy worldbuilding generator to seed setting details into prose, locking the seed while adjusting how much lore you feed into the prompt shows you exactly how much detail is "enough" before the prose starts reading like an encyclopedia entry instead of a scene.
Testing genre-specific instruction sets. Romance and LitRPG have very different failure modes — romance tends to drift into melodrama, LitRPG tends to drift into stat-sheet dryness. If you're building prompts for romance novel with AI work or LitRPG writing, seed-locked testing is how you figure out which instruction actually corrects the specific drift your genre produces, rather than borrowing generic advice that was tuned for a different kind of manuscript.
This is also a good habit to build into whatever revision process you're already running. If you follow something like The Five-Pass Revision Order for AI-Assisted Novels, seed locking is most useful during the pass where you're refining line-level prose quality — that's the pass where "did my instruction work" questions come up constantly, and where guessing costs you the most time.
When to Unlock the Seed Again
Locking the seed is a diagnostic tool, not a permanent state. Once you've confirmed a prompt change does what you want, you unlock it — deliberately, and for a good reason.
Here's why: a locked seed shows you one specific path through the model's possibility space. It confirms your prompt change moves that path in the direction you want. But fiction benefits from variation. If you kept the seed locked while actually drafting your manuscript, every scene with a similar prompt structure would tend toward similar phrasing patterns, similar sentence openers, similar rhythms. You'd trade the noise problem for a sameness problem, and sameness is its own kind of failure in a novel-length project.
So the workflow looks like this: lock the seed to test and confirm a prompt change works. Once confirmed, unlock it and let temperature and natural randomness do what they're good at — producing the sentence-level variety that makes prose feel alive rather than templated. You've already done the hard work of knowing your instructions are sound. Now you let the model actually use its range.
Think of it like a chef who tastes a stock at each stage of reduction to check the seasoning is right, then walks away and lets it simmer without hovering over it anymore. The controlled check happens once, deliberately, at the moment of uncertainty. It doesn't need to happen on every single generation forever.
Practically, that means most of your actual drafting — whether you're working through an AI book outline chapter by chapter or generating scene by scene inside your manuscript — should run with the seed unlocked. Reserve seed locking for the moments when you're genuinely unsure whether a prompt tweak is doing anything: adjusting negative instructions, testing a new voice description, deciding between two ways of phrasing a constraint. Once you've got your answer, get out of the lab and back to writing.
Seed locking is for answering a question. It's not a drafting mode. Confirm, then let go.
If you're revising an existing draft rather than testing fresh prompts, the same logic applies during editing passes — our guide on how to edit a book with AI covers when controlled, repeatable generation actually helps versus when it just gets in the way of the messier, more intuitive parts of revision.
The whole point of this technique is cheap and boring in the best way: change one thing, keep everything else fixed, look at what actually happened. It won't make your prose better by itself. What it does is stop you from lying to yourself about why a prompt worked — and once you know that, every future prompt you write gets built on something more solid than a hunch.
Try it yourself
Write your own book with AI — free, no credit card required.
Free · No credit card