LLM Hallucinations — Causes and Remedies
Why LLMs confidently invent falsehoods, what types of hallucinations exist, and which remedies actually help — RAG, source enforcement, verification.
in KI-Konzepte
Basis-Begriffe rund um Large Language Models.
Reasoning Effort is a control parameter on modern reasoning models that sets how much internal step-by-step thinking (thinking tokens) a model spends before answering — higher levels raise quality but also latency and cost.
Sampling is the weighted drawing of the next token from a language model's probability distribution — governed by temperature, top-p and top-k. It produces the variability between two runs.
The thinking budget (token budget) is the maximum number of internal reasoning tokens a reasoning model may spend on "thinking" per request — controlling the trade-off between answer depth and cost or latency.
Automatic Speech Recognition (ASR), also called Speech-to-Text (STT), is the automatic conversion of spoken language into written text by an acoustic model.
Path dependency describes how, during LLM generation, each early token shapes everything that follows — the first verbalized finding steers the entire remaining analysis in one direction.
Whisper is OpenAI's open speech-to-text model from 2022 — a multilingual encoder-decoder transformer that turns audio into text and ships in several sizes under an MIT license.
Audio normalization is the adaptive linear scaling of an audio signal to a target level — the tool first measures a reference value (peak, RMS or LUFS) and from that calculates the required gain.
The context window is the maximum number of tokens a language model can process at once — input and output combined.
Three related concepts for digital audio levels: dBFS is the scale with 0 dBFS as the hard ceiling, headroom is the safety margin below the maximum, clipping is the hard cut-off when a signal exceeds it.
An embedding is a numeric representation (vector) of text, an image, or other data in which semantically similar content sits close together in space.
A hallucination is a language-model response that sounds plausible but is factually wrong or fabricated — typically caused by statistical guessing without a factual anchor.
Inference is the act of running an already-trained model to turn an input into a response — production use, not training.
The KV cache (key-value cache) stores the already computed key and value vectors of a language model's attention layers during text generation. This avoids recomputing the entire context for each new token and significantly speeds up inference.
LLM stands for Large Language Model — a neural network trained on large volumes of text to interpret and generate natural language.
RAG (Retrieval-Augmented Generation) connects a language model to an external knowledge source — relevant passages are retrieved and passed to the model alongside the question.
Stop sequences are strings that make an LLM end token generation as soon as they appear. They constrain the output deliberately — to prevent role switches, format markers or overly long answers.
Temperature is a sampling parameter that controls how deterministic or creative a language model's responses are — low values stay conservative, high values produce more variety.
A token is the smallest unit a language model works with internally — usually a sub-word fragment, occasionally a single character.
A tokenizer is the program that splits text into tokens before a language model can process it — it determines how many tokens a piece of text costs.
Top-p (nucleus sampling) and top-k are sampling strategies for LLMs that decide which token candidates to draw from at each step — together with temperature they control the creativity of the output.
A model card is a standardised datasheet for an AI model — documenting purpose, training data, performance, limitations and ethical considerations in one place.
Safetensors is a file format developed by Hugging Face for storing model weights — faster, safer and more language-agnostic than the older PyTorch `.pt`/`.bin` format.
Why LLMs confidently invent falsehoods, what types of hallucinations exist, and which remedies actually help — RAG, source enforcement, verification.
What a token is, how tokenizers split text, and why tokens drive cost, context window, and speed — with rules of thumb for estimating token counts.
An embedding is a vector of numbers that places meaning in space. Why similar content sits close together and what embeddings are used for.
What the context window is, how big modern windows are, the lost-in-the-middle phenomenon, cost and latency, and the distinction from RAG and long-term memory.
How an LLM picks the next token: temperature sharpens or flattens the probabilities, top-p and top-k limit the choice. Which setting for what.