跪拜 Guibai
← All articles
Artificial Intelligence

30 LLM Concepts Every Developer Should Know, Explained Visually

By 周末程序猿 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

The LLM stack has grown dense enough that even experienced engineers trip over the difference between RAG and fine-tuning, or when to reach for top-p versus temperature. A visual map of the first 30 terms removes the friction of piecing together scattered documentation.

Summary

Thirty foundational LLM concepts get a one-diagram, one-paragraph treatment, starting with the Transformer and self-attention and moving through the full lifecycle: tokenization, embeddings, pre-training, fine-tuning, and decoding strategies. Each entry pairs a clean illustration with a plain-language definition that connects the idea to its practical role in how models understand and generate text.

Prompting techniques like few-shot, zero-shot, and chain-of-thought sit alongside infrastructure pieces such as vector databases and the RAG architecture. The glossary also covers safety and alignment mechanisms — RLHF, instruction tuning, and hallucination — that determine whether a model is useful or dangerous in production.

Decoding controls (temperature, top-p, top-k, beam search) and efficiency tactics like quantization round out the set, making the collection useful both for newcomers building mental models and for practitioners who need to debug generation behavior.

Takeaways
Self-attention lets a Transformer weigh every token in a sequence against every other token, which is why long-range dependencies don't get lost.
Multi-head attention runs several self-attention operations in parallel so the model can track syntax, semantics, and position in separate representation subspaces.
Tokenization splits text into subword units; BPE and WordPiece are the two most common algorithms, and the choice directly affects vocabulary size and handling of rare words.
Pre-training on unlabeled text is the most expensive phase; fine-tuning on a small labeled dataset adapts the model to a specific task at a fraction of the cost.
Few-shot prompting includes examples in the prompt to steer output format; zero-shot relies entirely on what the model absorbed during pre-training.
Chain-of-thought prompting forces the model to write intermediate reasoning steps, which measurably improves accuracy on math and logic problems.
RAG retrieves relevant documents from a vector database before generation, grounding answers in external facts and reducing hallucination.
RLHF trains a reward model from human preference data, then uses reinforcement learning to nudge the LLM toward outputs humans actually want.
Temperature controls randomness: low values make output deterministic and repetitive; high values increase diversity but risk nonsense.
Quantization compresses 32-bit parameters down to 8-bit integers, cutting memory and latency enough to run models on consumer hardware.
Conclusions

Grouping concepts by lifecycle stage — architecture, training, prompting, deployment — reveals that most practitioner pain sits in the prompting and decoding layer, not in model internals.

The glossary treats hallucination as a first-class concept alongside architecture fundamentals, which reflects how central reliability has become to LLM adoption.

Function calling and agents appear as separate entries, signaling that the industry now sees tool use and autonomous planning as distinct capabilities rather than one catch-all feature.

Concepts & terms
Context Window
The maximum number of tokens a model can process in one forward pass. A larger window handles longer documents but increases memory and compute quadratically with self-attention.
Hallucination
When an LLM generates text that reads fluently but is factually wrong or entirely fabricated. It stems from the model's training objective (next-token prediction) rather than truth-seeking.
RAG (Retrieval-Augmented Generation)
An architecture that adds a retrieval step before generation: the system searches a knowledge base for relevant documents, then feeds them into the prompt so the model can ground its answer in retrieved facts.
RLHF (Reinforcement Learning from Human Feedback)
A fine-tuning method where human raters compare model outputs, a reward model learns those preferences, and reinforcement learning updates the LLM to maximize the learned reward.
Quantization
Reducing the numerical precision of model weights (e.g., FP32 to INT8) to shrink model size and speed up inference, often with a small trade-off in accuracy.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗