Introduction to Machine Learning for SEO
- Marketing and SEO implementations of ML Clustering
- Practical: Entity Analysis in Web Content Audits for Automated Internal Link Opportunity Identification
NEW: AI Search Optimisation and Agentic SEO Course by Beatrice Gamba -> Immediate start, on-demand learning for how to optimise for discovery in agentic search ✨ ✨
Model Evaluation
In shortA measure of how close two texts are in meaning, usually the cosine similarity of their embeddings, whether or not they share words.
Semantic similarity measures how close two pieces of text are in meaning. “Link building” and “backlink outreach” share few letters but score as very similar, while “hard” and “hand” differ by one letter yet mean different things. It is usually calculated by turning each text into an embedding and comparing the vectors, which is what separates it from character-level fuzzy matching.
An embedding model, often from the Sentence Transformers library such as all-MiniLM-L6-v2 (384 dimensions), converts each keyword, sentence, paragraph or page into a vector. Cosine similarity then compares the direction of two vectors: higher means closer in meaning. Cosine is the default similarity function in Sentence Transformers; on normalised embeddings, a dot product gives the same result.
Scores only make sense relative to the model that produced them. MLforSEO’s internal linking script found that bge-small rates almost every pair of pages above 0.6 while other popular models rarely go that high, so it uses a relative threshold (the top 10% of your own site’s similarity distribution) instead of a fixed number.
In MLforSEO’s internal linking guide, a script scored every page pair on a 79-post blog with cosine similarity, kept unlinked pairs in the top 10% while skipping near-duplicates, then embedded about 5,400 paragraphs to find the best spot for each link. The output was a review file of 128 suggestions, each approved or rejected by a person.