Prompt Optimization
Automatic and learned methods that search for, compress, or train better prompts.
- Activation SteeringPTL-0219
- Automatic Prompt EngineerPTL-0073
- Directional Stimulus PromptingPTL-0079
- DSPyPTL-0075
- Emotion PromptingPTL-0082
- Low-Rank AdaptationPTL-0078
- QLoRAPTL-0241
- Model CascadePTL-0155
- Optimization by PromptingPTL-0074
- Parameter-Efficient Fine-TuningPTL-0240
- Prefix TuningPTL-0077
- Prompt CachingPTL-0081
- Prompt CompressionPTL-0080
- Prompt OptimizationPTL-0150
- Agentic Context EngineeringPTL-0214
- EvoPromptPTL-0154
- PromptbreederPTL-0153
- ProTeGiPTL-0151
- TextGradPTL-0152
- Prompt TuningPTL-0076
- QuantizationPTL-0230
Definitions
- Activation Steering
- Activation steering is a technique for controlling a language model's behavior at inference time by adding a steering vector, typically the difference between the model's internal activations on contrasting inputs, to its hidden activations during the forward pass, without changing its weights.
- Agentic Context Engineering
- Agentic Context Engineering (ACE) is a method for improving a language model application by treating its context, such as a system prompt or agent memory, as an evolving playbook that a loop of generation, reflection, and curation updates incrementally from execution feedback.
- Automatic Prompt Engineer
- Automatic Prompt Engineer (APE) uses a language model to generate candidate instructions for a task from input-output examples, scores each candidate on held-out data, and selects the best one.
- Directional Stimulus Prompting
- Directional stimulus prompting trains a small policy model to generate instance-specific hints, such as keywords, that are added to the prompt to steer a large frozen model toward desired outputs.
- DSPy
- DSPy is a framework that treats language-model pipelines as programs of declarative modules, and compiles them by automatically optimizing the prompts and few-shot demonstrations for each module against a metric.
- Emotion Prompting
- Emotion prompting appends emotional or motivational phrases, such as "This is very important to my career," to a prompt in an attempt to improve model performance.
- EvoPrompt
- EvoPrompt optimizes prompts with evolutionary algorithms, such as genetic algorithms and differential evolution, in which a language model performs the crossover and mutation steps on a population of prompts.
- Low-Rank Adaptation
- Low-rank adaptation (LoRA) fine-tunes a language model by training small low-rank matrices added to its weight layers while freezing the original weights, drastically reducing the number of trainable parameters.
- Model Cascade
- A model cascade sends each query to a cheaper model first and escalates it to progressively more capable and expensive models only when a scoring function judges the cheaper model's answer unreliable.
- Optimization by Prompting
- Optimization by PROmpting (OPRO) uses a language model as an optimizer, giving it a meta-prompt containing previously tried prompts and their scores and asking it to propose a better prompt, repeating over many rounds.
- Parameter-Efficient Fine-Tuning
- Parameter-efficient fine-tuning (PEFT) adapts a pretrained model to a task by training only a small number of added or selected parameters while the original weights stay frozen, instead of updating every weight as full fine-tuning does.
- Prefix Tuning
- Prefix tuning learns continuous task-specific vectors that are prepended to the activations at every layer of a frozen language model, steering generation without changing the model's weights.
- Prompt Caching
- Prompt caching stores the model's processed state for a reused prompt prefix, such as a long system prompt or document, so later requests sharing that prefix are cheaper and faster.
- Prompt Compression
- Prompt compression shortens a prompt by removing tokens that contribute little information, typically scored by a smaller language model, to cut cost and latency while preserving task performance.
- Prompt Optimization
- Prompt optimization is the automatic search for a better prompt, in which a language model proposes candidate instructions or examples and each candidate is scored on an evaluation set until performance stops improving.
- Prompt Tuning
- Prompt tuning learns a small set of continuous "soft prompt" embeddings that are prepended to the input, by gradient descent, while keeping the language model's weights frozen.
- Promptbreeder
- Promptbreeder is an evolutionary prompt-optimization method in which a population of task prompts is mutated and selected by fitness on training examples, while the mutation prompts that generate the changes are themselves evolved.
- ProTeGi
- ProTeGi (Prompt Optimization with Textual Gradients) improves a prompt by having a language model describe, in natural language, what is wrong with it based on the errors it produces, then edit the prompt to fix those problems, keeping the best candidates with beam search.
- QLoRA
- QLoRA is a fine-tuning method that keeps a pretrained model frozen in 4-bit quantized form and trains low-rank adapters on top of it, backpropagating gradients through the quantized weights, which greatly reduces the memory needed to fine-tune large models.
- Quantization
- Quantization reduces the numeric precision of a model's weights, and sometimes its activations, from 16- or 32-bit floating point to lower-precision formats such as 8-bit or 4-bit integers, cutting memory use and inference cost at some cost in accuracy.
- TextGrad
- TextGrad is a framework that optimizes systems built from LLM calls by propagating natural-language feedback backward through the computation, so that each component, such as a prompt or a piece of code, is revised according to criticism of the final output.