As prompting matures, more techniques systematize and automate the process. DSPy, a framework from Stanford, replaces manual prompt writing with programmatic prompt optimization using compiled pipelines. Automatic prompt optimization more broadly uses algorithms or models to search for and improve prompts, reducing manual effort, while meta-prompting uses one model to generate or improve prompts for another model or for itself. A prompt template is a reusable structure with placeholders that can be filled with specific values at runtime, and dynamic prompting constructs prompts programmatically by inserting variable data into these templates. Prompt serialization converts prompts with complex structure into standardized formats such as JSON for programmatic use, and a seed prompt is a minimal, core prompt used as the starting point for generating variations.
Fine-tuning-adjacent methods offer lightweight adaptation. Prompt tuning is a method where only the prompt embeddings are trained while the model weights remain frozen, and prefix tuning adds trainable token embeddings to the beginning of the input to guide behavior without changing the model itself. In-context learning, by contrast, lets a model learn a new task purely from examples provided in the prompt, with no weight updates at all. Reinforcement Learning from Human Feedback (RLHF) trains models to follow instructions better, which makes clear, well-crafted prompts more reliable in practice. Constitutional AI prompting, developed by Anthropic, has the model critique and revise its own outputs based on a defined set of principles.
Tool-use prompting instructs the model to call external tools such as APIs, code runners, or search engines as part of its reasoning, and an agentic prompt gives the model a goal, available tools, and autonomy to plan and execute multi-step actions independently. Multimodal prompting extends these ideas to non-text inputs by including images, audio, or other modalities alongside text. Constraint relaxation progressively loosens overly strict prompt constraints when the model fails to produce satisfactory outputs, while active learning prompting designs prompts that ask the model to request the most informative data it needs rather than passively generating answers. The flipped interaction technique inverts the usual flow by asking the model to interview the user, gathering the information it needs before formulating a response, and represents one of many ways prompt engineering continues to expand the ways we collaborate with language models.