Other Types
Product

Introducing Adaptive Intent: a better way to understand search intent

Published:
Back to all blogs

Vector search changed what search can understand. Instead of matching only on keywords, vector search can recognize semantic similarity. A shopper searches for “running shoes,” and the system can understand that “trail sneakers” or “road trainers” may belong in the result set. A visitor searches for “summer wedding dress,” and the system can connect that query to products that don’t use those exact words.

That’s powerful, but it also has a limit: the query is still doing a lot of work.

Most search queries are short. Many are ambiguous. Some are vague because the user doesn’t yet know exactly what they want. Others are precise to the user but underspecified to the search system. A query like “shiraz” might mean affordable bottles, highly rated bottles, Australian bottles, Napa bottles, gifts, or bottles similar to what other shoppers usually buy after typing the same thing.

The problem isn’t that vector search fails to understand language. The problem is that language is only one signal.

With NeuralSearch, Algolia combines keyword and vector retrieval to deliver more relevant results across lexical and semantic matches. Now, Adaptive Intent adds another layer: it helps NeuralSearch represent frequent queries based on the documents users actually engage with.

Instead of asking only, “What does this query mean?” bag of documents asks, “What have users found useful after searching this query?”

Why the query alone is not always enough

In a typical vector search system, both queries and documents are embedded as vectors. The search engine compares the query vector with document vectors and retrieves the closest matches.

This works well when the query is a strong representation of intent. But many queries aren’t.

A two-word query may carry several possible meanings. A broad category query may point to many valid product groups. A popular query may have a pattern of user behavior that is more specific than the words themselves. And even when the embedding model is strong, query vectors and document vectors can live in slightly different distributions, which can make similarity less reliable than it looks.

Adaptive Intent is built around the concepts shared by Daniel Tunkelang in his work on  bag of documents; it’s a way to model queries as distributions of document vectors. For frequent queries, the system can aggregate the vectors of relevant documents into a “bag” and use that bag to represent the query. In other words, the system can learn the meaning of a query from the results that consistently satisfy it.

That idea is especially useful for commerce, media, marketplaces, and other discovery experiences where user behavior is rich. In these settings, relevance is not only about semantic closeness. It’s also about what people click, buy, read, watch, save, or otherwise choose.

What bag of documents adds to NeuralSearch

NeuralSearch helps Algolia retrieve results that match both the words and the meaning of a query. Adaptive Intent improves the query representation itself.

For queries with enough engagement data, Algolia can replace the standard query vector with a vector computed from documents associated with that query. The bag is built from behavioral signals such as clicks and conversions, then weighted so that stronger signals have more influence.

Now, NeuralSearch has a more grounded representation of intent. A query vector based only on the text “shiraz” may capture the general concept of shiraz. A bag-of-documents vector can capture what “shiraz” tends to mean on a specific site, for a specific catalog, with real users. On one site, that may point toward premium bottles. On another, it may point toward popular under-$25 options. On another, it may reveal that shoppers who type “shiraz” often prefer Australian bottles even when they don’t say “Australian.”

In other words, bag of documents makes search results more specific to the experience you’re actually running.

bag-of-documents-example.webp

An example of how it might work on a wine merchant’s site, showing before and after bag of documents

How it works

Bag of documents runs as a batch process, so it doesn’t add work at query time.

For each eligible query, Algolia looks at engagement signals such as clicks and conversions to identify a set of documents associated with that query. Those documents form the “bag.” The documents are then weighted based on relevance signals, so products or content that users consistently prefer have more influence on the final representation.

Algolia computes a weighted average vector from the document embeddings in the bag. That vector becomes the query representation for future searches of the same query. The process runs periodically, with data read from BigQuery, vectors computed and hashed through the inference API, and the results stored for fast lookup.

At query time, NeuralSearch checks whether a bag exists. If it does, Algolia uses the precomputed bag-of-documents vector. If it doesn’t, NeuralSearch falls back to standard query vectorization.

Bag of documents is not a replacement for query understanding. It’s an additional signal for the queries where behavioral data is strong enough to improve the representation.

Why this improves relevance

Bag of documents improves relevance in two ways.

First, it helps align query and document representations. Instead of comparing a query vector created from a few words with document vectors created from richer records, the system represents the query using document vectors themselves. Daniel describes this as one of the central benefits of the model: aligning query and document embeddings.

Second, it brings real-world behavior into the retrieval process. Clicks and conversions are imperfect signals, but they capture something language alone can’t: what users tend to choose when faced with actual results. Daniel also notes that relevance judgments can come from multiple sources, including implicit engagement signals like clicks, explicit human judgments, or automated judgments from models.

For Algolia customers, that means NeuralSearch can better reflect how users interact with a specific catalog, not just how a general-purpose model interprets text. In other words, with Adaptive Intent you can:

  • Prioritize high-converting products: Go beyond semantic similarity to drive conversions based on what products others have successfully engaged with and purchased

  • Capture intent beyond model capabilities: Real user behavior reveals nuances no one model can predict

  • Adapt flexibly over time: Query meanings evolve with product mix, seasons, and user preferences

This is especially valuable in ecommerce. Business users often care most about customer satisfaction and experience, not only conversion or revenue, and many struggle with disconnected tools and limited developer support. Bag of documents helps by turning the behavior already happening in the search experience into a relevance signal that works behind the scenes.

When bag of documents works best

Adaptive Intent is most effective for ecommerce teams with high brand query volumes and well-established traffic patterns. More broadly, it helps sites or apps that meet these conditions:.

  1. You have meaningful engagement data. 

  2. Queries repeat often enough to build reliable intent signals. 

  3. And the documents associated with a query form a coherent cluster in vector space.

That last point matters. Daniel connects bag of documents to the cluster hypothesis: the idea that documents relevant to the same query should be similar to each other. If relevant documents cluster well, their average vector can be a useful representation of the query. If they don’t, the model may be less effective.

For example, “black running shoes” likely maps to a relatively coherent group of products. “Gifts” may be broader, but still useful if behavior consistently clusters around certain items. A query like “on sale” is different. Sale status may cut across many unrelated products, so document similarity may not correlate well with relevance. Daniel calls out discounted ecommerce items as an example where content similarity may not meaningfully predict relevance.

That’s why the fallback matters. Bag of documents should strengthen NeuralSearch where behavior provides a reliable signal, while standard NeuralSearch continues to handle new, rare, or long-tail queries.

A practical step forward for AI search

AI search often gets discussed as if better models alone will solve relevance. Better models matter. But better signals matter too.

Adaptive Intent is valuable because it connects NeuralSearch to the feedback loop every search experience already creates. Users search. They scan results. They click. They convert. Over time, those interactions reveal patterns that are hard to infer from the query text alone.

For Algolia customers, this means more relevant results for frequent queries without adding query-time complexity. It also means NeuralSearch becomes more adaptive to the language, catalog, and behavior of each business. The query still matters. The words still matter. But with bag of documents, they’re no longer the only evidence of intent… ie, sometimes the best way to understand a query is to look at the documents users choose after typing it.

NeuralSearch is available to our Elevate customers. Sign up to try Algolia today, or get in touch with our team to learn more about AI Search powered by NeuralSearch

Recommended

We think you might be interested in these:

Get the AI search that shows users what they need