TL;DR
UtilityMax is a technique that translates a multi-criteria task from words into a formula. Instead of "find something good, cheap and fast," you describe each criterion as a separate variable and ask the model to score each one on its own, then multiply the scores — and pick the maximum.
The problem is that LLMs are bad at balancing competing goals packed into one sentence. When you write "find a profitable but reliable option," the model decides on its own how to weigh "profit" against "reliability." That's its interpretation, not yours. Crucially, making the requirement stricter ("find ONLY a profitable AND reliable one") doesn't help. Experiments showed that the strict wording sometimes does worse than the soft one. The reason: the ambiguity doesn't go away, it just gets locked in harder.
UtilityMax removes the ambiguity: each criterion gets its own slot in the formula O(a) = E[X1] × E[X2] × E[X3]. The model scores each variable in turn, then multiplies them and picks the option with the largest product.
Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.
Method Blueprint
Everything happens in a single prompt:
STEP 1: Describe the task and all criteria as variables X1, X2, X3...
→ Objective formula: O(a) = E[X1|a] × E[X2|a] × E[X3|a]
STEP 2: The model generates a list of candidates (possible answers)
→ A set of options a1, a2, a3...
STEP 3: For each candidate the model scores each variable separately
→ Numeric estimates E[X1], E[X2], E[X3] for each option
STEP 4: The model computes the product O(a) and picks the maximum
→ Final answer a* with an explanation
Example
Task: Alex is opening his first retail store and choosing a niche. He wants all at once: high margins, strong demand in big US metros (1M+ people) and a low barrier to entry (under $50,000). The criteria compete: high margins often mean an expensive entry, and mass demand often means thin margins.
Prompt:
I want you to solve the following task: choose a niche for a retail store
in a large US metro area (1M+ population).
Formally, let K be your knowledge. This includes all your internal knowledge
from your parameters, plus any external knowledge I provide.
Let P(A | K) be the probability distribution over possible niches given knowledge K.
Let a be a specific niche.
Let X1 | A=a be a variable representing the profit margin of niche a
(score from 0 to 1: 0 = minimal, 1 = maximum margin).
Let X2 | A=a be a variable representing the level of consumer demand
in large US metros for niche a
(score from 0 to 1).
Let X3 | A=a be a variable representing ease of entry: the probability
that startup costs will not exceed $50,000
(probability from 0 to 1).
Your task is to find the optimal niche a* that maximizes:
O(a) = E[X1 | A=a] × E[X2 | A=a] × E[X3 | A=a]
To do this:
1. Generate a list of 7–10 candidate niches.
2. For each niche, estimate E[X1], E[X2] and E[X3] separately, explaining
each estimate. Then compute O(a).
3. Return the niche a* that maximizes O, with a summary table of all scores.
Result: The model returns 7–10 niches with a score table — a separate row for each criterion plus the final product O(a). You'll see why, say, "sports nutrition" lost to "kids' products" — not because its margin was lower, but because the product of all three factors turned out smaller overall. The final choice is backed by numbers, not "seems like a good option overall."
Why It Works
An LLM can't silently weigh several goals. When you write "find a profitable and reliable option," the model generates text that sounds balanced — but no actual calculation happens. It doesn't know what matters more to you: 80% reliability at 60% profit, or the other way around. It's like asking an advisor to "bring me the best" with no criteria — they'll bring whatever they think is best.
What a model can do well: evaluate one specific thing once it's isolated. "How likely is it that this option meets criterion X — score from 0 to 1" is a task LLMs handle well. The model isn't balancing, it's focusing on one thing.
Here's what the formula does: it removes the "weigh several goals at once" task and replaces it with "score each goal in turn, then multiply." That turns one hard problem into a set of easy ones. The multiplicative structure is also logical: if even one criterion is close to zero, the whole option fails, even if the rest are good.
Control knobs: - Number of variables → add X4, X5 for finer control; drop the extras if you don't need them — a product of many numbers can tilt toward "middle-of-the-road" options - Score scale → you can use 1–10 or a percentage probability instead of 0–1 — just keep the same scale for all variables - Number of candidates → raise it to 15–20 for a broad search; lower it to 3–5 if you already know the options and just want to compare - Variable descriptions → the more precise the description ("probability that the investment stays under $50,000"), the better calibrated the score
Prompt Template
I want you to solve the following task: {task description}.
Formally, let K be your knowledge. This includes all your internal knowledge
from your parameters, plus any external knowledge from this prompt or the chat history.
Let P(A | K) be your probability distribution over possible answers given knowledge K.
Let a be one of the possible answers.
Let X1 | A=a be a variable representing {criterion 1 description} for answer a
(score from 0 to 1).
Let X2 | A=a be a variable representing {criterion 2 description} for answer a
(score from 0 to 1).
Let X3 | A=a be a variable representing {criterion 3 description} for answer a
(score from 0 to 1).
Your task is to find the optimal answer a* that maximizes:
O(a) = E[X1 | A=a] × E[X2 | A=a] × E[X3 | A=a]
To do this you must:
1. Generate a set of {number} candidates.
2. For each candidate, estimate E[X1], E[X2] and E[X3] separately
using your knowledge, then compute O(a).
3. Return the answer a* that maximizes O, with a table of all scores.
What to fill in:
- {task description} — a concrete goal: "choose a contractor," "recommend a book," "pick a feature for the MVP"
- {criterion X description} — one measurable aspect: "probability that delivery takes no more than 2 weeks," "expected level of interest for a 30-year-old techie reader"
- {number} — how many options to search (7–10 for an open search, 3–5 if you already know the options)
Important: describe each criterion as concretely as possible. "High quality" — bad. "Probability that the customer is satisfied and comes back" — good.
🚀 Quick start — paste into a chat:
Here's a UtilityMax Prompting template. Adapt it to my task: {your task}.
Ask me questions to fill in all the fields.
[paste the template above]
The LLM will ask which criteria matter to you and how to measure them — because the formula needs concrete variables, not vague wishes. It will take the structure from the template and plug in your data.
Limitations
⚠️ Top-tier models only: On weaker models (below the level of Claude Sonnet, GPT-4o, Gemini Pro) the technique can do worse than a regular prompt — the model can't produce calibrated probability estimates. The author explicitly flags this risk.
⚠️ Depends on the quality of your variables: If you describe the criteria wrong, you optimize the wrong thing. Leave an important factor out of the formula and the model will ignore it. "Garbage in, garbage out" applies here with a vengeance.
⚠️ Not for subjective tasks: "Write a beautiful text" can't be broken into independent variables without losing the point. The technique works where criteria can be stated in measurable terms.
⚠️ The product punishes the uneven: If all criteria matter equally, the multiplicative formula will prefer "good at everything" over "excellent at one thing, weak at another." That's a feature, but you need to be aware of it.
How It Was Studied
The study used a solid proving ground — the MovieLens 1M dataset with real movie ratings. The task: based on a user's viewing history, recommend 10 movies out of 50 candidates, where the user wants only comedies and only romance — two competing filters on top of the overall rating.
Three prompts were compared: soft ("the user likes comedies and romance"), strict ("recommend ONLY comedies AND romance, nothing else") and UtilityMax with a three-variable formula — predicted rating × probability of the "comedy" genre × probability of the "romance" genre. They tested on 20 users with 20 requests each — 400 requests per model, on three top models.
The most interesting finding: the strict prompt was no better than the soft one — for Claude it even got worse on ranking quality. That matters: the intuition "say it more strictly and the model will comply better" doesn't hold. Meanwhile UtilityMax consistently beat both variants on all three models — the gap was statistically significant (p < 0.01). The improvement for Claude was ~12–19% depending on the metric — a noticeable gain that came purely from changing the prompt's structure.
Adaptations and Extrapolations
🔧 Technique: add weights to variables → control priorities
If one criterion matters more than the others, change the formula:
O(a) = E[X1]^2 × E[X2] × E[X3]. Raising to a power amplifies the influence of that variable. This isn't in the original paper — but it follows logically from the multiplicative structure.
🔧 Technique: binary variables for hard filter conditions
If a criterion is yes/no (e.g., "budget under $100,000"), describe the variable as the probability from 0 to 1 that the condition holds:
P(budget ≤ $100K | a). When multiplied, it works as a soft filter — options that break the condition get a score close to zero and drop out automatically.
🔧 Technique: two-stage search
First run UtilityMax for a broad shortlist (10–15 candidates), then apply it again to just the top 3 with a more detailed description of each variable. Coarse filter + fine calibration.
🔧 Automatic decomposition via the LLM
The author mentions this as a direction for future research — but you can try it today. Ask the model: "I have this task: {description}. Help me break its goal down into 3–5 independent, measurable criteria for UtilityMax Prompting." You'll get a draft set of variables — then tighten them up for your task.
Resources
Paper: UtilityMax Prompting: A Formal Framework for Multi-Objective Large Language Model Optimization — technical report
Author: Ofir Marom, independent researcher ([email protected])
Dataset: MovieLens 1M — F. Maxwell Harper, Joseph A. Konstan, 2015
Related techniques from the review: Chain-of-Thought (Wei et al., 2022), Program of Thoughts (Chen et al., 2023), Chain-of-Symbol (Hu et al., 2023), OPRO (Yang et al., 2024)