Regeneration is an edit, not a retry
Tags: regeneration, versions, recovery
In deterministic software, retry means run the same thing again after something transient failed, and expect an identical result. Here a second attempt produces a different artifact. The word is borrowed, the mental model comes with it, and the overwrite-in-place built on top is a destructive action wearing a refresh icon.
Two things behind one button
Almost every product ships a single Regenerate control doing two jobs that need different interfaces.
A resample. Same input, different sample. The user is shopping the distribution β they liked the shape of that answer but not this particular draw of it. What they need is comparison: to see this one beside the last one and pick.
An edit. Changed input. The user is steering β they rewrote the prompt, swapped a reference, adjusted a parameter. What they need is lineage: which input produced which output, so the next adjustment is informed rather than superstitious.
Collapsing them costs something specific. A user who resamples four times has four samples and no way to say "the second one, actually" β so they keep pulling, because the only way to hold a candidate is to stop. A user who edits four times has a trail of causes and effects that the product has thrown away, and is left guessing which change did the good thing.
The three questions the interface owes
Whichever branch it is, three things have to be answerable: what is being kept, what was held fixed so the new one is comparable at all, and can the user get back to what was replaced.
The last one is the floor. If you do nothing else on this page, make the previous generation recoverable β because the alternative is a control that looks like reload and behaves like delete, and people press reload without thinking. That is the whole point of undo over confirm: the way to protect a frequent, reversible-in-principle action is to make it actually reversible, not to interrupt it.
Grounded in
Pathfinder regenerates a character portrait every time the loadout changes, and the requirement was that a swap read as the same character changing clothes rather than a new roll. So the base seed is held and only the equipment varies in the prompt β the invariant is chosen deliberately, because without one every change is a stranger.
The part that turned out to matter more is the cache. It is keyed on the full loadout, which means going back to a previous one returns that exact portrait rather than a fresh sample of it. The product treats a loadout as an identity rather than a request, so moving forward and moving back are both navigation through a space of artifacts. Nothing in it is a retry, and once the model is built that way "undo" stops being a feature you have to engineer separately.
Prior art, and where this differs
It is worth being precise about the disagreement, because the entry is otherwise a fair description of a real control. Reproduction is what a deterministic system does. A model hands you a second artifact, which means the interface now has two and a decision to make about them β and a catalog entry that describes the button without naming that decision leaves the hard part exactly where it found it.
Anti-patterns
- Overwriting in place with no way back. The single most common version, and the one that loses work people had already accepted.
- One button for resample and edit. Two different needs β comparison and lineage β served by neither.
- Infinite regeneration with no comparison surface. A slot machine. Nobody can hold more than one candidate in their head, so they keep pulling and settle for whatever was last.
- Losing the input that produced the kept output. The artifact survives and the reason for it does not, which makes the next change guesswork.
- Charging for regenerations without saying so before the click. The user is exploring a distribution; they should know what exploring costs.
The smallest version worth building
Keep the last few generations for the current input. Show them as a strip. Make keeping one an explicit act rather than a side effect of stopping.
If that is too much, do only this: make the previous generation recoverable for as long as the session lasts. It is an afternoon, and it converts the most dangerous control in the product into a safe one.
Related patterns
- Undo over confirm β the mechanism that makes a regeneration safe to press.
- Streaming is a commitment β streaming a regeneration publishes the new one before anyone has chosen it over the old.
- Design the failure state first β regeneration is what people reach for when an answer is wrong, which makes it part of the recovery design rather than a convenience.