Prompt Baking
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
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2016Overcoming catastrophic forgetting in neural networkscited by 4,718
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
- 2016Concrete Problems in AI Safetycited by 1,582
- 2023A Comprehensive Survey of Continual Learning: Theory, Method and Applicationcited by 860
- 2022Large Language Models Can Self-Improvecited by 656
- 2023An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuningcited by 622
- 2018Progress & Compress: A scalable framework for continual learningcited by 516
- 2018Scalable agent alignment via reward modeling: a research directioncited by 438
- 2019Online Continual Learning with Maximally Interfered Retrievalcited by 376
- 2024A Survey on Knowledge Distillation of Large Language Modelscited by 276
6 more
- 2024A Comprehensive Study of Knowledge Editing for Large Language Modelscited by 157
- 2022Distilling Reasoning Capabilities into Smaller Language Modelscited by 155
- 2023What's the Magic Word? A Control Theory of LLM Promptingcited by 41
- 2019Learning to solve the credit assignment problemcited by 27
- 2022Engineering flexible machine learning systems by traversing functionally-invariant pathscited by 3
- 2021Gradient-Free Neural Network Training via Synaptic-Level Reinforcement Learningcited by 2
Built on by
Citing papers per year: 2025: 4; 2026: 1.
5 papers.
- 2025Cartridges: Lightweight and general-purpose long context representations via self-studycited by 74
- 2026Doc-to-LoRA: Learning to Instantly Internalize Contextscited by 36
- 2025An Empirical Study of Testing Practices in Open Source AI Agent Frameworks and Agentic Applicationscited by 14
- 2025Mind the Metrics: Patterns for Telemetry-Aware In-IDE AI Application Development using the Model Context Protocol (MCP)cited by 4
- 2025Enhancing Factual Accuracy and Citation Generation in LLMs via Multi-Stage Self-Verificationcited by 0
- 2026Doc-to-LoRA: Learning to Instantly Internalize Contexts13 Feb 2026
- 2025An Empirical Study of Testing Practices in Open Source AI Agent Frameworks and Agentic Applications23 Sep 2025
- 2025Enhancing Factual Accuracy and Citation Generation in LLMs via Multi-Stage Self-Verification6 Sep 2025
- 2025Cartridges: Lightweight and general-purpose long context representations via self-study6 Jun 2025
- 2025Mind the Metrics: Patterns for Telemetry-Aware In-IDE AI Application Development using the Model Context Protocol (MCP)14 May 2025
Similar, not cited
Close in wording, no citation either way
- 2025Local Prompt Optimization
- 2023Prompt Sketching for Large Language Models
- 2025You Don't Need Prompt Engineering Anymore: The Prompting Inversion
- 2023Leveraging Training Data in Few-Shot Prompting for Numerical Reasoning
- 2025Self-Supervised Prompt Optimization
- 2025Learning a Single Token to Replace Long System Prompts in LLMs
- 2023Batch Prompting: Efficient Inference with Large Language Model APIs
- 2024Efficient Prompting Methods for Large Language Models: A Survey