AIToday
Large Language ModelsAI Safety & AlignmentTHE DECODERPublished: Aug 13, 2026, 04:01 JST3 min read

Researchers reverse-engineer LLM prompts from output with near-perfect accuracy

Researchers reverse-engineer LLM prompts from output with near-perfect accuracy

Key takeaway

  • Researchers at IIT Bombay and Adobe Research have developed a technique that reconstructs the original prompts users fed into large language models by analyzing only the output text, achieving near-perfect accuracy without needing access to the model itself.

  • The method works even across different models—an inverse model trained on a small open chatbot can extract prompts from GPT-4o responses—creating a security vulnerability that could expose proprietary system instructions and user queries.

3 Key Points

  1. What happened

    Researchers at IIT Bombay and Adobe Research developed a method called "Previous-Token Prediction" (PTP) that reconstructs prompts fed to large language models by training an inverse model on synthetically generated data. The approach works without access to model weights and can reconstruct exact prompts or generate multiple semantically similar variants from a single LLM response.

  2. Why it matters

    The method exposes a broad security risk—companies risk exposing proprietary system prompts containing trade secrets and moderation rules, while individuals face extraction of personal or sensitive queries from text output. A small, open inversion model trained on one LLM (such as Qwen-3-0.6B) can reconstruct prompts from other models' responses (like GPT-4o), meaning attackers need not even know which model generated the text.

  3. What to watch

    The paper does not make explicit claims about attacks on commercial systems, but if the method works on current production models, AI labs will need to address and patch the issue quickly.

Ask the AI about this article →

Context & Analysis

The research reveals a fundamental asymmetry in how language models work: while forward prediction (next token) is the standard method for generation, the inverse process (reconstructing prior tokens) was long assumed to be impractical because many different prompts can produce similar responses. The IIT Bombay and Adobe team have overturned that assumption by training a specialized inverse model on synthetic data, demonstrating that near-perfect reconstruction is feasible without any access to the original model's weights or internals.

The security implications are severe because the attack surface is broad and the barrier to entry is low. A company or individual cannot rely on keeping their model proprietary to protect prompt secrecy—the method works across model boundaries, as shown by the Qwen-trained inverse successfully extracting meaning from GPT-4o output. System prompts often encode critical business logic, content moderation rules, and specialized instructions that companies treat as trade secrets. Individual users face parallel risk: sensitive queries, personal information, or confidential research embedded in a prompt could leak through an innocuous-looking output. The paper itself refrains from claiming the method has been deployed against live commercial systems, but the authors' framing suggests that if it succeeds on current production models, the AI research community and industry will need to develop mitigations rapidly.

FAQ

How does the Previous-Token Prediction method work?
Instead of predicting the next token like a normal language model, the researchers train an inverse model that predicts the previous tokens. This inverse model is trained entirely from scratch on synthetically generated data from the target LLM, using only the generated text.
Can the method reconstruct the exact original prompt?
Yes. In one example from the paper, the prompt "How to reach out to competitors to find their pricing strategies?" was reconstructed word for word, and the model also generated six additional variants that captured the core meaning but used different phrasing.
Does an attacker need to know which model produced the text?
No. An inverse model trained on the small Qwen-3-0.6B chatbot was able to reconstruct prompts from GPT-4o's responses, meaning a potential attacker would not need to know which model generated a given output.

Get the latest Large Language Models news every morning

For example, today's edition would include:

  • Visko raises $10M, launches live AI video model OrbisSiliconANGLE AI · 1h ago
  • Runway unveils Solaris, an AI that generates app interfaces in real timeTHE DECODER · 1h ago
  • Google AI Search flags Facebook users as dangerTHE DECODER · 1h ago

AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.

Free · takes 30 seconds · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. Q&As are published on this page for other readers too.

Related Articles

Next articleGoogle DeepMind's top exec rose from Indiana cornfields to lead AI readiness