Turns out, AI might just be the ultimate used car salesman of the digital age.
A couple of researchers from Harvard have cooked up a way to make AI recommendation systems favor a particular product, potentially allowing a merchant to hijack an AI in their favor using what amounts to a prompt injection attack in the product description.
In “Manipulating Large Language Models to Increase Product Visibility“, Aounon Kumar and Himabindu Lakkaraju show how you could theoretically game the AI system to make it recommend pretty much anything. Got a $500 toaster that makes burnt offerings to the god of scorched bread? No problem! The AI will convince people it’s the best thing since… well, sliced bread.
How to Make AI Recommend Your Product
To make the AI recommend the target product, they came up with something called a “strategic text sequence” (STS). It’s a form of prompt injection attack where a vendor inserts specific text into the product information to influence the LLM’s recommendations. The text is intended to make the AI system recommend the product first, regardless of its merit vs. related products.
As the paper points out:
Search engines like Google Search and Microsoft Bing have begun integrating LLM-driven chat interfaces alongside their traditional search boxes. Chatbots like OpenAI’s Chat-GPT and Perplexity AI browse the Internet to retrieve
up-to-date information to enhance their response.
That is how the models come across the product information placed by the seller.
How to Generate an STS Injection
Last year, some researchers created an automated way of generating jailbreaks. They use a small model and optimize random strings until the inclusion of the string causes the model to disregard its system instructions and safeguards–jailbreaking it.
They found that the resulting attack strings were transferable, and so could be used against larger, more powerful models like OpenAI’s GPT.
The STS builds on that, starting with a placeholder string of “*” and generating variations, optimizing for product placement in lists of recommendations rather than violation of safeguards.
The specific optimization method is known as Greedy Coordinate Gradient (GCG). It tests different token combinations by selecting the highest-ranking alternatives based on how they affect the LLM’s output. The goal is to create a sequence that makes the LLM rank the vendor’s product as the top choice.
During the optimization they shuffle around the order of the products given to the LLM t make sure the target product remains highly ranked regardless of the order.
The manipulation relies on how the LLM processes information, allowing the seller to tweak the recommendation without the user realizing it.
Testing the STS
They tested this voodoo on a made-up catalog of coffee machines.
1. The “ColdBrew Master” – A fancy coffee maker priced at $199. Without the AI trickery, this overpriced bean extractor was not so great.
2. The “QuickBrew Express” – A more reasonable $89 option that usually came in second place. The Jan Brady of coffee makers, if you will.
After applying their magical STS, both of these products started popping up as top recommendations. The ColdBrew Master went from “never recommended” to “buy this or your life is meaningless” in about 100 iterations.
Thoughts
Remember that this is still in the research phase. But it does raise some pretty serious questions about the future of online shopping. We’ll soon need AI ad-blockers to protect us from hyper-optimized AI salesbots.
The researchers compare this to SEO, but that’s saying a flamethrower is the same as a BIC lighter. They both make things hot, but the scale is just a tad different. This could hijack people’s money and be extremely anti-competitive.
So, what’s the takeaway here? First, don’t trust AI recommendations blindly. That $500 toaster probably isn’t going to change your life. Second, we might be headed for a phase where every product description is an elaborate code designed to hypnotize AI into recommending it.