Inference engine

An inference engine is the software that does the reasoning or prediction work in an AI system: in classic expert systems it applies rules to facts, and today it usually means software that runs trained models efficiently.

The term has two lives. It comes from the era of expert systems, when an inference engine was the component that applied logical rules to a knowledge base to work out new facts. Today it more often means the software that runs a trained neural network, especially a large language model, and turns requests into outputs as quickly and cheaply as possible.

In the classic sense, the knowledge base held rules written by experts, and the engine chained them together. Forward chaining starts from known facts and derives conclusions; backward chaining starts from a goal and asks which facts would prove it, often by asking the user questions. MYCIN, built at Stanford in the early 1970s by Edward Shortliffe for diagnosing bacterial infections, used backward chaining over about 600 rules. Its engine was later separated from the medical knowledge as EMYCIN, so other teams could reuse it with rules of their own. Because the reasoning followed explicit rules, these systems could explain how they reached a conclusion.

In the modern sense, an inference engine is what sits between a model's weights and its users. vLLM, which began at UC Berkeley's Sky Computing Lab, describes itself as a high-throughput and memory-efficient inference and serving engine for language models. Its features show what such engines do: PagedAttention to manage the memory each conversation needs, continuous batching to keep GPUs busy, quantisation to shrink models, speculative decoding to speed up generation, and a server that mimics OpenAI's API so existing code can call it. Other widely used engines include NVIDIA's TensorRT-LLM and SGLang.

The choice of engine matters more than it sounds. The same model on the same chips can serve several times more users with a well-optimised engine, which directly changes the cost of every answer. When a company says it has cut the price or raised the speed of a model without changing the model, the engine is often where the gain came from.

Common questions

What is an inference engine in AI?

It is the component that produces conclusions or outputs. In rule-based expert systems, it applies logical rules to a knowledge base. In modern machine learning, it is the software that loads a trained model and runs it efficiently to answer requests.

What is the difference between forward and backward chaining?

Forward chaining starts from known facts and applies rules to derive new conclusions. Backward chaining starts from a goal or hypothesis and works back to find which facts would support it. Medical expert systems such as MYCIN used backward chaining, asking the user questions as needed.

What are examples of LLM inference engines?

vLLM, SGLang and NVIDIA's TensorRT-LLM are widely used. They load open-weight models onto GPUs and apply techniques such as continuous batching, efficient KV cache memory management and quantisation to serve many requests quickly.

Is an inference engine the same as the model?

No. The model is the trained set of weights; the inference engine is the software that runs it. The same model can be run by different engines with very different speed and cost, and one engine can run many different models.

Finding more

For the classic sense, search for "inference engine expert system", "forward chaining backward chaining" and "MYCIN". For the modern sense, search for "LLM inference engine", "vLLM", "PagedAttention" and "LLM serving". Histories of AI and encyclopedia articles cover the expert system era well; for current engines, the projects' own documentation and the systems papers behind them are more reliable than benchmark posts, which often test settings that favour one engine.

  • Inference engineReferenceBoth senses of the term, with forward and backward chaining and the expert system history.
  • MycinReferenceThe Stanford expert system's backward-chaining engine, its roughly 600 rules and the EMYCIN shell.
  • vLLM on GitHubOfficialThe open-source LLM inference and serving engine and its main features.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.