Overview
Sample Response

Generate a short preview output before committing to a full response

previewgatingquality-check
Governors
Props
PropTypeDefaultDescription
samplestringundefinedOptional preview text generated for the sample response
promptstringundefinedOptional prompt context displayed with the sample
onGenerateSample() => voidrequiredCallback fired to request a new sample response
onRegenerateSample() => voidundefinedOptional callback fired to regenerate the sample
onAcceptSample() => voidundefinedOptional callback fired to proceed with full generation
isGeneratingbooleanfalseWhether sample generation is currently in progress
titlestring"Sample Response"Optional heading for the sample response component
variant"card" | "inline""card"Display style for previewing the sample response
Docs

Sample Response provides a lightweight preview of what the AI is likely to produce before the user commits to a full generation run. It helps users validate direction, tone, and relevance early, reducing wasted compute and unnecessary long outputs.

Variants

  • Inline sample A compact preview shown directly near the prompt controls for fast iteration.
  • Card preview A richer preview panel with prompt context and explicit follow-up actions.
  • Sample-to-full gate Users must review and accept a sample before triggering the full response.

Use Cases

  • Checking tone and scope before generating long-form content
  • Reducing token spend in high-cost model workflows
  • Validating prompt quality during iterative prompt engineering
  • Previewing output style for stakeholder approval flows
  • Guarding against irrelevant responses in agentic pipelines

Best Practices

  • Keep samples short and representative rather than exhaustive.
  • Make the transition from sample to full response explicit.
  • Offer one-click regenerate so users can quickly compare alternatives.
  • Show loading feedback to distinguish preview latency from full generation time.
  • Retain prompt context near the sample so users can evaluate alignment.

Search patterns

Search for a pattern, category, or tag