Core Concepts (AI/ML)
Inference
In shortUsing a trained model to produce an output, such as a prediction, classification or generated answer, for new input it has not seen before.
Inference is the stage where a trained model is put to work. Training is when the model learns from data; inference is when it receives new input and produces an output, such as a sentiment score for a review, an intent label for a keyword, or an answer from an LLM. Every time you send a prompt to ChatGPT or call an NLP API, you are running inference.
How it works
The model’s parameters are fixed during inference; it applies what it learned to the input in front of it. For LLMs, the prompt and any retrieved documents are converted to tokens, loaded into the context window, and the model generates output one token at a time. Settings such as temperature change how predictable that output is.
Inference has a cost in compute, time and money, usually charged per token or per request. MLforSEO’s agentic SEO material points out that this cost shapes AI search: systems prefer sources that are cheap to verify, which is one reason clean structured data and clear, self-contained passages are favoured over long, ambiguous prose.
How it’s used in SEO and marketing
- Batch inference: running a trained or pre-trained model over thousands of keywords, pages or reviews in Colab or Google Sheets.
- Real-time inference: on-site search, chatbots and recommendations that respond as users interact.
- Cost planning: estimating API spend before running an LLM over a full site.
- Understanding AI search: retrieval and trust checks happen at “inference time”, when the system can cross-check your claims against other sources it has just retrieved (RAG).
Example
You fine-tune a small classifier on 500 labelled queries (training). You then run it over 50,000 Search Console queries to label each as informational, commercial or navigational (inference). Training took an hour once; inference runs every month on new data in minutes, and its cost scales with the number of queries.
Limitations and things to watch
- A model can only infer from what it learned and what it is given; it cannot know facts outside its training data or context.
- LLM inference is probabilistic, so the same prompt can give different answers.
- Latency and cost grow with input length, which is why long, unfocused pages are less attractive to AI systems.
- In statistics, “inference” also means drawing conclusions about a population from a sample; in ML and AI it means running a model.
Learn it on MLforSEO
Where Inference shows up on MLforSEO
Learn it in a course
Read about it on the blog
Sources and further reading
- https://www.mlforseo.com/machine-learning-implementation-guides/ai-search-optimisation/trust-is-not-a-schema-field/ MLforSEO
- https://www.mlforseo.com/machine-learning-implementation-guides/ai-search-optimisation/audience-no-longer-only-human-agentic-seo/ MLforSEO
- https://www.mlforseo.com/courses/ai-search-optimisation-agentic-seo/ MLforSEO
- Google Cloud: What is AI inference?
- Google for Developers: Machine Learning Glossary
Other terms from Core Concepts (AI/ML)
- AlgorithmA defined set of steps for solving a problem; in machine learning, the procedure that learns patterns from dat…
- Artificial Intelligence (AI)The broad field of building systems that appear to reason, learn and act intelligently; machine learning is on…
- Bag of WordsA simple way to turn text into numbers by counting how often each word appears in a document, ignoring grammar…
- Bias (AI/ML)When a model systematically favours some outcomes or groups over others because of skewed data, labels, design…
- Data Labelling (Annotation)Adding the correct answer (a category, entity, sentiment or score) to examples, so a supervised model can lear…
- Data Preprocessing (Cleaning)Cleaning, fixing and reshaping raw data so a machine learning model or analysis can use it, from removing dupl…
- Deep LearningA branch of machine learning that trains many-layered neural networks on large datasets; it powers modern lang…
- Dimensionality ReductionCompressing data with many features, such as embeddings, into fewer dimensions while keeping the important str…
- EmbeddingA list of numbers (a vector) that represents the meaning of a word, text, image or entity, so similar things s…




