Use Variables and Sample Output Types
At a glance
- Plan: All plans
- Best for: Workspace owners
- Where to find it:
Prompt editor,Prompt detail -> Fill and Copy
Key points
- Supported sample output types include Text, Markdown, JSON, Code, Image, Links, Grok Imagine, and Mixed.
- Variables support plain placeholders like
{{topic}}and guided options like{{tone: friendly / formal}}.
What this feature does
Variables let one saved prompt work across many scenarios, while sample outputs show the format you expect back. Together they turn a good prompt into a repeatable workflow.
Why it is useful
Without variables, you usually duplicate prompts for every small change. Without a sample output, people have to guess what success looks like. PrompX gives you both reuse and clarity.
How to use it
- In the prompt text, add placeholders such as
{{client_name}}or{{tone: friendly / formal}}wherever the prompt should change. - Use Preview in the editor to fill those variables and confirm the final prompt still reads naturally.
- Choose the sample output type that best matches the result you want back.
- Add a realistic sample output. For JSON and code, use properly structured examples. For images and links, add real examples where possible.
- Choose Mixed if the response should include more than one format, such as text plus links or text plus JSON.
- Save the prompt, then use Fill & Copy in the prompt detail view whenever you want to run it with fresh values.
Supported output types
- Text: plain language answers, briefs, and outlines.
- Markdown: responses that need headings, bullets, or rich formatting.
- JSON: structured output for apps, automation, or consistent schemas.
- Code: snippets, functions, configuration, or implementation drafts.
- Image: prompts or references for image-generation workflows.
- Links: one or more URLs with preview-friendly context.
- Grok Imagine: model-specific image-oriented workflows.
- Mixed: responses that combine formats in one result.
Tips
- Name variables after business concepts, such as product, audience, deadline, or tone.
- Use short option lists for guided variables so filling the prompt stays fast.
- For image outputs, you can upload files or add multiple image URLs. For links, store one or many URLs with preview-friendly details.
Common use cases
- Reusing one sales email prompt for many prospects.
- Saving a report generator that always returns JSON in the same schema.
- Keeping a design brief that includes both written guidance and image references.