Introduction to LLM

This page provides an easy-to-understand guide on LLMs (Large Language Models) from basics to applications for AI enthusiasts.


Total of 17 articles available. | Currently on page 1 of 1.

Chapter 12 — Protocol Hardening and Defenses

Thirteenth post of the LLM Primer IV walkthrough. The four defense clusters — cryptographic attestation, OAuth scope discipline with bounded sessions, runtime sandboxing, and human-in-the-loop gates — compose into a posture that does not depend on the model behaving correctly under adversarial conditions.

2026-04-10

Chapter 11 — Attack Surfaces and Protocol Vulnerabilities

Eleventh post of the LLM Primer IV walkthrough. The classical attacks adapted to MCP — Confused Deputy, Token Passthrough, Session Hijacking — the protocol-level flaws around capability escalation and unauthenticated sampling, and the implicit trust propagation that makes context poisoning a structural problem rather than a hygiene one.

2026-04-09

Chapter 10 — Long-Horizon Task Memory

Tenth post of the LLM Primer IV walkthrough. Short-term memory through windows and ReAct scratchpads, long-term memory through episodic vectors and semantic stores, and the compaction techniques that keep an agent productive over hours and days.

2026-04-08

Chapter 4 — Client Primitives: Agentic Behaviors and Control

Fourth post of the LLM Primer IV walkthrough. Sampling, Roots, and Elicitation are the three small, controlled holes MCP punches through the host-server wall — each a capability granted back, each a risk accepted on the user's behalf.

2026-04-02

Chapter 3 — Server Primitives: Exposing Context and Capabilities

Third post of the LLM Primer IV walkthrough. The three nouns an MCP server can offer — Resources (read state), Prompts (reusable scaffolding), Tools (write actions) — their schemas, their lifecycles, their error models, and the discipline of choosing the right primitive.

2026-04-01

Chapter 2 — Unveiling the Model Context Protocol (MCP)

Second post of the LLM Primer IV walkthrough. What MCP actually standardizes, the three-role split of Host, Client, and Server, why dynamic discovery and bidirectional messaging differ from REST in the cases that matter, and the session lifecycle that opens with capability negotiation.

2026-03-31

LLM Primer IV — Series Introduction & Index

Kicking off the chapter-by-chapter walkthrough of Book IV in the LLM Primer series — Designing AI Cognition with MCP. Why agents need a protocol layer to scale past demoware, who this book is for, and the schedule for the fourteen posts that follow, March 30 through April 12.

2026-03-29

Chapter 10 — Leading Evaluation Frameworks

Tenth post of the LLM Primer III walkthrough. A field guide to the frameworks that turn the Evaluation Triad into something a team can actually run — RAGAS, TruLens, DeepEval on one side, Braintrust, LangSmith, Phoenix, Galileo, Opik on the other, and the Evaluation Gap none of them has yet closed.

2026-03-27

Chapter 9 — The RAG Evaluation Triad

Ninth post of the LLM Primer III walkthrough. A RAG system can fail in three different places and the failures look identical from the outside — the Evaluation Triad of Context Relevance, Groundedness, and Answer Relevance is the small vocabulary that prevents fixing one bug while measuring another.

2026-03-26

Chapter 12 — Real-World Applications of LLMs

Twelfth post of the LLM Primer II walkthrough. Text generation, summarization, QA, translation, reasoning — and the constrained decoding, agent loops, and multimodal generalization that turn one next-token machine into a dozen kinds of product.

2026-03-14

Chapter 10 — Post-Training and Alignment Mathematics

Tenth post of the LLM Primer II walkthrough. The mathematics that civilizes a brilliant but feral next-word predictor into a helpful assistant — supervised fine-tuning, reward modeling, RLHF on a KL leash, and the elegant DPO derivation that collapses the whole pipeline into a single supervised loss.

2026-03-12

Chapter 4 — Attention: The Core Mechanism

Fourth post of the LLM Primer II walkthrough. Self-attention derived from intuition, the geometry of queries/keys/values, multi-head structure and normalization, softmax in detail with its temperature knob, and a striking final move: attention seen as a kernel method.

2026-03-06

Chapter 1 — Mathematical Intuition for Language Models

First post of the LLM Primer II walkthrough. Mathematical notation without intimidation, probability for language generation explained from scratch, and entropy as a way to measure uncertainty — the trio that makes the rest of the book readable.

2026-03-03

2.1 What Is a Large Language Model?

A clear and in-depth explanation of what Large Language Models (LLMs) are. Learn how LLMs map token sequences to probability distributions, why next-token prediction unlocks general intelligence, and what makes a model “large.” This section builds the foundation for understanding pretraining, parameters, and scaling laws.

2025-09-08

1.3 Entropy and Information: Quantifying Uncertainty

A clear, intuitive exploration of entropy, information, and uncertainty in Large Language Models. Learn how information theory shapes next-token prediction, why entropy matters for creativity and coherence, and how cross-entropy connects probability to learning. This section concludes Chapter 1 and prepares readers for the conceptual foundations in Chapter 2.

2025-09-06

1.2 Basics of Probability for Language Generation

An intuitive, beginner-friendly guide to probability in Large Language Models. Learn how LLMs represent uncertainty, compute conditional probabilities, apply the chain rule, and generate text through sampling. This chapter builds the mathematical foundation for entropy and information theory in Section 1.3.

2025-09-05

7.4 Data Ethics and Bias in Large Language Models

A preview from Chapter 7.4: Discover why large language models inherit bias, the real-world risks, strategies for mitigation, and the growing role of AI governance.

2024-10-09