Papers
Topics
Authors
Recent
Search
2000 character limit reached

Personalized Prompt Optimization

Updated 5 July 2026
  • Personalized Prompt Optimization is a family of techniques that tailor prompt interfaces using user data and contextual signals to improve model responses.
  • It encompasses methods like optimizing natural-language instructions, soft prompts, and system prompts via reinforcement learning, search, and self-evolution.
  • Empirical evidence shows PPOpt boosts performance in recommendation, text generation, and code generation, underscoring its effectiveness in adaptive prompt engineering.

Personalized Prompt Optimization (PPOpt) denotes a family of methods that optimize prompts as adaptive interfaces between data, users, tasks, and fixed or lightly tuned foundation models. Across recent work, the optimized object may be a discrete natural-language instruction, a user-conditioned soft prompt, a profile-generation template, a memory-augmented prompt, or a system prompt for an optimizing agent itself. The unifying idea is that prompt quality is not treated as static: it is conditioned on user profiles, interaction histories, task instances, model idiosyncrasies, feedback signals, or accumulated experience, and is improved by search, learning, reinforcement, or self-evolution rather than by one-shot manual engineering (Wu et al., 2022, Hebert et al., 2024, Liang et al., 23 Mar 2026).

1. Conceptual scope and units of personalization

The literature does not use one single canonical formalism for PPOpt. Instead, it instantiates personalization at several granularities. In sequential recommendation, personalization is explicit and user-conditioned: a prompt generator maps user profiles AuA_u or concatenated profile embeddings xu\mathbf{x}_u to personalized soft prefix prompts Pu\mathbf{P}^u, which are prepended to the behavioral sequence before a Transformer-based recommender encodes it (Wu et al., 2022). In explainable recommendation, personalization appears as user- and item-specific prompt tokens, either as discrete feature prompts or continuous prompt vectors u\mathbf{u} and i\mathbf{i} prepended to a GPT-2 input for explanation generation (Li et al., 2022).

In personalized language prompting, the optimized object is a user-specific soft prompt PuP_u computed from a long interaction history HuH_u, yielding the conditional model PθLM(Yu[Pu;T;X])P_{\theta_{LM}}(Y_u \mid [P_u; T; X]). Here personalization is function-based rather than tied to explicit per-user prompt parameters stored independently of the user history (Hebert et al., 2024). In prompt rewriting for personalized text generation, the personalized component is not the entire prompt but the user-context summary and synthesis sections Su(x,E)\mathbf{Su}(x,\mathcal{E}) and Sy(x,E)\mathbf{Sy}(x,\mathcal{E}), which are rewritten to better steer a frozen API-only LLM (Li et al., 2023).

In code generation, personalization is instance-level rather than user-level. Prompt optimization is modeled as a sequential decision-making process over a natural-language prompt xu\mathbf{x}_u0, with a PPO agent choosing among direct generation, lexical mutation, and semantic rewriting based on test-derived rewards for the current programming task (Esfahani et al., 18 May 2026). In memory-driven prompt optimization, the prompt becomes query-dependent via xu\mathbf{x}_u1, where xu\mathbf{x}_u2 is assembled from retrieved strategy templates and error patterns (Liang et al., 23 Mar 2026). In interactive systems, personalization can be implicit in a human assessment functional xu\mathbf{x}_u3, where the preferred prompt is whichever best matches a specific user’s preferences over prompt text, sample predictions, explanations, and xu\mathbf{x}_u4 (Li et al., 2024).

Formulation Optimized prompt object Personalization unit
PPR Personalized soft prefix xu\mathbf{x}_u5 User profile and cold-start behavior (Wu et al., 2022)
PEPLER / PERSOMA Continuous prompt tokens or adapters User ID, item ID, or interaction history (Li et al., 2022, Hebert et al., 2024)
PPO code prompting Rewritten natural-language task prompt Task instance and backbone model (Esfahani et al., 18 May 2026)
MemAPO / DelvePO / SePO Memory- or evolution-composed prompts Query, task, or optimization history (Liang et al., 23 Mar 2026, Tao et al., 21 Oct 2025, Tao et al., 3 Jun 2026)

A plausible implication is that PPOpt is best understood not as one algorithmic family but as a design space whose central variable is the conditioning signal used to specialize prompts.

2. Prompt representations and architectural patterns

One major axis in PPOpt is the representation of the prompt itself. Continuous prompt methods treat prompts as learned vectors in model embedding space. PPR constructs xu\mathbf{x}_u6 personalized soft prefix tokens xu\mathbf{x}_u7 through a prompt generator xu\mathbf{x}_u8, then prepends them to the item sequence so that the pre-trained sequential encoder processes a prompt-enhanced sequence xu\mathbf{x}_u9 (Wu et al., 2022). PEPLER similarly prepends continuous user and item vectors to a GPT-2 explanation sequence, while PERSOMA compresses free-form user interactions into soft prompt embeddings via an MLP, Transformer, or Perceiver-based adapter before concatenating them with task soft prompts and input text (Li et al., 2022, Hebert et al., 2024).

A second pattern uses discrete textual prompts. In automatic reranking, AGP optimizes a global profile-generation prompt Pu\mathbf{P}^u0 that instructs an LLM how to infer a user profile Pu\mathbf{P}^u1 from textual history Pu\mathbf{P}^u2; that inferred profile is then used in a second prompt for reranking (Wang et al., 4 Apr 2025). MePO optimizes natural-language prompts through merit-guided rewriting and trains a lightweight prompt optimizer to output a new prompt Pu\mathbf{P}^u3 from a lower-quality Pu\mathbf{P}^u4 (Zhu et al., 15 May 2025). SPO likewise searches over discrete prompts, but uses only output-vs-output comparisons rather than ground truth during optimization (Xiang et al., 7 Feb 2025).

A third pattern uses structured or compositional prompts. DelvePO decomposes prompts into tagged components such as Role, Task description, Output format, Workflow, and Examples, then evolves them at the component level rather than rewriting monolithic prompt strings (Tao et al., 21 Oct 2025). MemAPO composes prompts from an invariant instruction plus memory-derived rules and templates, while SePO treats system prompts themselves as evolutionary objects in an archive-based search over human-readable instructions (Liang et al., 23 Mar 2026, Tao et al., 3 Jun 2026). AutoFed extends the prompt notion outside language-only settings by learning a prompt matrix Pu\mathbf{P}^u5 from local traffic sequences and injecting it as the first input token to a personalized decoder in federated learning (Zhao et al., 31 Dec 2025).

This suggests that “prompt” in PPOpt is a broader computational object than natural-language instructions alone. It can be a token sequence, a prompt matrix, a retrieved rule set, or a structured collection of components.

3. Optimization objectives and algorithmic families

The optimization mechanisms used in PPOpt are correspondingly diverse. In recommendation, PPR follows a pre-train Pu\mathbf{P}^u6 prompt-tune paradigm. A pre-trained sequential recommender Pu\mathbf{P}^u7 is adapted to cold users by optimizing a pairwise ranking loss Pu\mathbf{P}^u8 plus a prompt-oriented contrastive loss Pu\mathbf{P}^u9, yielding u\mathbf{u}0. Two regimes are defined: PPR(light), where only the prompt generator and profile MLP are trained, and PPR(full), where backbone parameters are also updated (Wu et al., 2022).

In explainable recommendation, PEPLER addresses the mismatch between randomly initialized prompt parameters and a pre-trained PLM by sequential tuning: first fixed-LM prompt tuning, then prompt+LM fine-tuning. It further introduces recommendation-as-regularization through a joint objective u\mathbf{u}1, forcing prompt embeddings to support both explanation generation and rating prediction (Li et al., 2022). In personalized text generation, prompt rewriting uses a supervised-learning stage based on best sampled prompt variants, followed by PPO fine-tuning with BLEU reward from a frozen generator; RL from scratch performs poorly, whereas SLu\mathbf{u}2RL yields the strongest results (Li et al., 2023).

Several systems formulate PPOpt directly as reinforcement learning or sequential control. Prompt optimization for code generation models prompt refinement as an MDP with state u\mathbf{u}3, action space u\mathbf{u}4, and a shaped reward defined by pass ratio and execution status. The PPO agent updates prompts iteratively to maximize episode return over tasks (Esfahani et al., 18 May 2026). Pu\mathbf{u}5O couples policy optimization with prompt optimization in RLVR: hard samples are identified by low average reward, GEPA evolves prompt templates for those samples, and the gains are distilled back into model parameters through context distillation rather than left as inference-time prompt hacks (Lu et al., 23 Mar 2026).

Other methods rely on preference learning, bandits, or self-supervision. MePO uses DPO on a prompt preference dataset of u\mathbf{u}6 pairs, learning a lightweight optimizer that internalizes interpretable merits such as clarity, precision, concise CoT, and preserving original information (Zhu et al., 15 May 2025). OPTS casts strategy selection as a Bernoulli multi-armed bandit over prompt design strategies plus an inaction arm, with Thompson sampling outperforming uniform selection and APET-style implicit selection (Ashizawa et al., 3 Mar 2025). SPO uses no labels or human references; it iteratively proposes a prompt u\mathbf{u}7, executes it on a few questions, and accepts it if an LLM evaluator prefers its outputs over those of the current best prompt (Xiang et al., 7 Feb 2025).

A final family is explicitly self-evolving. DelvePO combines roulette-wheel sampling, component-wise mutation and crossover, and memory-guided direction selection (Tao et al., 21 Oct 2025). MemAPO maintains a Correct-Template Memory and an Error-Pattern Memory, retrieving both at inference and editing both after each interaction (Liang et al., 23 Mar 2026). SePO extends this logic one level upward by optimizing the prompt agent’s own system prompt through open-ended evolutionary search with an archive of candidate prompts as stepping stones (Tao et al., 3 Jun 2026).

4. Feedback signals, memory, and the personalization substrate

The personalization signal in PPOpt may come from explicit user attributes, observed behavior, model outputs, or human assessment. In cold-start recommendation, user profiles such as age, gender, consumption level, occupation, or location are embedded and concatenated into u\mathbf{u}8, which conditions both the prompt generator and an attribute-level preference pathway. Prompt-oriented augmentations include masking profile features and masking items in the behavior sequence, with contrastive learning encouraging invariance under sparse or noisy observations (Wu et al., 2022).

In explainable recommendation and personalized language prompting, the signal is richer and often mixed. PEPLER uses user IDs, item IDs, item features, and ratings; PERSOMA uses title, description, and rating from many historical interactions, then studies sampling strategies such as recency, random, long tail, top-K popularity, and genre sample (Li et al., 2022, Hebert et al., 2024). AutoFed uses local client traffic sequences and graph structure to produce a client-aligned prompt matrix, while keeping personalized predictor parameters local and aggregating only shared representor parameters across clients (Zhao et al., 31 Dec 2025).

Test-driven frameworks derive personalization from execution feedback. In code generation, the reward distinguishes full success, partial success, total failure, and execution failure, with shaped rewards outperforming sparse binary rewards (Esfahani et al., 18 May 2026). AGP uses position-aware ranking feedback u\mathbf{u}9 comparing actual and target positions of ground-truth items, then aggregates this over batches with weights i\mathbf{i}0 to update the global profile-generation prompt (Wang et al., 4 Apr 2025). Pi\mathbf{i}1O identifies hard samples through low empirical success rates, then optimizes prompt templates specifically for that subset (Lu et al., 23 Mar 2026).

Human-in-the-loop and memory-driven systems turn preferences and error histories into prompt signals. iPrOp formalizes interactive prompt optimization as

i\mathbf{i}2

where i\mathbf{i}3 includes the prompt text, informative instances, model explanations, and i\mathbf{i}4 on a held-out subset; the human’s assessment function i\mathbf{i}5 supplies the effective personalization (Li et al., 2024). MemAPO stores successful strategies as templates i\mathbf{i}6 and failed reasoning as error patterns i\mathbf{i}7, then composes prompts for new queries using both (Liang et al., 23 Mar 2026). DelvePO similarly uses prompt memory and component memory as working memory so that future prompt edits are conditioned on historical successes and failures rather than on one-shot stochastic rewriting (Tao et al., 21 Oct 2025).

A plausible implication is that PPOpt systems differ less by whether they personalize and more by what substrate they treat as the source of personalization: profiles, histories, rankings, tests, interaction logs, or explicit judgments.

5. Empirical evidence across domains

In sequential recommendation, PPR reports statistically significant improvements over plain SASRec, BERT4Rec, CL4SRec, MeLU, and fine-tuning baselines on three large-scale datasets. In few-shot recommendation, examples include CIKM HIT@10 improving from 0.6836 for Fine-tuning to 0.6889 for PPR(full), QQBrowser NDCG@10 from 0.6944 to 0.6960, and AliEC HIT@10 from 0.7189 to 0.7275 for PPR(light). In zero-shot recommendation, CIKM NDCG@10 improves from 0.2463 to 0.2507, QQBrowser from 0.4016 to 0.4074, and AliEC HIT@5 from 0.3905 to 0.4014. PPR(light) updates only about 0.25–0.6% of full parameters across datasets, yet often surpasses full fine-tuning (Wu et al., 2022).

In explainable recommendation, continuous prompt learning in PEPLER consistently outperforms discrete prompt learning and several non-prompt baselines on TripAdvisor, Amazon, and Yelp, while sequential tuning is more robust than joint prompt+LM fine-tuning from random initialization (Li et al., 2022). In personalized language prompting, PERSOMA scales to long histories with far shorter prompt lengths than text-based personalization; for history length 50 under recency sampling, PERSOMA MLP with a frozen LM reaches i\mathbf{i}8, PERSOMA end-to-end reaches i\mathbf{i}9, while UEM Base is 0.396 and zero-shot Gemini 1.5 Pro is 0.261 (Hebert et al., 2024).

For test-driven optimization, PPO-based code prompt refinement substantially outperforms EPiC, Reflexion, and Random-Hybrid. On MBPP+ strict Pass@1, PPO reaches 57.58% with CodeT5+, 64.80% with CodeLLaMA, and 85.50% with DeepSeek-Coder; Soft-Pass@1 reaches 67.90%, 73.10%, and 88.20%, respectively (Esfahani et al., 18 May 2026). In RLVR, PPuP_u0O improves average accuracy from 60.5% under GRPO to 65.2% under PPuP_u1O-Teacher-Ref on DeepScaler-5K, and removing context distillation drops performance to 55.6%, below the RL baseline (Lu et al., 23 Mar 2026).

For reranking and prompt rewriting, AGP reports 5.61–20.68% improvements in NDCG@10 over baseline recommenders, with particularly strong gains for LightGCN, while training on only 100 users already delivers most of the benefit (Wang et al., 4 Apr 2025). In personalized text generation, the SLPuP_u2RL rewriter outperforms the original FtPersLlm prompts and both SL-only and RL-only variants. On Avocado, BLEU rises from 9.59 to 13.18; on Amazon reviews, from 5.00 to 13.07; on Reddit, from 13.13 to 20.59 (Li et al., 2023).

For lightweight or self-supervised optimizers, MePO achieves the best average performance across Qwen2-7B, Tulu2-7B-DPO, LLaMA2-7B-chat, and LLaMA3-8B-instruct, for example improving LLaMA3-8B-instruct average accuracy from 48.77 to 57.07 and Tulu2-7B-DPO from 41.05 to 48.37 (Zhu et al., 15 May 2025). SPO reaches average performance 66.9 at an average cost of \$P_u$34.51 for <a href="https://www.emergentmind.com/topics/optimization-by-prompting-opro-1ef0c2f1-2d5f-4233-9cb5-d78feb916a54" title="" rel="nofollow" data-turbo="false" class="assistant-link" x-data x-tooltip.raw="">OPRO</a> and 63.9 at \$13.14 for TextGrad (Xiang et al., 7 Feb 2025). SePO-Generalist improves average accuracy by 4.49 points over Manual-CoT across AIME’25, ARC-AGI-1, GPQA, MBPP, and Sudoku, reaching 76.38 versus 71.89 (Tao et al., 3 Jun 2026). DelvePO reports average performance 70.48 on DeepSeek-R1-Distill-Llama-8B, 90.56 on GPT-4o-mini, and 75.25 on Qwen2.5-7B-Instruct, outperforming APE, EvoPrompt, and PromptBreeder under matched settings (Tao et al., 21 Oct 2025).

Taken together, these results indicate that PPOpt is not restricted to a single modality or task family. It has been validated in recommendation, explanation generation, long-history personalization, code generation, reranking, federated prediction, system-prompt optimization, and self-supervised discrete prompt search.

6. Limitations, tensions, and future directions

Several recurrent limitations appear across the literature. Scalability remains a central issue. PPR notes the need to verify personalized prompting on “industrial extremely large-scale recommendation datasets and pre-trained models,” especially when user bases or item vocabularies are very large (Wu et al., 2022). AutoFed reduces communication through prompt-related sharing, but still assumes relatively heavy local models and graph-structured data, which may be challenging for resource-constrained clients (Zhao et al., 31 Dec 2025). AGP and PPO-based prompt refinement both require repeated LLM calls plus repeated evaluation, making them appropriate primarily where correctness or personalization gain justifies added compute (Wang et al., 4 Apr 2025, Esfahani et al., 18 May 2026).

Another tension is the scope of context available to the optimizer. PPO-based code prompt refinement uses a prompt-only state and explicitly excludes generated code, previous actions, rewards, and unit-test tracebacks from the state representation, which limits debug-aware adaptation (Esfahani et al., 18 May 2026). Personalized text generation rewrites only selected prompt components, not the full prompt structure, and optimizes against BLEU reward, which may encourage conservative rewrites (Li et al., 2023). PERSOMA handles long histories well but does not address true cold start, since no PuP_u4 implies no user soft prompt PuP_u5 (Hebert et al., 2024).

Interpretability and preference modeling remain uneven. Continuous prompt systems such as PPR, PEPLER, PERSOMA, and AutoFed learn prompt vectors or matrices without explicit semantics, even though those prompts clearly influence downstream behavior (Wu et al., 2022, Li et al., 2022, Hebert et al., 2024, Zhao et al., 31 Dec 2025). iPrOp exposes prompt text, predictions, explanations, and metrics to users, but does not yet learn a persistent model of user preferences across sessions (Li et al., 2024). MemAPO and DelvePO move toward interpretable prompting knowledge through explicit memories of templates, rules, and components, but both still face memory-management, interference, and scaling questions as domains or users proliferate (Liang et al., 23 Mar 2026, Tao et al., 21 Oct 2025).

Future directions identified in the cited work converge on a few themes. One is richer conditioning: dynamic user profiles, streaming updates, multimodal inputs, code tracebacks, and explicit user descriptors rather than only static features or prompt text (Wu et al., 2022, Esfahani et al., 18 May 2026). A second is stronger personalization infrastructure: per-user memory banks, contextual bandits, profile-conditioned DPO, and human-in-the-loop prompt selection with explicit preference elicitation (Ashizawa et al., 3 Mar 2025, Zhu et al., 15 May 2025, Li et al., 2024). A third is broader optimization scope: SePO proposes extending self-evolving optimization from system prompts to tools and workflows, while MemAPO suggests multimodal and agentic extensions of strategy and error memory (Tao et al., 3 Jun 2026, Liang et al., 23 Mar 2026).

These trajectories suggest that PPOpt is evolving from isolated prompt rewriting into a general methodology for adaptive interface design between foundation models and heterogeneous users, tasks, and environments.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Personalized Prompt Optimization (PPOpt).