How search systems see your site
Text is a vector, ranking is a competition, a recommendation is a probability: the mathematics behind search and AI answers, explained without code.
A person reads a page. A search system computes it. Each step is a mathematical operation over numbers: deciding which pages to fetch, working out what a page is about, picking candidates for a query, putting them in order, recommending what to see next and choosing a source for an AI answer. That is good news, because anything computed can be measured, and anything measured can be compared with your competitors.
This page explains the main ideas without code. The formulas are standard, published building blocks. Real systems combine many of them with private weights, and that combination is what our reverse engineering approximates.
The stages at a glance
Section titled “The stages at a glance”| Stage | What the system decides | In mathematical terms | What it means for you |
|---|---|---|---|
| Crawling | Which pages to fetch, and how often | Spending a limited budget by estimated value and probability of change | Pages that look unimportant or never change are visited rarely |
| Rendering and extraction | What text the page really contains | Turning HTML and scripts into a document | Text that appears only after scripts run can be lost |
| Retrieval | Which pages are candidates for a query | Similarity between vectors, plus word statistics | A page that is not a candidate cannot be ranked at all |
| Ranking | In what order to show the candidates | A score for each page, then sorting | Your position depends on the gap to the pages around you |
| Links and authority | Which pages to trust | A graph, and how probability flows through it | A link from a trusted page counts more than many weak ones |
| Recommendations | What to show this person next | The probability that they click, watch or buy | Early engagement and good item data shape that estimate |
| AI answers | Which sources to read and quote | Retrieval first, then generation from what was found | To be cited, a passage must first be found, then be easy to quote |
Text is a vector
Section titled “Text is a vector”A modern search system does not match words alone. A language model turns a piece of text, whether a query, a paragraph or a whole page, into an embedding: a list of numbers, often a thousand or more. Texts with similar meaning get vectors that point in similar directions, even when they share no words. “Cheap flights to Rome” and “low-cost air tickets to the Italian capital” end up close together.
The closeness of a query vector and a passage vector is often measured by the cosine of the angle between them:
A value near 1 means the passage says what the query asks. Lower values mean it drifts away from the question.
Words still matter. Alongside vectors, search systems use lexical scoring such as BM25, which rewards a page for containing the query’s terms, rare terms most of all, without rewarding endless repetition. Many systems combine both kinds of score.
What we measure. People ask for the same thing in many ways, so we group real queries into clusters by meaning and find the centre of each cluster. Then we measure how close your best passage is to that centre, and how close the competitor’s passage is. If the competitor is closer, we find what is missing from your text: the sub-topic, fact or term that pulls its vector toward the centre.
Ranking is a competition
Section titled “Ranking is a competition”For each candidate page and query , the system computes a score and sorts the candidates by it. Ranking models are often trained on pairs of pages, learning which of the two should be higher. In its simplest form, the probability that page is placed above page is
Only the difference appears in the formula. The absolute quality of a page does not matter; the gap to the page next to it does. If both pages are weak, the less weak one still wins. If your page is excellent but the competitor’s is slightly better on the signals the system weighs most, the competitor stays above you.
What we measure. We estimate the signals that make up the score for your page and for the pages ranked around it, and find the ones where the difference is largest and cheapest to change. That is the shortest path past a specific competitor.
Recommendations are probabilities
Section titled “Recommendations are probabilities”Recommendation systems on marketplaces, video and news platforms estimate the probability that a person will interact with an item:
They show the items with the highest expected value first. The estimate is learned from behaviour: what was shown, what was clicked, watched or bought, and what was ignored. An item with no history yet, such as a new product or a new video, can only be judged by its attributes. That is why titles, categories, images and structured product data carry so much weight at the start.
What we measure. We look at the attributes and engagement signals that drive these estimates, and compare your items with your competitors’ items in the same feed or category.
Crawling is a budget
Section titled “Crawling is a budget”A crawler cannot fetch every page on the web every day. It estimates how valuable a page is and how likely it is to have changed since the last visit, and spends its limited fetches accordingly. A slow server, duplicate pages and endless URL variations spend that budget on pages that do not matter, so the important ones are fetched late or not at all.
What we measure. We simulate how crawlers move through your site and your competitors’ sites: which pages they reach, how quickly, and what is lost when the page is rendered.
Links form a graph
Section titled “Links form a graph”The web is a graph of pages connected by links. The classic PageRank model imagines a reader who follows links at random and now and then jumps to a random page. A page’s rank is the probability of finding the reader on it. Modern engines use many more signals, but the core idea still holds: a link passes trust, and a link from a page that many trusted pages point to passes more.
What we measure. We compare the link graphs around you and around your competitors: which sources link to them but not to you, and which of those links can realistically be earned.
AI answers are retrieval plus generation
Section titled “AI answers are retrieval plus generation”Most AI assistants answer a question in two steps. First they search: they turn the question into one or more queries, retrieve candidate passages from a search index and keep the most relevant ones. Then a language model writes the answer from those passages and cites some of them. This design is called retrieval-augmented generation.
To be cited, a passage has to pass both steps. It must be retrieved, which means it is close to the question in vector space and reachable by the assistant’s crawler. And it must be easy to extract and quote: clear, self-contained and consistent with what other sources say about you.
What we measure. We ask the assistants the questions your buyers ask, repeatedly and in every market you sell in, and record who is mentioned and cited, you or your competitors, and which passages the answers draw on.
From numbers to decisions
Section titled “From numbers to decisions”Every quantity on this page can be measured for your page and for a competitor’s page, on the same query, in the same region and language. The difference is the gap. Combined with the demand behind the query, it shows where a change is worth the most. How we work shows how we turn these measurements into specific changes.
Further reading
Section titled “Further reading”- Brin, S. and Page, L. (1998). The anatomy of a large-scale hypertextual Web search engine. Computer Networks and ISDN Systems, 30.
- Cho, J. and Garcia-Molina, H. (2003). Effective page refresh policies for Web crawlers. ACM Transactions on Database Systems, 28(4).
- Burges, C. et al. (2005). Learning to rank using gradient descent. Proceedings of ICML 2005.
- Robertson, S. and Zaragoza, H. (2009). The probabilistic relevance framework: BM25 and beyond. Foundations and Trends in Information Retrieval, 3(4).
- Covington, P., Adams, J. and Sargin, E. (2016). Deep neural networks for YouTube recommendations. Proceedings of RecSys 2016.
- Reimers, N. and Gurevych, I. (2019). Sentence-BERT: Sentence embeddings using Siamese BERT-networks. Proceedings of EMNLP-IJCNLP 2019.
- Lewis, P. et al. (2020). Retrieval-augmented generation for knowledge-intensive NLP tasks. Advances in Neural Information Processing Systems, 33.