Overview
Regenerate

Re-run generation button with variant options

retrygenerationactions
Prompt Actions
Props
PropTypeDefaultDescription
onRegenerate() => voidrequiredCallback fired when regeneration is triggered
isRegeneratingbooleanfalseWhether regeneration is currently in progress
variant"button" | "icon" | "dropdown""button"Visual variant — button, icon-only, or dropdown with options
options{ label: string; onSelect: () => void }[]undefinedDropdown menu options for regeneration variants (requires variant="dropdown")
Docs

Regenerate lets users ask the AI to produce a new response to the same prompt without additional input. Because generative models are inherently non-deterministic, re-running the same request naturally yields different wording, structure, or reasoning. This makes regeneration a fast — if imprecise — way to explore alternatives when the first result doesn't land. Unlike targeted controls such as prompt editing or parameter adjustment, regeneration trades precision for speed: one click, a fresh take.

Variants

  • Overwrite The new output replaces the previous one in place. Common in chat-style interfaces where conversation flow is linear.
  • Branching Each regeneration creates a separate version that users can browse and compare. Used in editors and tools where preserving history matters.
  • Guided regeneration Users can tweak a parameter or add a style hint before re-running, giving slightly more control than a blind retry.

Use Cases

  • Creative writing where users want to explore different phrasings
  • Image generation to discover alternative visual interpretations
  • Code generation when the first solution doesn't fit the codebase style
  • Quick recovery from hallucinated or low-quality responses
  • A/B exploration when users aren't sure what they want yet

Best Practices

  • Set clear expectations about whether regeneration overwrites the current output or creates a new branch alongside it.
  • Make previous results easy to recover — provide navigation arrows, a version history, or undo support so nothing feels lost.
  • Offer both one-click regeneration for speed and optional adjustment controls for users who want a bit more direction.
  • Use seed values or variation controls when consistency matters, so users can iterate predictably rather than randomly.
  • Match the regeneration model to the use case: creative workflows benefit from high variance, while convergent tasks need tighter repetition.

Search patterns

Search for a pattern, category, or tag