mlsanityData to 7 Oct 2026

Prompt Baking

arXiv 2409.13697 ↗First posted 4 Sep 2024cs.CL cs.AIcited by 5

Not on the map. Why?

Abstract (arXiv)

Two primary ways to change LLM behavior are prompting and weight updates (e.g., fine-tuning). Prompting LLMs is simple and effective, specifying the desired changes explicitly in natural language, whereas weight updates provide more expressive and permanent behavior changes, specified implicitly via training on large datasets. We present a technique for "baking" prompts into the weights of an LLM. Prompt Baking converts a prompt u and initial weights θ to a new set of weights θu such that new "baked" LLM behaves like the original prompted LLM. Mathematically, we minimize the KL divergence between Pθ(· | u) and Pθu(·), where P is the LLM's probability distribution over token sequences. Across all our experiments, we find prompts can be readily baked into weight updates. Baking chain-of-thought prompts improves zero-shot performance on GSM8K, ASDiv, MBPP, ARC-Easy, ARC-Challenge, and CommonsenseQA benchmarks. Baking news headlines directly updates an LLM's knowledge. And baking instructions & personas alleviates "prompt forgetting" over long sequences. Furthermore, stopping baking early creates "half-baked" models, continuously scaling prompt strength. Baked models retain their sensitivity to further prompting and baking, including re-prompting with the baked-in prompt. Surprisingly, the re-prompted models yield further performance gains in instruction following, as well as math reasoning and coding benchmarks. Taking re-prompting and re-baking to the limit yields a form of iterative self-improvement we call Prompt Pursuit, and preliminary results on instruction following exhibit dramatic performance gains. Finally, we discuss implications for AI safety, continuous model updating, enhancing real-time learning capabilities in LLM-based agents, and generating more stable AI personas.

Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 18 of its 60 references that are in the map. First posted on arXiv 4 Sep 2024.

Builds on

18 of 60 references.

References · 18

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
  3. 2016Overcoming catastrophic forgetting in neural networkscited by 4,718
  4. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
  5. 2016Concrete Problems in AI Safetycited by 1,582
  6. 2023A Comprehensive Survey of Continual Learning: Theory, Method and Applicationcited by 860
  7. 2022Large Language Models Can Self-Improvecited by 656
  8. 2023An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuningcited by 622
  9. 2018Progress & Compress: A scalable framework for continual learningcited by 516
  10. 2018Scalable agent alignment via reward modeling: a research directioncited by 438
  11. 2019Online Continual Learning with Maximally Interfered Retrievalcited by 376
  12. 2024A Survey on Knowledge Distillation of Large Language Modelscited by 276
6 more
  1. 2024A Comprehensive Study of Knowledge Editing for Large Language Modelscited by 157
  2. 2022Distilling Reasoning Capabilities into Smaller Language Modelscited by 155
  3. 2023What's the Magic Word? A Control Theory of LLM Promptingcited by 41
  4. 2019Learning to solve the credit assignment problemcited by 27
  5. 2022Engineering flexible machine learning systems by traversing functionally-invariant pathscited by 3
  6. 2021Gradient-Free Neural Network Training via Synaptic-Level Reinforcement Learningcited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 4; 2026: 1.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Local Prompt Optimization
  2. 2023Prompt Sketching for Large Language Models
  3. 2025You Don't Need Prompt Engineering Anymore: The Prompting Inversion
  4. 2023Leveraging Training Data in Few-Shot Prompting for Numerical Reasoning
  5. 2025Self-Supervised Prompt Optimization
  6. 2025Learning a Single Token to Replace Long System Prompts in LLMs
  7. 2023Batch Prompting: Efficient Inference with Large Language Model APIs
  8. 2024Efficient Prompting Methods for Large Language Models: A Survey