Open-source AI concepts
Plain definitions of the terms that come up in open-source AI projects, each linked to the projects in our catalogue that implement them.
What is Hallucination in LLMs?Hallucination (also called AI hallucination) is when a large language model produces fluent, confident output that is not grounded in its training data, the prompt, or any real source. The model is not lying; it is filling gaps with plausible text, because its objective is to predict the next token, not to check facts.What is Hybrid search?Hybrid search runs two retrieval systems over the same corpus and merges their result lists: a lexical ranker such as BM25 that rewards exact terms, and a dense vector search that matches meaning. Each fails on cases the other handles, which is the argument for combining them, and the interesting decision is not which one to use but how two sets of incomparable scores are merged.What is Knowledge distillation?Knowledge distillation is a training technique in which a small model, the student, is trained to imitate the output behaviour of a large trained model, the teacher, so the small one gets most of the accuracy for a fraction of the serving cost. The open-source tooling splits by domain, from vision training pipelines to compression libraries aimed at inference runtimes.What is KV cache?A KV cache (key-value cache) stores the key and value tensors a transformer has already computed for earlier tokens, so each new token is generated without recomputing the whole prefix. It trades GPU memory for speed, and it is the reason long conversations and long documents get expensive to serve.What is LLM evaluation?LLM evaluation (evals) is the practice of measuring how a language model or an LLM-based system performs on defined tasks, using datasets, metrics and scoring rules. It turns vague impressions about output quality into numbers and pass/fail results you can compare over time.What is LLM gateway?An LLM gateway (also called an LLM proxy or model router) is a service that sits between your application and one or more model providers, giving you a single endpoint for routing, credentials, retries and usage tracking. Instead of calling OpenAI, Anthropic or a self-hosted model directly, your code calls the gateway.What is LLM guardrails?LLM guardrails are checks placed around a language model call that inspect what goes in, what comes out, or what the model is allowed to do, and block, repair or redirect when something fails. The word covers everything from an output schema that forces valid JSON to a gateway rule that refuses a request outright, and those are very different tools with very different costs.What is LLM inference server?An LLM inference server is a process that loads a language model into memory and answers generation requests over an API, usually HTTP. It sits between an application and the model weights, handling batching, memory and scheduling so callers do not have to.What is Local LLM?A Local LLM is a large language model whose weights and inference run on hardware you own, such as a laptop, desktop or home server, instead of a provider's API. Running LLMs locally means prompts, documents and outputs stay on that machine, and the model keeps working when the network does not.What is LoRA? Low-Rank Adaptation ExplainedLoRA (low-rank adaptation) is a fine-tuning method that freezes a model's original weights and trains a small pair of low-rank matrices alongside them, so adapting a large model costs a fraction of full fine-tuning. QLoRA combines LoRA with quantized base weights to cut memory use further.What is Mixture of experts?A mixture of experts is a neural network that keeps many parallel sub-networks, called experts, and activates only a few of them for each input token, so the model holds far more parameters than it computes with. In open source the pattern shows up as training engines, serving kernels and research inference engines that stream experts from disk.What is Model Context Protocol?Model Context Protocol (MCP) is an open specification that standardises how an AI application connects to external tools, data sources and prompts. It replaces one-off integrations with a single client-server interface.What is Model quantization?Model quantization is the process of storing a model's weights and sometimes its activations in lower-precision numbers, such as 8-bit or 4-bit integers instead of 16-bit floats. The aim is to cut memory use and speed up inference, usually at some cost to accuracy.What is OCR?OCR turns the pixels of text back into text, and the hard part has moved: modern systems hand a whole page to a vision-language model and get back Markdown, HTML or JSON with tables and reading order intact, rather than classifying one character at a time. What you are choosing between is a fast small recogniser that handles clean scans and a page-level model that handles layout and messy documents.What is ONNX?ONNX, the Open Neural Network Exchange, is a file format for trained machine learning models: a versioned graph of operators, tensor shapes and weights that a runtime can load, so a model trained in one framework can be deployed on another without being retrained. It standardises the artifact rather than the execution, which is why the interesting engineering lives in the exporters and the runtimes rather than in the format.What is Prompt engineering?Prompt engineering is the practice of writing the instructions a language model sees so that it does the thing you meant, and it works because that prompt is the entire interface: there is no other channel for your intent. The techniques that carry their weight are the unglamorous ones, examples, an explicit output format and step-by-step reasoning, and the discipline is deleting everything else.What is Prompt injection?Prompt injection is the failure mode where text an attacker controls reaches a language model's context and gets followed as an instruction, so the model does something the author of the system prompt did not intend. It usually arrives indirectly, through a web page, a document, an email or a tool result, rather than through the chat box.What is Reranking?Reranking is a second scoring pass in a retrieval system: a fast first stage pulls back a few hundred candidates using vectors, and a slower model then reads each query and document together and reorders them, because the cheap stage never let the two see each other. It is the precision step in a two-stage design, and it cannot return anything the first stage missed.What is Retrieval-augmented generation?Retrieval-augmented generation (RAG) is a pattern in which a language model's answer is built from documents fetched at question time instead of from the model's weights alone. The model writes the answer, but a retrieval step decides what it gets to read.What is RLHF?RLHF, reinforcement learning from human feedback, is the method of training a language model by optimising it against a reward signal that came from people ranking its answers, usually as A is better than B. Open-source implementations range from a reference implementation written for teaching to frameworks that cover the whole path from continued pretraining to preference optimisation.