← All glossary terms

Large language model

A large language model, or LLM, is a type of AI model trained on a massive amount of text to predict the next piece of text given what came before. That simple mechanism, repeated token by token, is what lets it write, summarize, answer questions, and generate code, without being explicitly programmed for any one of those tasks.

Trained on an enormous volume of text, the model learns statistical patterns in language, which words and phrases tend to follow which others in which contexts. Generating text means repeatedly scoring every possible next token, a word or a piece of a word, given everything written so far, picking one of the likely candidates, then feeding it back in and predicting the next one, over and over, until a full response emerges. Because that choice usually involves some sampling rather than always taking the top option, the same prompt can produce different answers. Nothing about that process involves explicitly understanding facts or rules the way a traditional program does, it's all learned from patterns in the training data. Most chat assistants are then tuned further on example conversations and human feedback, which shapes how they respond without changing that underlying mechanism.

At a large enough scale, with enough training data and enough parameters, predicting the next token well enough requires the model to implicitly pick up grammar, facts, reasoning patterns, and even some structure of code, since all of that shows up as patterns in the text it was trained on. That's also the root of both its strengths and its two best-known limitations: AI hallucination, since a confident, plausible-sounding prediction isn't the same as a verified fact, and the model's dependence on how a request is phrased, which is the entire premise behind prompt engineering.

In testing specifically, an LLM is the underlying engine behind turning a plain-language description of a user flow into a structured test case, behind summarizing why a test failed in readable language instead of a raw stack trace, and behind judging whether a screen matches what a test expected using reasoning rather than an exact string comparison. Most of the specific AI testing concepts in this glossary, from agentic AI testing to AI-driven test generation, are really describing different ways of putting an LLM to work on a QA problem.


How it actually works

  • Trained on a massive volume of text, learning statistical patterns in language rather than explicit facts or rules.
  • Generates text by repeatedly predicting a likely next token, usually with some sampling, feeding each choice back in to predict the next.
  • Picks up grammar, facts, reasoning patterns, and code structure implicitly, as a side effect of getting next-token prediction right at scale.
  • Produces fluent, confident output regardless of whether the underlying content is actually correct.
  • Behavior depends heavily on how a request is phrased, which is the basis of prompt engineering.

Where it shows up in testing

  • Turning a plain-language description of a user flow into a structured, executable test case.
  • Summarizing why a test failed in plain language instead of a raw stack trace.
  • Judging whether a screen matches what a test expected, reasoning about meaning rather than doing an exact comparison.
  • Powering an agent that plans its own testing steps, a pattern covered under agentic AI testing.
  • Generating realistic test data that matches a described schema or business rule.

Benefits and challenges

BenefitChallenge
One general model handles a huge range of language tasks, writing, summarizing, answering, coding, without being built separately for each one. Prone to AI hallucination, a fluent, confident-sounding answer isn't the same as a verified fact, and the model doesn't reliably signal when it's unsure.
Can be applied to a new task through a well-written prompt alone, without retraining the underlying model. Output quality depends heavily on how a request is phrased, an underspecified prompt gets a shallower or less accurate answer.
Has generally improved as models, training data, and training methods have improved, without changing the underlying mechanism. Running a large model costs real compute, which matters at scale when a task runs thousands or millions of times.

Frequently asked questions

Does an LLM actually understand language, or is it just predicting text?

Mechanically, it's predicting the next most likely token based on patterns learned from training data. Whether that constitutes understanding is debated, but in practice, a model trained at large enough scale behaves as if it understands a lot, correctly handling grammar, context, and many facts, even though the underlying mechanism is pure prediction.

Why do LLMs sometimes confidently state something false?

Because the model is optimized to produce plausible, fluent text, not to verify facts against a source of truth. When it doesn't have a clear, well-represented answer in its training data, it still produces its best statistical guess, which can read as entirely confident even when it's wrong. See AI hallucination for more on this.

What's the difference between an LLM and AI in general?

AI is the broad field covering any system that performs a task normally requiring human intelligence. An LLM is one specific kind of AI model, focused on language, trained to predict text. Most of what people mean today when they casually say AI, in a chat assistant or a writing tool, is actually an LLM specifically.


How Klarent helps

Klarent's AI agents use large language models to turn a plain-language description of a user flow into a working test, and to reason about whether a result actually reflects correct application behavior, grounded in the real application rather than the model's assumptions alone.


Ready to eliminate QA bottlenecks? Talk to our team for a personalised walkthrough.

Book a free 30 minute call