Built independently by an author, for readers. Read the story and support ChapterPal

keyword

automatic prompt engineering

Automatic prompt engineering is a process in artificial intelligence that automates the generation, evaluation, and refinement of natural language instructions used to guide large language models toward desired outputs. Rather than relying on manual trial-and-error prompt design by human users, this approach treats prompt construction as an automated search and optimization task. In practice, a model or search algorithm proposes candidate prompts based on task descriptions or input-output demonstrations, evaluates their effectiveness against specific performance metrics, and selects or iteratively improves the highest-scoring prompts to maximize task accuracy and alignment.

1 item

Guiding Large Language Models via Directional Stimulus Prompting

Guiding Large Language Models via Directional Stimulus Prompting

Zekun Li, Baolin Peng, Pengcheng He, Michel Galley, Jianfeng Gao, Xifeng Yan

OrganizationsMicrosoftUniversity of California, Santa Barbara

Why you should read this

Proposes Directional Stimulus Prompting, a framework that trains a small tunable model to generate instance-specific prompt hints for black-box language models, significantly boosting task performance and reasoning accuracy with minimal labeled data.

We introduce Directional Stimulus Prompting, a novel framework for guiding black-box large language models (LLMs) towards specific desired outputs. Instead of directly adjusting LLMs, our method employs a small tunable policy model (e.g., T5) to generate an auxiliary directional stimulus prompt for each input instance. These directional stimulus prompts act as nuanced, instance-specific hints and clues to guide LLMs in generating desired outcomes, such as including specific keywords in the generated summary. Our approach sidesteps the challenges of direct LLM tuning by optimizing the policy model to explore directional stimulus prompts that align LLMs with desired behaviors. The policy model can be optimized through 1) supervised fine-tuning using labeled data and 2) reinforcement learning from offline or online rewards based on the LLM’s output. We evaluate our method across various tasks, including summarization, dialogue response generation, and chain-of-thought reasoning. Our experiments indicate a consistent improvement in the performance of LLMs such as ChatGPT, Codex, and InstructGPT on these supervised tasks with minimal labeled data. Remarkably, by utilizing merely 80 dialogues from the MultiWOZ dataset, our approach boosts ChatGPT’s performance by a relative 41.4%, achieving or exceeding the performance of some fully supervised state-of-the-art models. Moreover, the instance-specific chain-of-thought prompt generated through our method enhances InstructGPT’s reasoning accuracy, outperforming both generalized human-crafted prompts and those generated through automatic prompt engineering. The code and data are publicly available.

Added

2026-09-26