← Latest papers
💬 NLP

Generative Prompt Internalization

This paper proposes Generative Prompt Internalization (GenPI), a lightweight joint training method that enables large language models to autonomously generate and internalize complex prompts and their underlying reasoning, thereby achieving high performance and efficient inference without the computational overhead of explicit, lengthy prompts.

Original authors: Haebin Shin, Lei Ji, Yeyun Gong, Sungdong Kim, Eunbi Choi, Minjoon Seo

Published 2026-02-12
📖 5 min read🧠 Deep dive

Original authors: Haebin Shin, Lei Ji, Yeyun Gong, Sungdong Kim, Eunbi Choi, Minjoon Seo

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Problem: The "Heavy Backpack"

Imagine you are hiring a brilliant but very literal assistant (the AI) to do a complex job, like navigating a website or managing a computer server.

To make sure the assistant does the job right, you have to give them a massive instruction manual every single time you ask them a question. This manual is 1,000+ words long. It tells them:

  • "You are a Linux expert."
  • "Always think before you act."
  • "If the screen gets cut off, try a different command."
  • "Here are three examples of how to do it."

The Issue: Every time you ask a new question, you have to carry this heavy manual, read it, and hand it to the assistant again.

  • It's slow: Carrying the manual takes time (computational overhead).
  • It's expensive: The more words you send, the more it costs the service provider.
  • It's repetitive: You are saying the same rules over and over again, like a teacher repeating the rules of a game before every single turn.

The Old Solutions: "Compressing" the Manual

Scientists tried to solve this by:

  1. Summarizing the manual: Trying to cut out words to make it shorter. Problem: If you cut too much, the assistant forgets the rules and makes mistakes.
  2. Memorizing the manual (Distillation): Trying to teach the assistant to memorize the manual so you don't have to show it to them. Problem: The old way of teaching was like saying, "Look at what I did when I had the manual, and guess what I would do without it." The assistant never actually saw the manual during training, so it didn't truly understand why the rules existed.

The New Solution: GenPI (The "Internalized Chef")

The authors propose Generative Prompt Internalization (GenPI).

Think of GenPI not as a student who memorizes a recipe, but as a Master Chef who has internalized the recipe so deeply they can cook the dish and explain why they chose those ingredients without ever looking at the card.

Here is how GenPI works, broken down into three simple steps:

1. The "Role-Play" Training (The Magic Trick)

Usually, to train an AI, you need a human to act as the "User" and another to act as the "Environment" (like a computer or a website). This is hard to do for every new task.

GenPI uses a clever trick called Self Role-Playing.

  • Imagine the AI is an actor.
  • The researchers tell the AI: "Okay, for the next 1,000 lines, you are the User asking questions. Then, switch hats and become the Computer answering them."
  • The AI talks to itself, simulating a whole conversation. This creates a fake dataset of "User vs. Computer" interactions without needing real humans or real servers. It's like an actor rehearsing a scene alone in a room to learn the script.

2. The "Why" Lesson (The Secret Sauce)

This is the most important part. When training the AI, GenPI doesn't just say, "Do this." It asks the AI to do two things simultaneously:

  1. Generate the Output: "Here is the correct answer."
  2. Generate the Reason: "Here is the instruction manual I was following, and here is why I had to change my answer to follow it."

Analogy: Imagine a student taking a test.

  • Old Method: The teacher says, "You got this wrong. Here is the right answer. Memorize it."
  • GenPI Method: The teacher says, "You got this wrong. Here is the right answer. But also, write down the rulebook I was holding, and explain exactly why that rulebook forced you to change your answer."

By forcing the AI to generate the reason and the prompt itself, the AI truly understands the logic, not just the pattern.

3. The Result: The "Lightweight" AI

Once trained, the AI no longer needs the heavy instruction manual.

  • Before: You send a 1,000-word prompt + your question.
  • After: You just send your question. The AI has the "rules" baked into its brain.

Why This Matters (The Benefits)

  • Speed: It's like switching from driving a truck carrying a heavy load to driving a sleek sports car. The AI responds much faster because it's not processing thousands of extra words.
  • Cost: Sending fewer words means it costs less money to run the AI.
  • Accuracy: Because the AI learned why the rules matter (by generating the reasons), it handles complex tasks better than methods that just tried to compress the text.

Summary

GenPI is a method that teaches an AI to "swallow" the instruction manual whole. Instead of carrying the manual everywhere, the AI learns to recreate the manual in its head and explain its own behavior. This makes AI agents faster, cheaper, and smarter, especially for complex jobs like browsing the web or managing computer systems.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →