Abstract
Writing effective prompts for large language models (LLM) can be unintuitive and burdensome. In response, services that optimize or suggest prompts have emerged. While such services can reduce user effort, they also introduce a risk: the prompt provider can subtly manipulate prompts to produce heavily biased LLM responses. In this work, we show that subtle synonym replacements in prompts can increase the likelihood (by a difference up to 78%) that LLMs mention a target concept (e.g., a brand, political party, nation). We substantiate our observations through a user study, showing our adversarially perturbed prompts 1) are indistinguishable from unaltered prompts by humans, 2) push LLMs to recommend target concepts more often, and 3) make users more likely to notice target concepts, all without arousing suspicion. The practicality of this attack has the potential to undermine user autonomy. Among other measures, we recommend implementing warnings against using prompts from untrusted parties.
Introduction
As Large Language Models (LLMs) become ubiquitous, a secondary industry of prompt optimizers, recommendation engines (like Amazon’s Rufus or Microsoft’s Copilot), and prompt libraries has emerged to help users overcome the hurdle of "prompt engineering." However, this paper identifies a critical security gap: users often trust these third-party prompt providers without realizing they can act as "adversaries."
By making tiny, semantically equivalent changes to a prompt before it reaches the LLM, an attacker can covertly bias the model’s response toward a target brand, political party, or nation. This "Sales Whisperer" attack is designed to be inconspicuous; if the prompt appears natural and the response remains coherent, the user is unlikely to become suspicious. This research proves that such "whispering" is both computationally feasible and highly effective at shifting brand recommendation probabilities by up to 78%.
Methodology
The researchers developed a two-step attack framework to demonstrate model brittleness and human-inconspicuous manipulation:
- Paraphrasing Analysis: Initial tests showed that entirely different ways of asking the same question (e.g., "What is the best laptop?" vs. "Which laptop model do you consider the optimal choice?") lead to wildly different brand rankings in LLM outputs.
- Synonym Replacement: To maximize stealth, the attack focuses on swapping a few words with synonyms (e.g., changing "ultimate" to "superior").
- Loss-Guided Selection: Testing every synonym combination is computationally expensive. The authors designed a logit-based loss function that allows an attacker to predict which specific word swaps will most likely force the LLM to mention a target concept early in its response.
- User Study: A between-subjects study with 845 participants was conducted to determine if humans noticed the manipulations and if those manipulations successfully "nudged" their choices.
Experimental Setup and Datasets
The attack was evaluated across two main scenarios using six open-source models (Llama 2, Llama 3, Gemma, Mistral, and Qwen) and transferability tests on GPT-3.5 Turbo:
- Product Recommendations: 77 categories (e.g., vacuum cleaners, smartphones) with associated popular brands.
- Societal Topics: 11 potentially controversial topics (e.g., "Who won the space race?", "Most influential U.S. president").
Key Findings
Extreme Brittleness and Priming
LLMs are remarkably sensitive; a single word change can move a brand's mention probability from 0% to 100%. For example, in the Gemma-it model, slightly different prompts for a "pressure cooker" caused the brand "InstantPot" to shift from never being mentioned to always being mentioned. The attack specifically targets the beginning of the LLM response, as a 10-word delay in mentioning a brand significantly reduces the chance a user will notice or choose it.
Human Perception and Nudging
In the user study, perturbed prompts were statistically indistinguishable from base prompts in terms of clarity and perceived bias. In 5 out of 6 product categories, the attack successfully increased the prominence of the target brand. Users were more likely to notice the brand, perceive it as the "top" recommendation, and state they would choose it.
Economic Incentive and Transferability
Prompt whispering is significantly cheaper than traditional digital advertising (CPM). An attacker only needs to pay for one inference to find the "perfect" prompt, which can then be distributed to thousands of users for free. Furthermore, prompts optimized for open-source models often transferred successfully to closed-source models like GPT-3.5 Turbo, with correlation coefficients as high as 0.86.
Implications and Defenses
Current bias metrics, which focus on hate speech or gender, fail to capture this type of commercial or algorithmic bias. The authors recommend a multi-pronged defense:
- User Warnings: Implementing warnings when users utilize prompts from untrusted third-party libraries.
- Robustness Requirements: Model providers should strive for higher prompt robustness to ensure minor synonym changes do not drastically alter output distributions.
- Continuous Auditing: Prompt recommendation services should be subject to auditing to detect systematic biases toward specific brands or concepts.
Summary updated