Suggestions

Products & Resources

How to get LLMs to understand your search results — AEO in action

Published:
Back to all blogs

Answer Engine Optimization (AEO) is more than just the SEO ranking hacks we’ve all come to roll our eyes at. It’s more fundamental than that: it’s getting non-deterministic systems (read: LLMs) to produce deterministic and reliable answers about our website’s pages and products. AEO isn’t as narrowly focused as SEO is, since we’re not just targeting one company’s proprietary ranking algorithm. Instead, we’re trying to get all generative AI tools with reasonable research abilities to reach the same conclusions about our website’s content.

This is becoming more important than ever, as slowly but surely more and more are using LLM interfaces like ChatGPT for Google-adjacent queries. Even many of those prompts that are more complex and/or conversational than what could be fed to Google’s search engine also end up requiring web searches. So if in those searches, the LLM can’t find your store or understand completely what you’re selling, it’ll either fill in the gaps with hallucinations or just never recommend to an engaged shopper that they should ever look at your products in the first place.

If genAI tools are becoming the front door to discovery for so many users, how can we as ecommerce store operators adapt? We’ll talk about that in this article. (And if you’re just here for a practical checklist, skip to the section “Practical implementation for devs”.)

Why classic SEO thinking breaks down with AEO

SEO assumes that a rough measure of an individual page’s importance is enough to recommend that page to a searcher. Then the searcher is expected to read, parse, and interpret the content of their page. Google’s search engine connects existing content to users who may be interested to read it, but it assumes no responsibility for the interpretation step.

Much more is demanded of the LLM. It has to not only lookup relevant pages, but read, parse, and interpret them so as to condense the information available into a reasonably short answer for the user. Since the whole reading, parsing, and interpreting step is super expensive, LLMs use dedicated lookup tools that find pages using a much stricter definition of relevance, otherwise it would waste tons of tokens reasoning on content that doesn’t contain the answer to the user’s prompt.

The takeaway: great SEO pages can still produce bad AI answers. Ranking pages ≠ enabling answers. This is where having a programmable search layer matters—because AEO isn’t about writing better pages, it’s about controlling what data gets retrieved, how much of it is exposed, and how consistently it’s returned. This changes so much:

How we measure success

Given how LLMs actually search for and present information to the end user, we can’t actually guarantee that we’ll ever see a click or page visit in our site’s analytics. The promotion of our products could happen entirely through the digital equivalent of word-of-mouth, completely untrackable if the AI had looked up the info earlier and simply answered the user’s prompt from long-term memory.

So if click-through isn’t the primary metric anymore with AEO, how do we measure success? By testing to see how LLMs talk about your brand. These tests can feed directly into how you tune your search results, attributes, and ranking logic over time. There are some automated tools to help with this, but you can easily test it yourself by just prompting some of the major LLM interfaces with repeatable keyword- and product-focused questions. For example:

  • "I need a pair of [Product Category] specifically for [Extreme Niche Use Case]. Which brands are engineered for this, and what specific technical specifications make them the authority?"
  • "Compare the [Specific Attribute, e.g., 'Gore-Tex integration' or 'API latency'] of the top three providers in [Industry]. Who is the objective leader in this specific spec?"
  • "List five [Products] that prioritize [Value, e.g., 'sustainability' or 'durability'] above all else. Provide the specific data points that prove their commitment."

Those queries let the AI come up with the brand names all on their own. If your brand is not mentioned often in the responses, you can tell that your brand doesn’t currently have much authority in the LLM’s opinion — and this might be an AEO discoverability problem at its core.

Some other queries measure your site directly and how well the LLM can parse it. For example:

  • "Using the search feature on [YourWebsite.com], find a product that meets [Complex Set of Constraints]. Summarize why this result is the best match based only on the data returned in the search list."
  • "Analyze the search result metadata for [Product] on [YourWebsite.com]. Is there enough information in the initial result set to determine [Specific Compatibility Fact], or do I have to click into the product page to find out?"

If the answers indicate that your site is creating some friction for the LLM to efficiently understand your search results, then there might be a structural issue to fix.

Consider also that LLMs tend to drop sources as the conversation gets deeper if the source comes off as salesy rather than unbiased and informational. Since conversations with LLMs that result in product discovery usually last at least several back-and-forth messages, it’s good to test some sequential prompts:

  1. "Who are the top innovators in [Your Category] right now?" (Wait for response.)
  2. "For the brands you just mentioned, provide a table comparing their [Complex Technical Spec] and [Pricing Tier]." (Wait for response.)
  3. "If I am a [Specific Persona], which of those specific data points from your table makes [Your Brand] the logical choice?"

If your brand disappears between Step 1 and Step 3, or if the LLM switches to a competitor's data at some point in the conversation, your brand is coming off as more of a candidate that didn’t pass muster, as opposed to the LLM’s objective recommendation. The information in your product records is likely less informational than your competitors in some way.

How much detail we serve

There’s a travel game show on the streaming service Nebula (and YouTube) called JetLag, and they sell an at-home version of their game on Nebula’s website. So I thought I’d ask ChatGPT, Gemini, and Claude one of the questions we described earlier, directed at this product. Here’s what I asked the LLMs several times each:

Analyze the search result metadata for https://store.nebula.tv/search?type=product%2Carticle%2Cpage&q=jet+lag+game+pack. Is there enough information in the initial result set to determine if the game deck is waterproof, or do I have to click into the product page to find out?

The cards are actually “water-resistant”, so this is a bit of a trick question, but it’s something a shopper might reasonably ask.

Claude sometimes refused to even answer the question since apparently the robots.txt of the site is vague about whether it can access that page. This is a good reminder that none of this search optimization matters if the LLM can’t access your page in the first place, so AEO naturally begins at your robots.txt. ChatGPT almost always said something like “No, I can’t find that information because it’s not in the search results.” Gemini’s answer was the best, but it ended up turning to Reddit for information instead of the product page itself. Here’s the full Gemini answer:

The initial search result metadata for the Nebula Store does not provide enough information to determine if the Jet Lag game pack is waterproof. To find a definitive answer from the official source, you would have to click into the product page.

The metadata currently available in the search results is limited to the following:

  • Product Name: Jet Lag: The Game (various versions/collections).
  • Price: Generally listed as $35.00 for game-related items.
  • Categories/Tags: "card game," "board game," "preorder," and "recently added."
  • Basic Availability: Indications of whether an item is on sale or available for preorder.

There is no technical specification regarding material or water resistance in the snippets provided by the store's search index.

Context from outside the store metadata:

While the store metadata is silent, community discussions (such as on Reddit) suggest that the cards feature a "waterproof laminate" or are "waterproof" to handle the rigors of travel. however, since this information is not present in the Nebula Store's search result metadata, a click-through to the specific product description is required to confirm the official manufacturer specifications.

The takeaway from this experiment: Most search engines return enough data just to build a UI card, but AEO requires returning enough data for an LLM to answer reasonable questions about the product. Those answers are scattered through layers of ecommerce tech. Neglecting to surface critical info on product pages reduces discoverability for LLMs since, to put it bluntly, they’re incentivized to be lazy researchers. Search results should expose price, key specs, availability, ratings, reviews, and the primary differentiators from other products for maximum LLM comprehension.

These extra pieces of information may not have been in your search index because they may not have been previously displayed in your UI. That’s alright! It doesn’t require rearchitecting your entire data flow, since you can use Data Transformations to enrich and supplement your search index records with data from third party sources like an inventory management system, a review database, or a dynamic pricing tool. Nothing needs to be set in stone — just visible to the LLM.

In short, LLMs can only synthesize from what they see, so thin hits force guesswork. In principle, if a human would need some piece of data to judge your product, an LLM probably does too, so put it in your Algolia records.

Whether we expect determinism

Determinism could be a liability if we always commit to a specific order of a specific result set, regardless of whether its the optimal one. But flipping to the opposite extreme — dramatically reranking every five seconds based on microtrends — is a much bigger liability, especially for AEO. If example.com/search?q=boots returns different products every time it is parsed, the LLM cannot cite you as a reliable source. In other words, if a result can’t be reloaded deterministically, it can’t be reasoned about reliably.

Here’s the catch: some non-deterministic features (like Dynamic Re-Ranking) are actually super valuable for human interactions, since they appeal to human tendencies. We don’t actually want to disable all non-deterministic features because the revenue generated by human shoppers would tank. One way to put this all together is to run some logic on your backend that identifies agent-driven traffic. If the page is clearly being accessed by an LLM’s web browser, then we run the Algolia search on the backend and tag it with a ruleContext representing queries originating from AIs. It should activate a rule for that query which disables Dynamic Re-Ranking, or whatever other feature you decide, so that you don’t affect your finely-tuned relevance formulas for human viewers.

This way, we can expose queries as stable, crawlable URLs, but only for LLMs. GET parameters passed to your search page should be automatically applied as refinements so the LLM can reference canonical result sets without actually clicking on anything or simulating a browser environment. We can use the same rule to expand the attributesToRetrieve and the hitsPerPage to give the AI more data to work with. This makes your experiments reproducible, so when you run the tests we described earlier, you’ll get consistent and significant results.

The missing layer: search results as reasoning inputs

LLMs don’t respect the long-form fluff we’re used to cramming into our sites. Humans stay on a page and get enticed by offers and shimmering buttons, but LLMs just see that as noise. Instead, write meaningful, actionable content designed to be a concise basis from which to make bigger inferences about the product’s usefulness to a particular shopper. Focus on result structure, attribute completeness, predictable ordering, and the like.

Here’s the key point: these are all adaptations that get made not just to the UI of a product page, but to the search results themselves. The search results returning from that request to Algolia are the ideal reasoning inputs for that shopper’s LLM. The better you architect that data you’re making available to whatever AI reads your search or product page, the more it’ll freely advertise your products, because ultimately the search API is the LLM’s interface to your product catalog.

Practical implementation for devs

Here’s how to implement AEO in practice:

  • Make sure your robots.txt is allowing AI traffic to pages with information you want the LLMs to have.
  • Identify AI agent traffic on your site’s backend, and hydrate the page with prerendered search results from Algolia using refinements from GET parameters. (This is called Server-Side Rendering in most frameworks.)
  • On AI traffic, turn off non-deterministic features using Algolia’s Rules.
  • Make your search results detailed and specific enough that the LLM doesn’t have to invent any information to sell it for you.
  • Put the appropriate JSON-LD objects in your HTML <head> on both the search and product pages so the LLM doesn’t have to parse the test of the page.
  • Include in your JSON-LD and search results an LLM-friendly snippet which is never shown directly to a consumer and contains a highly dense, informational instruction set for LLMs.
  • Regularly test how well your brand’s AEO is performing by asking the major LLM interfaces what they know about and think about your products.

AEO is clarity and structure

Algolia has been working in search and discovery for well over a decade now, and the industry has never been shifting faster than it is right now. But you don’t have to get left behind! The established practice of LLM-assisted shopping is here to stay and can definitely work in your favor to bring you high-intent leads, but only if we treat our search results as machine-readable datasets instead of just a list of links. The brands that win in this new era will be those that use Algolia’s AI-native infrastructure to fuel their shopper’s virtual assistants, because from now on, if your search results aren’t built to be reasoned over, LLMs will simply reason past them.

Get the AI search that shows users what they need