Reverse Prompt Engineering
Not on the map. Why?
Abstract (arXiv)
We explore a new language model inversion problem under strict black-box, zero-shot, and limited data conditions. We propose a novel training-free framework that reconstructs prompts using only a limited number of text outputs from a language model. Existing methods rely on the availability of a large number of outputs for both training and inference, an assumption that is unrealistic in the real world, and they can sometimes produce garbled text. In contrast, our approach, which relies on limited resources, consistently yields coherent and semantically meaningful prompts. Our framework leverages a large language model together with an optimization process inspired by the genetic algorithm to effectively recover prompts. Experimental results on several datasets derived from public sources indicate that our approach achieves high-quality prompt recovery and generates prompts more semantically and functionally aligned with the originals than current state-of-the-art methods. Additionally, use-case studies introduced demonstrate the method's strong potential for generating high-quality text data on perturbed prompts.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). First posted on arXiv 11 Nov 2024.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2025: 2; 2026: 3.
5 papers.
- 2026RAGEN-2: Reasoning Collapse in Agentic RLcited by 20
- 2025IPAD: Inverse Prompt for AI Detection - A Robust and Interpretable LLM-Generated Text Detectorcited by 2
- 2025GPT, But Backwards: Exactly Inverting Language Model Outputscited by 2
- 2026Combating Data Laundering in LLM Trainingcited by 0
- 2026PTP: Previous-Token Prediction based LLM Inversion for Near-Exact Prompt Reconstructioncited by 0
- 2026PTP: Previous-Token Prediction based LLM Inversion for Near-Exact Prompt Reconstruction31 Jul 2026
- 2026RAGEN-2: Reasoning Collapse in Agentic RL7 Apr 2026
- 2026Combating Data Laundering in LLM Training2 Apr 2026
- 2025GPT, But Backwards: Exactly Inverting Language Model Outputs2 Jul 2025
- 2025IPAD: Inverse Prompt for AI Detection - A Robust and Interpretable LLM-Generated Text Detector21 Feb 2025