P

Directional Stimulus: Definition and Examples

Directional Stimulus is a prompt engineering technique that consists of providing a specific hint or direction in the prompt to guide the language model toward the desired response, without directly giving it the answer.

Full definition

Directional Stimulus Prompting is a method introduced by researchers from the University of Hong Kong in 2023. It is based on the idea of adding a 'directional stimulus' — a small hint, keyword, or prompt — to the prompt in order to guide the model's reasoning in the right direction. Unlike a direct instruction, the stimulus acts as a subtle signal that pushes the LLM to explore a particular reasoning path.

In practice, the directional stimulus can take many forms: a relevant keyword, a draft outline, a targeted contextual element, or a specific constraint. The goal is to reduce prompt ambiguity and channel the model's generation toward more precise and relevant outputs, without restricting its creativity.

This technique differs from classic approaches like few-shot prompting because it does not require providing complete examples. Instead, it relies on minimal but strategically chosen hints. In the original article, the researchers even proposed training a small auxiliary model (a 'policy model') capable of automatically generating these optimal stimuli for a main LLM.

Directional Stimulus is particularly effective for summarization, dialogue generation, and reasoning tasks, where a simple hint can significantly improve the quality and relevance of responses. It is an elegant approach that exploits the ability of LLMs to pick up on weak signals to produce significantly better results.

Etymology

The term comes from English 'directional' (indicating a direction) and 'stimulus' (from Latin stimulus, goad). The expression was formalized in the research paper 'Guiding Large Language Models via Directional Stimulus Prompting' published in 2023 by Zekun Li et al. The image is that of a goad that guides the model in a specific direction without rigidly constraining it.

Concrete examples

Article summary with directional keywords

Summarize the following article focusing on these aspects: economic impact, technological adoption, resistance to change.

[ARTICLE_TEXT]

Creative generation with directional prompt

Write a short story about a space journey. The tone should evoke solitude and wonder. Start with a scene where the character watches the Earth recede.

Reasoning guided by a hint

Solve this math problem. Hint: think about using the Pythagorean theorem and decomposing the figure into right triangles.

[PROBLEM_STATEMENT]

Practical usage

To apply Directional Stimulus, first identify the specific aspect of the response you want to improve, then add a targeted hint in your prompt: a keyword, a thematic constraint, or a structural prompt. For example, instead of simply asking 'summarize this text', add the 3-4 key themes the summary should cover. This technique is especially useful when the model's responses are too vague or off-topic.

Related concepts

Chain-of-Thought PromptingFew-Shot PromptingPrompt ChainingInstruction Tuning

FAQ

What is the difference between Directional Stimulus and few-shot prompting?
Few-shot prompting provides complete examples (input + expected output) to guide the model by imitation. Directional Stimulus, on the other hand, only gives a hint or direction without providing a complete example of the answer. It is lighter in tokens and gives the model more freedom while effectively channeling it.
Does Directional Stimulus work with all language models?
Yes, this technique works with most modern LLMs (GPT-4, Claude, Gemini, Llama, etc.). The most powerful models are generally more receptive to subtle stimuli, while smaller models may require more explicit hints to be properly guided.
How to choose the right directional stimulus?
The choice of stimulus depends on the task. For a summary, use thematic keywords. For reasoning, suggest a method or an intermediate step. For creative generation, propose a tone, emotion, or opening scene. The key is that the hint is precise enough to guide the model without being so restrictive that it hampers the quality of the response.

See also

How to use this prompt

  1. Copy the prompt with the button above.
  2. Paste it into ChatGPT, Claude or your favorite AI assistant.
  3. Replace the bracketed variables with your details, then refine the result.

About Prompt Guide

Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.

More definitions

Get new prompts every week

Join our newsletter.