Category 19 tutorials

Large Language Models Explained

Large language models such as GPT, Claude, Gemini, Llama and DeepSeek, and the AI agents built on them, rest on a series of research breakthroughs. In this section you will find tutorials on how large language models work - their internals, the key research papers behind today's LLMs and comparisons of the main approaches - explained in plain language with diagrams, links to the original papers, and runnable Java examples where an idea can be shown in code. The topics range from the Transformer architecture to retrieval-augmented generation, fine-tuning, RLHF, AI agents and reasoning models, and new tutorials are added as the field moves on.

In case you are new to LLMs, start with Attention Is All You Need: The Transformer Paper Explained, and then read the paper posts in the order the papers were published. If you build applications with LLMs, the posts on Retrieval-Augmented Generation and ReAct are the most directly useful.

The papers, explained - the research behind today's LLMs, in the order it was published:

  1. Attention Is All You Need: The Transformer Paper Explained
  2. BERT Paper Explained: Bidirectional Transformers
  3. Scaling Laws for Language Models (and Chinchilla) Explained
  4. GPT-3 Paper Explained: Language Models Are Few-Shot Learners
  5. RAG Paper Explained: Retrieval-Augmented Generation
  6. LoRA Paper Explained: Low-Rank Adaptation of LLMs
  7. Chain-of-Thought Prompting Paper Explained
  8. InstructGPT Paper Explained: Training LLMs with RLHF
  9. ReAct Paper Explained: Reasoning and Acting in LLMs
  10. DeepSeek-R1 Paper Explained: Reasoning via RL

Core concepts for developers - tokens, RAG, prompting, sampling and the maths underneath:

  1. LLM Tokens, Context Windows, Embeddings and Hallucinations
  2. RAG Architecture Explained: Chunking, Embeddings, Retrieval
  3. pgvector vs Chroma vs Qdrant vs Milvus vs Redis Compared
  4. Prompt Engineering Techniques Explained with Examples
  5. LLM Temperature, Top-k and Top-p Sampling Explained
  6. Tokenization Explained: Byte Pair Encoding in Java
  7. Cosine Similarity vs Dot Product for Embeddings
  8. Softmax, Cross-Entropy and KL Divergence Explained
  9. Mixture of Experts (MoE) Explained: Routers and Experts
Post Thumbnail