Model Evaluation
Ground Truth
In shortGround truth is the set of correct answers, usually labelled by people, that a model is trained on or checked against to measure how well it performs.
Ground truth is the correct answer for each example in a dataset: the label you trust enough to treat as reality. It is what a supervised model learns from and, just as importantly, what you compare any model’s output against to see whether it works. In SEO terms, ground truth is the hand-checked list of intents, entities or categories that tells you whether a tool, script or LLM got it right.
How it works
Ground truth usually comes from people. Someone reads each keyword, page or comment and assigns the correct label, a process called data labelling. That labelled set then plays two roles:
- Training data: in supervised learning, the model learns the pattern between inputs and their true labels.
- Evaluation data: a separate held-out portion is used to score predictions with a confusion matrix, precision and recall or accuracy.
MLforSEO’s framework for choosing an ML task starts from the same question: do you already know the correct answer for at least a subset of your data? If yes, you can use supervised methods and check outcomes. If no, you are in unsupervised territory, and in clustering you fall back on internal measures such as the silhouette score because there are no ground truth labels.
How it’s used in SEO and marketing
- Testing a search intent classifier on a few hundred keywords you labelled yourself before running it on thousands.
- Benchmarking entity extraction and sentiment tools against a known answer key.
- Evaluating LLM outputs: a small golden set of prompts with agreed correct answers lets you track hallucinations and regressions, and calibrate an LLM-as-a-judge setup against human judgement.
- Auditing vendor claims: a tool’s own confidence score is not ground truth, so spot-check it against labels you trust.
Example
In MLforSEO’s comparison of NLP APIs and generative AI for entity extraction, the test text contained 13 core named entities (the people, organisations and brands). That list acted as the ground truth: Google, ChatGPT, Qwen and DeepSeek found all 13, Amazon Comprehend found 12 and IBM found 7. For sentiment, the post relies on an independent study in which about 6,000 social media comments were labelled by hand; against those human labels the three APIs scored between 67% and 72% accuracy. The post’s advice follows directly: keep a human review step, and do not treat any single API’s sentiment label as ground truth.
Limitations and things to watch
- Labels can be wrong or subjective. Intent and sentiment are often ambiguous, so have two people label a sample and check how often they agree.
- Ground truth ages. Search intent for a query can shift, so refresh labelled sets for long-running models.
- A biased or unrepresentative labelled set produces biased models and misleading scores (see bias).
- Never evaluate on the same examples you trained on; keep a held-out set.
Learn it on MLforSEO
Where Ground Truth shows up on MLforSEO
Learn it in a course
Read about it on the blog
Sources and further reading
Other terms from Model Evaluation
- Accuracy (ML metric)Accuracy is the share of all predictions a model gets right. It is the simplest evaluation metric, but it misl…
- Coherence ScoreA metric for how interpretable a topic model's topics are, based on how often each topic's top words appear to…
- Confusion MatrixA confusion matrix is a table comparing a classifier's predictions with the true labels, showing exactly which…
- Cosine SimilarityA measure of how closely two vectors point in the same direction, used to score how similar two texts, keyword…
- Emotion ScoresPer-emotion scores (joy, sadness, fear, disgust, anger) an emotion analysis API assigns to a text, each from 0…
- Entity Salience ScoreA 0 to 1 score from Google's Natural Language API showing how central each extracted entity is to the analysed…
- Euclidean DistanceEuclidean distance is the straight-line distance between two points in any number of dimensions, used to compa…
- F1 ScoreA single evaluation metric that balances precision and recall (their harmonic mean); useful when classes are i…
- LLM-as-a-JudgeUsing a large language model to score or compare outputs against a rubric, as a scalable stand-in for human re…
