Updated 2026-11-13 · Cameron Voss and West Mao
What Is Reverse Prompt Engineering? A Practical Guide With Examples
Learn how to turn an example output into a testable prompt, and understand what you can—and cannot—recover.
What does reverse prompt engineering mean?
Ordinary prompting starts with an instruction and asks a model to generate an output. Reverse prompting starts with the output: you identify the features you want, infer instructions that might produce them, then test and refine those instructions.
For example, you might see a concise product summary with three bullet points and a friendly tone. You can describe those features in a new prompt and ask a model to apply them to a different product. The same idea applies to an image: describe its subject, composition, lighting, and visual style, then use that description as a starting point for a new image.
The phrase “reverse prompt engineering adalah” combines the English term with the Indonesian word for “is.” In Indonesian: reverse prompt engineering adalah proses menyusun perkiraan prompt berdasarkan hasil AI yang sudah ada.
| Approach | Starting point | Goal |
|---|---|---|
| Prompt engineering | An instruction or task | Generate a useful output |
| Reverse prompt engineering | An example output | Create a prompt that produces a useful similar output |
| Prompt injection | Instructions embedded in input or retrieved content | Change an assistant’s intended behavior; it is a separate security issue |
How does reverse prompting work?
- Choose a reference. Use a text or image you have permission to work with. Remove private information before sharing it with a model.
- Separate observable features from guesses. Note what is actually visible: length, structure, tone, visual composition, and subject. The intended audience or exact wording may be uncertain.
- Draft a candidate prompt. Describe the task, desired format, constraints, and relevant context. Replace reference-specific facts with placeholders.
- Test it on a new input. Use the same model and settings when available. Check whether the prompt transfers to a different subject instead of merely repeating the example.
- Compare and revise. Define a few criteria, such as factual accuracy, format, tone, and completeness. Adjust one instruction at a time and retest on several examples.
Some research uses automated optimization to infer prompts from multiple outputs or to improve image descriptions through repeated generation and comparison. A practical manual workflow follows the same broad idea, but it does not reproduce those research methods or guarantee their results.
Example: turn a text output into a reusable prompt
Suppose your reference is a short software-release summary: one plain-language opening sentence, three bullets explaining changes, and a final sentence about who may benefit. You want the structure, not the original product claims.
Prompt for analyzing the example
Analyze the example below as a writing sample. 1. List its observable structure, tone, length, and formatting. 2. Separate observations from assumptions about the intended audience. 3. Write a reusable prompt that produces a similar format for a different topic. 4. Use placeholders for facts; do not invent missing details. Example: [Paste a sample you are allowed to use]
A candidate prompt to test
Using only the release notes provided, write a concise update for software users. Start with one sentence explaining the main change in plain language. Follow with three bullets covering the most relevant changes. End with one sentence explaining who may find the update useful. Keep the tone direct and neutral. If a detail is missing, omit it rather than guess. Release notes: [Paste release notes]
These are illustrative templates, not a record of a completed model test. Before using the result, compare it against the release notes and check that the model has not added unsupported claims.
Example: build an image prompt from a reference
For an image, describe the elements you can see rather than assume an original model, seed, or hidden settings. A useful starting structure is subject + composition + setting + lighting + color + constraints.
Describe the visible features of this reference image: subject, framing, background, lighting, color palette, and texture. Flag details that are unclear. Then create a prompt for a new image with a different subject but a similar composition and mood. Do not claim to know the original prompt or model.
Generate a draft and compare the aspects that matter most. If the composition is right but the colors are wrong, revise the color instructions first. Image models and their settings can interpret the same text differently, so expect iteration rather than an exact match.
Can reverse prompting recover the original prompt?
Sometimes an inferred prompt can be close in meaning or produce similar results, but an output alone generally cannot establish the exact original wording. Many different prompts can lead to similar outputs, and outputs can also depend on model version, system instructions, previous messages, reference material, generation settings, and randomness.
A generated explanation of “the original prompt” is therefore a model’s interpretation. Treat any inferred audience, hidden instruction, or generation setting as a possibility until you can verify it independently.
How do you check whether a reverse-engineered prompt works?
- Use more than one input: try several representative cases, including one that is more difficult.
- Set a simple scorecard: check accuracy against the input, required structure, relevant detail, and tone.
- Compare versions: keep the test inputs and settings consistent when comparing prompt changes.
- Inspect failures: note missing details, invented facts, overlong answers, or visual elements that drift.
- Keep a record: save the prompt, model and version when known, settings, inputs, and observations so you can repeat the test.
For production work, include edge cases and review the output whenever the model or prompt changes. A prompt that resembles one sample may still fail on a different task.
What are the limits and responsible uses?
Use references you have the right to share, and follow the relevant platform terms and permissions. Avoid uploading confidential customer data, credentials, or private documents to a tool without authorization. If you are inspired by someone else’s work, consider the applicable rights and avoid presenting a close copy as your own original work.
Reverse prompting is useful for learning patterns and building workflows. It is not a reliable way to discover secret instructions, validate facts, or prove how an existing output was made. Do not place passwords or API keys in prompts merely because the prompt itself is hidden.
Frequently asked questions
Is reverse prompting the same as prompt engineering?
They are related. Prompt engineering builds and refines instructions to achieve a goal; reverse prompting begins with an output and uses it to propose those instructions.
Can I use DeepSeek or another language model for reverse prompting?
You can give a text-capable model an example and ask it to identify patterns and draft a candidate prompt. For image references, use a tool that accepts image input, or supply your own written description. Check the particular tool’s supported inputs and privacy settings before uploading.
Can one reverse-engineered prompt work across different models?
It can be a starting point, but behavior varies. Test the prompt separately on each model and adjust the instructions for the task and available features.
How many examples should I use?
One example is enough to start, but it can hide what is essential. Use several varied examples when available, and reserve different examples for testing whether the prompt generalizes.