Title: Prompt Segmentation and Annotation Optimisation: Controlling LLM Behaviour via Optimised Segment-Level Annotations
Primary area: interpretability and explainable AI
Keywords: prompt engineering, prompt optimisation, LLM, NLP

Abstract: Prompt engineering is crucial for effective interaction with generative artificial intelligence systems, yet existing optimisation methods often operate over an unstructured and vast prompt space, leading to high computational costs and potential distortions of the original intent. We introduce Prompt Segmentation and Annotation Optimisation (PSAO), a lightweight and model-agnostic framework designed to improve prompt controllability and efficiency. PSAO decomposes a prompt into interpretable segments (e.g., sentences) and augments each with human-readable annotations (e.g., {not important}, {important}, {very important}). These annotations guide large language models (LLMs) to allocate attention more effectively during response generation. We formally define the segmentations and annotations and provide theoretical guarantees that PSAO yields responses that are provably at least as good as, and often better than, those generated from the original prompt. Empirical results demonstrate that PSAO enhances LLM performance and can be seamlessly integrated with existing prompt optimisation methods or used as a stand-alone approach.

TL;DR: Controlling LLM Behavior via Optimised Segment-Level Annotations