As generative AI tools such as ChatGPT, Microsoft Copilot, Perplexity and more have a growing impact on our lives, there is increasing interest in influencing the output of the large language models (LLMs) that underly them.
The art of influencing LLMs, known as “LLM optimization” (LLMO) is an emerging field but one that it’s worth paying attention to. Similar efforts to influence search engines, known as search engine optimization (SEO), are a huge industry (estimated at US$68.1 Billion in the year 2022 by Global Industry Analysts, Inc).
Note: you may see other terms being used in place of LLMO. For example, GAIO (generative AI optimization), AIO (AI optimization), AEO (AI Engine Optimization) or GEO (generative engine optimization). They’re generally talking about very much the same sort of thing.
What Could Influencing LLMs Achieve?
Influencing the output of LLMs could have far-reaching effects. In the commercial world alone these could include:
- Ensuring that a product or service is considered for a purchase decision
- Giving a favourable impression of a product or service
- Framing how someone approaches a purchase
Is LLMO Feasible?
There are challenges to effective LLMO, but research is already providing evidence that LLMO is not only possible but potentially very impactful.
“… these methods are capable of boosting source visibility by up to 40% in generative engine responses”
Authors of “GEO: Generative Engine Optimization”
What Does LLMO Involve?
When thinking about influencing the output of a large language model, you can consider two broad approaches:
- Influencing the weights of the model itself
- Influencing the context that is provided to the model as part of a particular request
Approach 1: Influencing Models Themselves
Influencing a model’s training data influences the resultant model
Each large language model is, in essence, a vast array of parameters known as ‘weights’. These weights are the result of a computationally expensive training process that makes use of huge quantities of content.
If you can somehow influence some of the content that is used for training a model, you’ll be influencing the resultant model.
Training data includes content from the internet
The content that has been used to train large language models includes large datasets such as the following:
- Common Crawl (an open source collection of web data)
- Wikipedia
- Large collections of public domain books
OpenAI, for example, used the following mix of data to train their GPT-3 model (per their 2020 “Language Models are Few-Shot Learners” paper):
Note that the different data sources were given different ‘weightings’ in the training. A given paragraph would have about 8 times more influence on a model if it appeared on Wikipedia than if it appeared on a less authoritative website.
Over time, LLM providers have been looking for larger and larger sets of data to use in training their models so, if anything, are likely to use even more of the content on the web for training.
Content you place on the web may be used to train future LLMs
Given this, if you can place favourable content on the web, then there’s a good chance it will be scraped and used as part of a future LLM’s training and, therefore, influence (to some extent) how the resultant model will behave.
If you can influence content in ‘high quality’ corners of the internet, e.g. on Wikipedia, then that may carry significantly more weight than similar content elsewhere.
You might need a lot of content to usefully influence an LLM regarding a popular topic
At this stage, however, it’s unclear how much content you’d need to be getting into LLMs’ training sets in order to usefully influence their resultant behaviour and whether approaches like this are viable.
It’s likely that, the more commonly-discussed a given topic, the more content you’d need to influence in order to significantly influence the output of future LLMs regarding that topic.
This said, it’s possible that an organisation with sufficient resources (e.g. a nation state) could significantly influence LLMs regarding common topics.
More niche topics may be easier… but less helpful
The less-commonly-discussed a given topic, the less content you might need to influence but, potentially, the more an LLM-based system might rely on referring to external sources to help it form an output. Generative AI systems referring to external sources in this way is known as ‘retrieval augmented generation’ or RAG. The more the system is relying on these external sources, the less valuable influencing the LLM itself is likely to be.
Nevertheless, it may be possible, with modest resources, to usefully influence LLMs in certain circumstances regarding narrow yet highly valuable topics.
This approach may not be the most attractive (at least for now)
There is little research in this area for now (let me know if you’re aware of some!)
Given this, you may like to keep an eye out for developments in this space but, for now, not attempt to influence the training of models via large-scale influencing of content except as a natural by-product of a more traditional digital PR effort.
When it comes to LLMO-specific efforts, I suggest you focus on trying to influence the context that is provided to models rather than the models directly…
“I suggest you focus on trying to influence the context that is provided to models rather than the models directly”
Matt Collins, LLMO Guy
Approach 2: Influencing the Context Provided to Models
AI also ‘looks things up’
Increasingly, large language models are being hooked up to data sources that allow them to ‘look things up’ on the fly rather than rely on the knowledge encoded in them through their training. In the case of LLM-powered internet search or answer engines such as Bing Chat, Google Bard and Perplexity, they can look things up virtually anywhere on the public internet.
Such systems typically retrieve a number of pieces of content from the internet that they hope will be useful in formulating a response, then feed that content as ‘context’ to an underlying LLM.
Influencing what AI ‘looks up’ can influence what it says
If you have control over the content that is passed to the LLM, then you can potentially influence the output of the LLM.
Breaking this down further, there are two things you can do:
- make sure that your content is retrieved
- make sure that, if your content is retrieved, it influences the output as favourably as possible
2(a) Making Sure Your Content is Retrieved
This is about trying to ensure a system retrieves the content you want rather than other things it could retrieve.
Behind the scenes, generative AI-enhanced search and answer systems use search engines to find content that is likely to be helpful in answering a given query (e.g. the top 5 search results for a given query). They then pass some or all of the content from those results to their LLM.
To make it more likely that your content is passed to the LLM, then, you need to make it more likely that your content is in the top results returned by the search engine that the system is using. And that’s largely just traditional SEO.
Over time, it’s possible that the search engines used as part of these ‘retrieval augmented generation’ (RAG) systems will diverge in nature from human-facing search engines as the companies providing them better understand what is most helpful in the RAG context. If so, organisations may want to target SEO efforts specifically towards influencing these LLM-focused search engines.
2(b) Making Sure That, if Your Content is Retrieved, it Influences the Output as Favourably as Possible
Assuming you can get your content retrieved and passed to the LLM, what do you ideally want it to say?
This is an area ripe for exploration and where experimentation is very much possible.
Some early findings in this area were reported in the (not yet peer-reviewed, as of January 2024) paper “GEO: Generative Engine Optimization,” by researchers at Princeton, Georgia Tech, The Allen Institute for AI and IIT Delhi. They found specific types of changes to content passed on an LLM had a significant impact on the visibility of the sources of that content in the LLM’s output. I discuss it a little further here.
To the extent that you trust these findings, you may want to make sure your content includes healthy authority-boosting elements such as citations, quotations from relevant sources, and statistics.
What’s Next?
LLMO is an emerging field and one that is likely to rise in prominence over the coming years. For now, few people are focussing on it, so if you’re able to leverage it successfully, you may have a valuable head start over your competitors.
References
- GEO (Generative Engine Optimization), the Future of SEO (?) by Ann Smarty, December 2023
- GEO: Generative Engine Optimization by Aggarwal et al, November 2023
- LLM optimization: Can you influence generative AI outputs? by Olaf Kopp, October 2023
- The Ultimate Guide to LLMO, GEO & AIO by Malte Landwehr, January 2024