The success of a Large Language Model (LLM) task depends heavily on its prompt. Most use-cases specify prompts using natural language, which is inherently ambiguous when multiple objectives must be simultaneously satisfied. In this paper we introduce UtilityMax Prompting, a framework that specifies tasks using formal mathematical language. We reconstruct the task as an influence diagram in which the LLM's answer is the sole decision variable. A utility function is defined over the conditional probability distributions within the diagram, and the LLM is instructed to find the answer that maximises expected utility. This constrains the LLM to reason explicitly about each component of the objective, directing its output toward a precise optimization target rather than a subjective natural language interpretation. We validate our approach on the MovieLens 1M dataset across three frontier models (Claude Sonnet 4.6, GPT-5.4, and Gemini 2.5 Pro), demonstrating consistent improvements in precision and Normalized Discounted Cumulative Gain (NDCG) over natural language baselines in a multi-objective movie recommendation task.
翻译:大语言模型任务的成功高度依赖于其提示词。大多数用例使用自然语言指定提示词,当需要同时满足多个目标时,这天然具有歧义性。本文提出UtilityMax Prompting框架,该框架使用形式化数学语言定义任务。我们将任务重构为一个影响图,其中大语言模型的回答是唯一的决策变量。在影响图内条件概率分布的基础上定义效用函数,并指导大语言模型寻找最大化期望效用的答案。这种方式约束模型显式推理目标函数的每个组成部分,使其输出指向精确的优化目标而非主观的自然语言解释。我们在MovieLens 1M数据集上,使用三个前沿模型(Claude Sonnet 4.6、GPT-5.4和Gemini 2.5 Pro)验证了该方法,在多目标电影推荐任务中,相较于自然语言基线,精准度与归一化折损累计增益(NDCG)均取得持续提升。