# LLM

> The LLM (Large Language Model) is a neural network trained on large amounts of text to understand and generate language.

## What is a large language model (LLM)?

The neural network trained on huge amounts of text that predicts the next token in a sequence. Can answer questions, write and explain code, translate and summarize. Results may contain errors, so they must be verified.

- Topic: Language Models
- Type: concept

## Interview questions

### How does an LLM generate text?

It predicts the most likely next token given all previous tokens, adds it to the text and repeats until it stops.

### Why do LLMs hallucinate?

They generate likely-sounding text, not verified facts. When knowledge is missing or vague, they can produce confident but wrong answers.

### Does an LLM know about recent events?

Only up to its training cutoff. For newer or private information it needs tools like web search or retrieval with RAG.

## Related cards

- [Token](https://wonderium.dev/ai/token.md)
- [Transformer](https://wonderium.dev/ai/transformer.md)
- [Context Window](https://wonderium.dev/ai/context-window.md)
- [LLM API](https://wonderium.dev/ai/llm-api.md)
- [Hallucination](https://wonderium.dev/ai/hallucination.md)

---

- Level: [Artificial Intelligence](https://wonderium.dev/ai.md)
- HTML version: https://wonderium.dev/ai/llm
- Last updated: 2026-11-25
