Skip to content
Aug 12, 2026
Researchers at IIT Bombay and Adobe Research have developed a method that can reconstruct prompts fed to large language models with near-perfect accuracy, using only the text output. The approach works without access to model weights and even applies to third-party models.
Large language models generate text by predicting the next most likely word, token by token. Reversing that process and reconstructing the original prompt from the output has long been considered impractical, since many different prompts can produce similar responses.
A new paper from researchers at IIT Bombay and Adobe Research shows it can be done with surprising accuracy. Their method, called "Previous-Token Prediction" (PTP), reverses how language models work. Instead of predicting the next token, the researchers train an inverse language model that predicts the previous tokens.









