Overview
Prompt Enhancer
Rewrite raw prompts into clearer, structured prompts with before/after review
promptrewritequality
Props
| Prop | Type | Default | Description |
|---|---|---|---|
prompt | string | required | Original user prompt before enhancement |
enhancedPrompt | string | undefined | Enhanced prompt text generated or edited by the user |
onEnhance | (prompt: string) => void | required | Callback fired when enhancement is requested |
onApply | (enhancedPrompt: string) => void | undefined | Optional callback to apply the enhanced prompt |
onEnhancedPromptChange | (value: string) => void | undefined | Optional callback for editing enhanced prompt text |
isEnhancing | boolean | false | Whether enhancement is currently in progress |
title | string | "Prompt Enhancer" | Optional heading for the enhancer panel |
variant | "split" | "inline" | "split" | Layout mode for comparing and editing prompt versions |
showDiff | boolean | true | Whether to show a lightweight change summary between versions |
Docs
Prompt Enhancer rewrites rough user input into clearer, more structured prompts before submission. It helps users who know what they want but struggle to articulate constraints, audience, format, or tone. By showing original and enhanced versions side-by-side, the pattern improves both output quality and user trust in the rewrite step.
Variants
- Split compare — Original and enhanced prompts shown side-by-side for quick review and editing.
- Inline rewrite — Single-column flow where users enhance then refine directly in place.
- Auto-enhance — Enhancement applied automatically on submit with an optional review step.
Use Cases
- Improving vague user prompts before expensive model calls
- Standardizing prompts for team workflows and reusable templates
- Adding structure for format, tone, and output constraints
- Helping novice users get better first-try AI responses
- Preprocessing prompts in enterprise AI copilots
Best Practices
- Always show what changed between original and enhanced prompts.
- Let users edit the enhanced prompt before final submission.
- Keep rewritten prompts concise and task-focused.
- Preserve user intent rather than over-constraining the request.
- Provide a one-click way to apply or revert the enhancement.